Client · JavaScript & Lua

GTA V Script natives

Game script threads and script events.

The 38 natives of the game’s SCRIPT namespace, as LS:MP client scripts call them: global functions with the same arguments in JavaScript and in Lua. Each one has its own page, with its signature, a call in both languages, its parameters and what it returns.

NativeGame nameHash
requestScriptBlockedREQUEST_SCRIPT0x6EB5F71AA68F2E8E
setScriptAsNoLongerNeededBlockedSET_SCRIPT_AS_NO_LONGER_NEEDED0xC90D2DCACD56184C
hasScriptLoadedHAS_SCRIPT_LOADED0xE6CC9F3BA0FB9EF1
doesScriptExistDOES_SCRIPT_EXIST0xFC04745FBE67C19A
requestScriptWithNameHashBlockedREQUEST_SCRIPT_WITH_NAME_HASH0xD62A67D26D9653E6
setScriptWithNameHashAsNoLongerNeededBlockedSET_SCRIPT_WITH_NAME_HASH_AS_NO_LONGER_NEEDED0xC5BC038960E9DB27
hasScriptWithNameHashLoadedHAS_SCRIPT_WITH_NAME_HASH_LOADED0x5F0F0C783EB16C04
doesScriptWithNameHashExistDOES_SCRIPT_WITH_NAME_HASH_EXIST0xF86AA3C56BA31381
terminateThreadBlockedTERMINATE_THREAD0xC8B189ED9138BCD4
isThreadActiveIS_THREAD_ACTIVE0x46E9AE36D8FA6417
getNameOfScriptWithThisIdGET_NAME_OF_SCRIPT_WITH_THIS_ID0x05A42BA9FC8DA96B
scriptThreadIteratorResetSCRIPT_THREAD_ITERATOR_RESET0xDADFADA5A20143A8
scriptThreadIteratorGetNextThreadIdSCRIPT_THREAD_ITERATOR_GET_NEXT_THREAD_ID0x30B4FA1C82DD4B9F
getIdOfThisThreadGET_ID_OF_THIS_THREAD0xC30338E8088E2E21
terminateThisThreadBlockedTERMINATE_THIS_THREAD0x1090044AD1DA76FA
getNumberOfThreadsRunningTheScriptWithThisHashGET_NUMBER_OF_THREADS_RUNNING_THE_SCRIPT_WITH_THIS_HASH0x2C83A9DA6BFFC4F9
getThisScriptNameGET_THIS_SCRIPT_NAME0x442E0A7EDE4A738A
getHashOfThisScriptNameGET_HASH_OF_THIS_SCRIPT_NAME0x8A1C8B1738FFE87E
getNumberOfEventsGET_NUMBER_OF_EVENTS0x5F92A689A06620AA
getEventExistsGET_EVENT_EXISTS0x936E6168A9BCEDB5
getEventAtIndexGET_EVENT_AT_INDEX0xD8F66A3A60C62153
getEventDataBlockedGET_EVENT_DATA0x2902843FCD2B2D79
triggerScriptEventBlockedTRIGGER_SCRIPT_EVENT0x5AE99C571D5BBE5D
shutdownLoadingScreenBlockedSHUTDOWN_LOADING_SCREEN0x078EBE9809CCD637
setNoLoadingScreenBlockedSET_NO_LOADING_SCREEN0x5262CC1995D07E09
getNoLoadingScreenGET_NO_LOADING_SCREEN0x18C1270EA7F199BC
setLoadingScreenBlankNot in this buildSET_LOADING_SCREEN_BLANK
commitToLoadingscreenSelctionBlockedCOMMIT_TO_LOADINGSCREEN_SELCTION0xB1577667C3708F9B
bgIsExitflagSetBG_IS_EXITFLAG_SET0x836B62713E0534CA
bgSetExitflagResponseBlockedBG_SET_EXITFLAG_RESPONSE0x760910B49D2B98EA
bgStartContextHashBlockedBG_START_CONTEXT_HASH0x75B18E49607874C7
bgEndContextHashBlockedBG_END_CONTEXT_HASH0x107E5CC7CA942BC1
bgStartContextBlockedBG_START_CONTEXT0x9D5A25BADB742ACD
bgEndContextBlockedBG_END_CONTEXT0xDC2BACD920D0A0DD
bgDoesLaunchParamExistBG_DOES_LAUNCH_PARAM_EXIST0x0F6F1EBBC4E1D5E6
bgGetLaunchParamValueBG_GET_LAUNCH_PARAM_VALUE0x22E21FBCFC88C149
bgGetScriptIdFromNameHashBG_GET_SCRIPT_ID_FROM_NAME_HASH0x829CD22E043A2577
sendTuScriptEventNewNot in this build_SEND_TU_SCRIPT_EVENT_NEW0x71A6F836422FDD2B

Other namespaces

Built-in25Script VM basics: timers, maths helpers, thread control.App data17Data blocks shared with the game's companion apps.Audio280Sounds, speech, music, radio, audio scenes and scripted conversations.Script brains11Script brains attached to objects, peds and world points.Camera248Scripted cameras, the gameplay camera, shakes, cinematic and hint cameras.Clock16In-game time and date, and the real-world clock.Cutscenes56Loading, playing and controlling cutscenes.Data files57Cloud data files and their dictionary and array structures.Decorators12Typed key/value decorators attached to entities.DLC14Presence and state of downloadable content.Entity189Anything placed in the world: position, rotation, health, attachment, collision, visibility.Events13AI and shocking events: adding, blocking and suppressing them.Shop metadata49Shop items, outfits, tattoos and weapon data declared by DLC metadata.Fire19Script fires and explosions.Graphics403Drawing: markers, lines, sprites, lights, particle effects, scaleform movies, timecycles and screen effects.HUD518Text, help and notifications, blips and the minimap, pause-menu and frontend components.IIS1The initial interactive screen shown when the game starts.Interior45Interiors, rooms and entity sets.Item sets9Script-side collections of entities and other items.Landing page4The game's landing page.Lobby8Legacy lobby state of the game's own multiplayer menu.Localization3Language and region of the game.Misc345Everything without a better home: weather, ground and area checks, maths, hashing, strings, game flow.Mobile phone25The in-game phone prop: position, rotation, scale and camera.Money357The game's online economy: earn and spend records, balances.Net shopping42The game's online catalog, baskets and transactions.Network883The game's own network layer: sessions, players, network ids, entity control, cloud content.Object166Props: creation, doors, pickups, breakable and animated objects.Controls50Player input: reading and disabling control actions, vibration, look inversion.Pathfinding60Road nodes, the navigation mesh and GPS routes.Ped614Characters: creation, appearance, health, groups, relationships, ragdoll, config flags.Physics49Ropes, and the physics state of entities.Player250The local player: wanted level, abilities, targeting, control, model, invincibility.Recording17Rockstar Editor recording control.Replay6Rockstar Editor replay and clip state.Save migration8Transfer of a saved game between platforms and accounts.Security3Tamper protection of script variables.Shape tests11Raycasts and the other world probes.Social Club84Social Club inbox, profanity checks, licence plates and presence.Stats338Player statistics, leaderboards and telemetry.Streaming121Loading assets: models, animation and texture dictionaries, particle assets, IPLs, focus.Tasks313AI tasks: movement, combat, animations, driving, scenarios and sequences.Vehicle774Vehicles: creation, mods, colours, doors, damage, handling flags.Water12Water height, waves and water probes.Weapon123Weapons, ammunition, components and weapon objects.Zones9Map zones and population schedules.

Search them in the interactive natives reference