Last active
November 20, 2023 12:53
-
-
Save t3chman/73d361645fd7a4a7f3200ecb37565d4e to your computer and use it in GitHub Desktop.
Cfx Lua Meta Fields - Pointer/Result Handling
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Meta Fields - Pointer Handling | |
--------------------- | |
The Lua runtime allows specifying pointer or result types with native execution via Meta Fields found in the `Citizen` namespace: | |
- PointerValueInt | |
- PointerValueIntInitialized | |
- PointerValueFloat | |
- PointerValueVector | |
- ReturnResultAnyway | |
- ResultAsInteger | |
- ResultAsLong | |
- ResultAsFloat | |
- ResultAsString | |
- ResultAsVector | |
- ResultAsObject | |
- Max | |
Example: | |
```lua | |
local found, groundZ = GetGroundZFor_3dCoord(GetEntityCoords(PlayerPedId()), Citizen.PointerValueFloat(), true) | |
if found then | |
print(groundZ) | |
end | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment