This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
YimMenu/docs/lua/tables/tunables.md

152 lines
3.0 KiB
Markdown
Raw Normal View History

2023-07-02 00:59:02 +02:00
# Table: tunables
Table for manipulating gta tunables.
## Functions (12)
2023-07-02 00:59:02 +02:00
### `get_int(tunable_name)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- **Returns:**
- `integer`: The value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
integer = tunables.get_int(tunable_name)
```
### `get_float(tunable_name)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- **Returns:**
- `float`: The value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
float = tunables.get_float(tunable_name)
```
### `get_bool(tunable_name)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- **Returns:**
- `boolean`: The value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
boolean = tunables.get_bool(tunable_name)
```
### `get_int(tunable_joaated_value)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- **Returns:**
- `integer`: The value of the given tunable.
**Example Usage:**
```lua
integer = tunables.get_int(tunable_joaated_value)
```
### `get_float(tunable_joaated_value)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- **Returns:**
- `float`: The value of the given tunable.
**Example Usage:**
```lua
float = tunables.get_float(tunable_joaated_value)
```
### `get_bool(tunable_joaated_value)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- **Returns:**
- `boolean`: The value of the given tunable.
**Example Usage:**
```lua
boolean = tunables.get_bool(tunable_joaated_value)
```
2023-07-02 00:59:02 +02:00
### `set_int(tunable_name, val)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- `val` (integer): The new value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
tunables.set_int(tunable_name, val)
```
### `set_float(tunable_name, val)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- `val` (float): The new value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
tunables.set_float(tunable_name, val)
```
### `set_bool(tunable_name, val)`
- **Parameters:**
- `tunable_name` (string): The name of the tunable.
- `val` (boolean): The new value of the given tunable.
**Example Usage:**
2023-07-02 00:59:02 +02:00
```lua
tunables.set_bool(tunable_name, val)
```
### `set_int(tunable_joaated_value, val)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- `val` (integer): The new value of the given tunable.
**Example Usage:**
```lua
tunables.set_int(tunable_joaated_value, val)
```
### `set_float(tunable_joaated_value, val)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- `val` (float): The new value of the given tunable.
**Example Usage:**
```lua
tunables.set_float(tunable_joaated_value, val)
```
### `set_bool(tunable_joaated_value, val)`
- **Parameters:**
- `tunable_joaated_value` (integer): The joaated value of the tunable.
- `val` (boolean): The new value of the given tunable.
**Example Usage:**
```lua
tunables.set_bool(tunable_joaated_value, val)
```
2023-07-02 00:59:02 +02:00