mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-22 20:17:24 +08:00
lua doc: add self table doc and update doc for previous changes that forgot to run the doc gen script (#3318)
This commit is contained in:
parent
0b67accd30
commit
3e48c2e6d5
@ -7,7 +7,7 @@ All the infraction from the menu are listed below, used as parameter for adding
|
||||
network.flag_player_as_modder(player_index, infraction.CUSTOM_REASON, "My custom reason on why the player is flagged as a modder")
|
||||
```
|
||||
|
||||
## Infraction Count: 13
|
||||
## Infraction Count: 15
|
||||
|
||||
### `DESYNC_PROTECTION`
|
||||
### `TRIGGERED_ANTICHEAT`
|
||||
@ -22,3 +22,5 @@ network.flag_player_as_modder(player_index, infraction.CUSTOM_REASON, "My custom
|
||||
### `SUPER_JUMP`
|
||||
### `UNDEAD_OTR`
|
||||
### `CUSTOM_REASON`
|
||||
### `CHAT_SPAM`
|
||||
### `SENT_MODDER_BEACONS`
|
||||
|
57
docs/lua/tables/self.md
Normal file
57
docs/lua/tables/self.md
Normal file
@ -0,0 +1,57 @@
|
||||
# Table: self
|
||||
|
||||
Table for retrieving data or info about our own player object.
|
||||
|
||||
## Functions (5)
|
||||
|
||||
### `get_ped()`
|
||||
|
||||
- **Returns:**
|
||||
- `integer`: Script handle of our ped.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
integer = self.get_ped()
|
||||
```
|
||||
|
||||
### `get_id()`
|
||||
|
||||
- **Returns:**
|
||||
- `integer`: Our player id.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
integer = self.get_id()
|
||||
```
|
||||
|
||||
### `get_ped()`
|
||||
|
||||
- **Returns:**
|
||||
- `vec3`: Position of our ped.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
vec3 = self.get_ped()
|
||||
```
|
||||
|
||||
### `get_ped()`
|
||||
|
||||
- **Returns:**
|
||||
- `vec3`: Rotation of our ped.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
vec3 = self.get_ped()
|
||||
```
|
||||
|
||||
### `get_ped()`
|
||||
|
||||
- **Returns:**
|
||||
- `integer`: Script handle of our current vehicle.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
integer = self.get_ped()
|
||||
```
|
||||
|
||||
|
@ -13,7 +13,7 @@ end)
|
||||
|
||||
For a complete list of available gui functions, please refer to the tab class documentation and the gui table documentation.
|
||||
|
||||
## Tab Count: 47
|
||||
## Tab Count: 49
|
||||
|
||||
### `GUI_TAB_SELF`
|
||||
### `GUI_TAB_WEAPONS`
|
||||
@ -42,6 +42,8 @@ For a complete list of available gui functions, please refer to the tab class do
|
||||
### `GUI_TAB_VFX`
|
||||
### `GUI_TAB_XML_MAPS`
|
||||
### `GUI_TAB_NETWORK`
|
||||
### `GUI_TAB_CHAT`
|
||||
### `GUI_TAB_NETWORK_CONTROLS`
|
||||
### `GUI_TAB_MISSIONS`
|
||||
### `GUI_TAB_SPOOFING`
|
||||
### `GUI_TAB_PLAYER_DATABASE`
|
||||
|
@ -5,26 +5,50 @@ namespace lua_self = self;
|
||||
|
||||
namespace lua::self
|
||||
{
|
||||
// Lua API: Table
|
||||
// Name: self
|
||||
// Table for retrieving data or info about our own player object.
|
||||
|
||||
// Lua API: Function
|
||||
// Table: self
|
||||
// Name: get_ped
|
||||
// Returns: integer: Script handle of our ped.
|
||||
static Ped get_ped()
|
||||
{
|
||||
return lua_self::ped;
|
||||
}
|
||||
|
||||
// Lua API: Function
|
||||
// Table: self
|
||||
// Name: get_id
|
||||
// Returns: integer: Our player id.
|
||||
static Player get_id()
|
||||
{
|
||||
return lua_self::id;
|
||||
}
|
||||
|
||||
// Lua API: Function
|
||||
// Table: self
|
||||
// Name: get_ped
|
||||
// Returns: vec3: Position of our ped.
|
||||
static Vector3 get_pos()
|
||||
{
|
||||
return lua_self::pos;
|
||||
}
|
||||
|
||||
// Lua API: Function
|
||||
// Table: self
|
||||
// Name: get_ped
|
||||
// Returns: vec3: Rotation of our ped.
|
||||
static Vector3 get_rot()
|
||||
{
|
||||
return lua_self::rot;
|
||||
}
|
||||
|
||||
// Lua API: Function
|
||||
// Table: self
|
||||
// Name: get_ped
|
||||
// Returns: integer: Script handle of our current vehicle.
|
||||
static Vehicle get_veh()
|
||||
{
|
||||
return lua_self::veh;
|
||||
|
Loading…
Reference in New Issue
Block a user