The FiveM developer’s field guide
Know the native.
Build the world.
Engine functions, framework docs, and game assets.
One reference. From the first lookup to the last line.
knowledge base
Explore / FiveM
Native reference
- SCRIPTBOOL
0x0F6F1EBBC4E1D5E6
``` BG_* NativeDB Introduced: v323 ```
0x0F6F1EBBC4E1D5E6 - SCRIPTint
0x22E21FBCFC88C149
``` BG_* NativeDB Introduced: v323 ```
0x22E21FBCFC88C149 - SCRIPTvoid
0x760910B49D2B98EA
``` Sets bit 1 in GtaThread+0x154 BG_* NativeDB Introduced: v323 ```
0x760910B49D2B98EA - SCRIPTint
0x829CD22E043A2577
``` BG_* NativeDB Introduced: v323 ```
0x829CD22E043A2577 - SCRIPTBOOL
0x836B62713E0534CA
``` Returns true if bit 0 in GtaThread+0x154 is set. BG_* NativeDB Introduced: v323 ```
0x836B62713E0534CA - SCRIPTvoid
BG_END_CONTEXT
``` Deletes the given context from the background scripts context map. NativeDB Introduced: v323 ```
0xDC2BACD920D0A0DD - SCRIPTvoid
BG_END_CONTEXT_HASH
``` Hashed version of 0xDC2BACD920D0A0DD. NativeDB Introduced: v323 ```
0x107E5CC7CA942BC1 - SCRIPTvoid
BG_START_CONTEXT
``` Inserts the given context into the background scripts context map. NativeDB Introduced: v323 ```
0x9D5A25BADB742ACD - SCRIPTvoid
BG_START_CONTEXT_HASH
``` Hashed version of 0x9D5A25BADB742ACD. NativeDB Introduced: v323 ```
0x75B18E49607874C7 - SCRIPTBOOL
DOES_SCRIPT_EXIST
Description not yet documented
0xFC04745FBE67C19A - SCRIPTBOOL
DOES_SCRIPT_WITH_NAME_HASH_EXIST
Description not yet documented
0xF86AA3C56BA31381 - SCRIPTint
GET_EVENT_AT_INDEX
``` eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) ```
0xD8F66A3A60C62153 - SCRIPTBOOL
GET_EVENT_DATA
``` eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). ```
0x2902843FCD2B2D79 - SCRIPTBOOL
GET_EVENT_EXISTS
``` eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) ```
0x936E6168A9BCEDB5 - SCRIPTHash
GET_HASH_OF_THIS_SCRIPT_NAME
Description not yet documented
0x8A1C8B1738FFE87E - SCRIPTint
GET_ID_OF_THIS_THREAD
Description not yet documented
0xC30338E8088E2E21 - SCRIPTchar*
_GET_NAME_OF_THREAD
Description not yet documented
0x05A42BA9FC8DA96B - SCRIPTBOOL
GET_NO_LOADING_SCREEN
Description not yet documented
0x18C1270EA7F199BC - SCRIPTint
GET_NUMBER_OF_EVENTS
``` eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) ```
0x5F92A689A06620AA - SCRIPTint
_GET_NUMBER_OF_REFERENCES_OF_SCRIPT_WITH_NAME_HASH
``` Gets the number of instances of the specified script is currently running. Actually returns numRefs - 1. if (program) v3 = rage::scrProgram::GetNumRefs(program) - 1; return v3; ```
0x2C83A9DA6BFFC4F9 - SCRIPTchar*
GET_THIS_SCRIPT_NAME
Description not yet documented
0x442E0A7EDE4A738A - SCRIPTBOOL
HAS_SCRIPT_LOADED
Returns if a script has been loaded into the game. Used to see if a script was loaded after requesting.
0xE6CC9F3BA0FB9EF1 - SCRIPTBOOL
HAS_SCRIPT_WITH_NAME_HASH_LOADED
Description not yet documented
0x5F0F0C783EB16C04 - SCRIPTBOOL
IS_THREAD_ACTIVE
Description not yet documented
0x46E9AE36D8FA6417 - SCRIPTvoid
_LOCK_LOADING_SCREEN_BUTTONS
Updates the display of the MP/SP loading buttons, and locks the state so that other options are not displayed or changed. This can only be done once.
0xB1577667C3708F9B - SCRIPTvoid
REQUEST_SCRIPT
Description not yet documented
0x6EB5F71AA68F2E8E - SCRIPTvoid
REQUEST_SCRIPT_WITH_NAME_HASH
``` formerly _REQUEST_STREAMED_SCRIPT ```
0xD62A67D26D9653E6 - SCRIPTint
SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID
``` If the function returns 0, the end of the iteration has been reached. ```
0x30B4FA1C82DD4B9F - SCRIPTvoid
SCRIPT_THREAD_ITERATOR_RESET
Starts a new iteration of the current threads. Call this first, then SCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID (0x30B4FA1C82DD4B9F)
0xDADFADA5A20143A8 - SCRIPTvoid
SET_NO_LOADING_SCREEN
Doesn't seem to do anything. Set value can be retrieved using [`GET_NO_LOADING_SCREEN`](#\_0x18C1270EA7F199BC).
0x5262CC1995D07E09 - SCRIPTvoid
SET_SCRIPT_AS_NO_LONGER_NEEDED
Description not yet documented
0xC90D2DCACD56184C - SCRIPTvoid
SET_SCRIPT_WITH_NAME_HASH_AS_NO_LONGER_NEEDED
Description not yet documented
0xC5BC038960E9DB27 - SCRIPTvoid
SHUTDOWN_LOADING_SCREEN
Shuts down the loading screen and switches to normal game view. Should only be used by [spawnmanager](https://docs.fivem.net/docs/resources/spawnmanager/) or similar resources after loading and spawning the player ped. If no script does this, the game is stuck in the infamous bridge screen with the "Awaiting scripts" text and loading circle at the bottom right corner. 
0x078EBE9809CCD637 - SCRIPTvoid
TERMINATE_THIS_THREAD
Description not yet documented
0x1090044AD1DA76FA - SCRIPTvoid
TERMINATE_THREAD
Description not yet documented
0xC8B189ED9138BCD4 - SCRIPTvoid
TRIGGER_SCRIPT_EVENT
``` eventGroup: 0 = SCRIPT_EVENT_QUEUE_AI (CEventGroupScriptAI), 1 = SCRIPT_EVENT_QUEUE_NETWORK (CEventGroupScriptNetwork) Note: eventDataSize is NOT the size in bytes, it is the size determined by the SIZE_OF operator (RAGE Script operator, not C/C++ sizeof). That is, the size in bytes divided by 8 (script variables are always 8-byte aligned!). playerBits (also known as playersToBroadcastTo) is a bitset that indicates which players this event should be sent to. In order to send the event to specific players only, use (1 << playerIndex). Set all bits if it should be broadcast to all players. ```
0x5AE99C571D5BBE5D - SCRIPTvoid
_TRIGGER_SCRIPT_EVENT_2
``` See TRIGGER_SCRIPT_EVENT ```
0xA40CC53DF8E50837
A living reference. Documentation coverage varies by native and source.