mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2024-12-23 04:27:25 +08:00
d2a7ff8ba4
* Replaced bad example in entities documentation. * Updated Lua documentation for vehicles/weapons to allow for auto generation. * Added Vector3 support to the Lua globals/locals class. * Fixed a bug with get_float in globals/locals returning an int instead of a float. * Fixed globals get_uint/set_uint using signed types for the return/parameter. * Added unsigned int helpers to the locals Lua class.
2.6 KiB
2.6 KiB
Table: globals
Table containing functions for manipulating gta script globals.
Functions (11)
get_int(global)
Retrieves an int global value.
-
Parameters:
global
(integer): index of the global
-
Returns:
integer
: value of the global
Example Usage:
integer = globals.get_int(global)
get_uint(global)
Retrieves an uint global value.
-
Parameters:
global
(integer): index of the global
-
Returns:
integer
: value of the global
Example Usage:
integer = globals.get_uint(global)
get_float(global)
Retrieves a float global value.
-
Parameters:
global
(integer): index of the global
-
Returns:
float
: value of the global
Example Usage:
float = globals.get_float(global)
get_string(global)
Retrieves a string global value.
-
Parameters:
global
(integer): index of the global
-
Returns:
string
: value of the global
Example Usage:
string = globals.get_string(global)
get_vec3(global)
Retrieves a Vector3 global value.
-
Parameters:
global
(integer): index of the global
-
Returns:
Vector3
: value of the global
Example Usage:
Vector3 = globals.get_vec3(global)
set_int(global, val)
Sets an int global value.
- Parameters:
global
(integer): index of the globalval
(integer): new value for the global
Example Usage:
globals.set_int(global, val)
set_uint(global, val)
Sets an uint global value.
- Parameters:
global
(integer): index of the globalval
(integer): new value for the global
Example Usage:
globals.set_uint(global, val)
set_float(global, val)
Sets a float global value.
- Parameters:
global
(integer): index of the globalval
(float): new value for the global
Example Usage:
globals.set_float(global, val)
set_string(global, str)
Sets a string global value.
- Parameters:
global
(integer): index of the globalstr
(string): new value for the global
Example Usage:
globals.set_string(global, str)
set_vec3(global, param)
Sets a Vector3 global value.
- Parameters:
global
(integer): index of the globalparam
(Vector3): new value for the global
Example Usage:
globals.set_vec3(global, param)
get_pointer(global)
Retrieves a pointer global.
-
Parameters:
global
(integer): index of the global
-
Returns:
pointer
: value of the global
Example Usage:
pointer = globals.get_pointer(global)