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
- MISCvoid
CLEAR_WEATHER_TYPE_PERSIST
Description not yet documented
0xCCC39339BEF76CF5 - MISCint
COMPARE_STRINGS
``` Compares two strings up to a specified number of characters. Parameters: str1 - String to be compared. str2 - String to be compared. matchCase - Comparison will be case-sensitive. maxLength - Maximum number of characters to compare. A value of -1 indicates an infinite length. Returns: A value indicating the relationship between the strings: <0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'A' < 'B', so result = -1) 0 - The contents of both strings are equal. >0 - The first non-matching character in 'str1' is less than the one in 'str2'. (e.g. 'B' > 'A', so result = 1) Examples: MISC::COMPARE_STRINGS("STRING", "string", false, -1); // 0; equal MISC::COMPARE_STRINGS("TESTING", "test", false, 4); // 0; equal MISC::COMPARE_STRINGS("R2D2", "R2xx", false, 2); // 0; equal MISC::COMPARE_STRINGS("foo", "bar", false, -1); // 4; 'f' > 'b' MISC::COMPARE_STRINGS("A", "A", true, 1); // 0; equal When comparing case-sensitive strings, lower-case characters are greater than upper-case characters: MISC::COMPARE_STRINGS("A", "a", true, 1); // -1; 'A' < 'a' MISC::COMPARE_STRINGS("a", "A", true, 1); // 1; 'a' > 'A' ```
0x1E34710ECD4AB0EB - MISCvoid
_COPY_MEMORY
Description not yet documented
0x213AEB2B90CBA7AC - MISCBOOL
CREATE_INCIDENT
``` NativeDB Added Parameter 8: Any p7 NativeDB Added Parameter 9: Any p8 ```
0x3F892CAF67444AE7 - MISCBOOL
CREATE_INCIDENT_WITH_ENTITY
``` NativeDB Added Parameter 6: Any p5 NativeDB Added Parameter 7: Any p6 ```
0x05983472F0494E60 - MISCvoid
DELETE_INCIDENT
``` Delete an incident with a given id. ======================================================= Correction, I have change this to int, instead of int* as it doesn't use a pointer to the createdIncident. If you try it you will crash (or) freeze. ======================================================= ```
0x556C1AA270D5A207 - MISCvoid
DELETE_STUNT_JUMP
Description not yet documented
0xDC518000E39DAE1F - MISCvoid
DISABLE_HOSPITAL_RESTART
``` The game by default has 5 hospital respawn points. Disabling them all will cause the player to respawn at the last position they were. ```
0xC8535819C450EBA8 - MISCvoid
DISABLE_POLICE_RESTART
``` Disables the spawn point at the police house on the specified index. policeIndex: The police house index. toggle: true to enable the spawn point, false to disable. - Nacorpio ```
0x23285DED6EBD7EA3 - MISCvoid
DISABLE_STUNT_JUMP_SET
Description not yet documented
0xA5272EBEDD4747F6 - MISCvoid
DISPLAY_ONSCREEN_KEYBOARD
Displays a text input box. ```cpp enum eKeyboardType { ONSCREEN_KEYBOARD_ENGLISH = 0, ONSCREEN_KEYBOARD_LOCALISED = 1, ONSCREEN_KEYBOARD_PASSWORD = 2, ONSCREEN_KEYBOARD_GAMERTAG = 3, ONSCREEN_KEYBOARD_EMAIL = 4, ONSCREEN_KEYBOARD_BASIC_ENGLISH = 5, ONSCREEN_KEYBOARD_FILENAME = 6 }; ```
0x00DC833F2568DBF6 - MISCvoid
DISPLAY_ONSCREEN_KEYBOARD_WITH_LONGER_INITIAL_STRING
Displays the text input box with support for input with 500 characters.
0xCA78CFA0366592FE - MISCvoid
DO_AUTO_SAVE
Description not yet documented
0x50EEAAD86232EE55 - MISCBOOL
DOES_POP_MULTIPLIER_AREA_EXIST
Description not yet documented
0x1327E2FE9746BAEE - MISCBOOL
DOES_POP_MULTIPLIER_SPHERE_EXIST
Description not yet documented
0x171BAFB3C60389F4 - MISCvoid
ENABLE_DISPATCH_SERVICE
Enables or disables the specified 'dispatch service' type. 'Dispatch services' are used for spawning AI response peds/vehicles for events such as a fire in the street (type 3 - DT_FireDepartment), or gunfire in a gang area (type 11 - DT_Gangs). List of dispatch services: ```cpp enum eDispatchType { DT_Invalid = 0, DT_PoliceAutomobile = 1, DT_PoliceHelicopter = 2, DT_FireDepartment = 3, DT_SwatAutomobile = 4, DT_AmbulanceDepartment = 5, DT_PoliceRiders = 6, DT_PoliceVehicleRequest = 7, DT_PoliceRoadBlock = 8, DT_PoliceAutomobileWaitPulledOver = 9, DT_PoliceAutomobileWaitCruising = 10, DT_Gangs = 11, DT_SwatHelicopter = 13, DT_PoliceBoat = 14, DT_ArmyVehicle = 15, DT_BikerBackup = 15 }; ``` Note that 'dispatch service' has nothing to do with the police scanner (audio), to toggle that, use [SET_AUDIO_FLAG](#\_0xB9EFD5C25018725A) with `'PoliceScannerDisabled'`.
0xDC0F817884CDD856 - MISCvoid
ENABLE_STUNT_JUMP_SET
Description not yet documented
0xE369A5783B866016 - MISCvoid
ENABLE_TENNIS_MODE
``` Makes the ped jump around like they're in a tennis match ```
0x28A04B411933F8A6 - MISCvoid
END_REPLAY_STATS
Description not yet documented
0xA23E821FBDF8A5F2 - MISCBOOL
FIND_SPAWN_POINT_IN_DIRECTION
``` Finds a position ahead of the player by predicting the players next actions. The positions match path finding node positions. When roads diverge, the position may rapidly change between two or more positions. This is due to the engine not being certain of which path the player will take. ```
0x6874E2190B0C1972 - MISCvoid
FORCE_GAME_STATE_PLAYING
``` Sets the localplayer playerinfo state back to playing (State 0) States are: -1: "Invalid" 0: "Playing" 1: "Died" 2: "Arrested" 3: "Failed Mission" 4: "Left Game" 5: "Respawn" 6: "In MP Cutscene" ```
0xC0AA53F866B3134D - MISCvoid
FORCE_LIGHTNING_FLASH
``` creates single lightning+thunder at random position ```
0xF6062E089251C898 - MISCint
GET_ALLOCATED_STACK_SIZE
Description not yet documented
0x8B3CA62B1EF19B62 - MISCfloat
GET_ANGLE_BETWEEN_2D_VECTORS
Description not yet documented
0x186FC4BE848E1C92 - MISCBOOL
_GET_BASE_ELEMENT_METADATA
Description not yet documented
0xB335F761606DB47C - MISCint
_GET_BENCHMARK_ITERATIONS_FROM_COMMAND_LINE
``` Returns value of the '-benchmarkIterations' command line option. ```
0x4750FC27570311EC - MISCint
_GET_BENCHMARK_PASS_FROM_COMMAND_LINE
``` Returns value of the '-benchmarkPass' command line option. ```
0x1B2366C3F2A5C8DF - MISCfloat
_GET_BENCHMARK_TIME
Description not yet documented
0xE599A503B3837E1B - MISCint
GET_BITS_IN_RANGE
Description not yet documented
0x53158863FCC0893A - MISCfloat
_GET_CLOUD_HAT_OPACITY
Description not yet documented
0x20AC25E781AE4A84 - MISCBOOL
GET_COORDS_OF_PROJECTILE_TYPE_IN_AREA
Description not yet documented
0x8D7A43EC6A5FEA45 - MISCBOOL
GET_COORDS_OF_PROJECTILE_TYPE_WITHIN_DISTANCE
Description not yet documented
0xDFB4138EEFED7B81 - MISCfloat
GET_DISTANCE_BETWEEN_COORDS
Returns the distance between two three-dimensional points, optionally ignoring the Z values. If useZ is false, only the 2D plane (X-Y) will be considered for calculating the distance. Consider using this faster native instead: SYSTEM::VDIST - DVIST always takes in consideration the 3D coordinates.
0xF1B760881820C952 - MISCint
GET_FAKE_WANTED_LEVEL
Description not yet documented
0x4C9296CBCD1B971E - MISCint
GET_FRAME_COUNT
Gets the number of the current frame being displayed.
0xFC8202EFC642E6F2 - MISCfloat
GET_FRAME_TIME
Gets the high precision frame time of the last frame in seconds. *note: the example above is way less precise.*
0x15C40837039FFAF7 - MISCint
GET_GAME_TIMER
Description not yet documented
0x9CD27B0045628463 - MISCchar*
_GET_GLOBAL_CHAR_BUFFER
``` Returns pointer to an empty string. GET_C* ```
0x24DA7D7667FD7B09 - MISCBOOL
GET_GROUND_Z_AND_NORMAL_FOR_3D_COORD
Attempts to identify the highest ground Z-coordinate and determine the corresponding surface normal directly beneath a specified 3D coordinate. ``` NativeDB Introduced: v323 ```
0x8BDC7BFC57A81E76 - MISCBOOL
GET_GROUND_Z_EXCLUDING_OBJECTS_FOR_3D_COORD
Determines the highest ground Z-coordinate directly below a specified 3D coordinate, excluding any objects at that point. Optionally, water can be considered as ground when determining the highest point. ``` NativeDB Added Parameter 6: BOOL ignoreDistToWaterLevelCheck - If set to true, the distance to the water level will be ignored when checking for water as ground. ``` ``` NativeDB Introduced: v505 ```
0x9E82F0F362881B29
A living reference. Documentation coverage varies by native and source.