mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-23 01:02:23 +08:00
add lua api: script.execute_as_script (#2824)
Co-authored-by: xiaoxiao921 <xiaoxiao921@hotmail.fr>
This commit is contained in:
@ -2,7 +2,7 @@
|
||||
|
||||
Table containing helper functions related to gta scripts.
|
||||
|
||||
## Functions (2)
|
||||
## Functions (3)
|
||||
|
||||
### `register_looped(name, func)`
|
||||
|
||||
@ -75,4 +75,15 @@ end)
|
||||
script.run_in_fiber(func)
|
||||
```
|
||||
|
||||
### `execute_as_script(script_name, func)`
|
||||
|
||||
- **Parameters:**
|
||||
- `script_name` (string): target script thread.
|
||||
- `func` (function): function that will be executed once in the script thread.
|
||||
|
||||
**Example Usage:**
|
||||
```lua
|
||||
script.execute_as_script(script_name, func)
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user