class Cfx
package fivem.client.natives
Static methods
staticaddAudioSubmixOutput(submixId:Int, outputSubmixId:Int):Dynamic
Adds an output for the specified audio submix.
staticaddAuthorizedParachuteModel(modelNameHash:Int):Dynamic
Adds the given model name hash to the list of valid models for the player ped's parachute.
staticaddAuthorizedParachutePackModel(modelNameHash:Int):Dynamic
Adds the given model name hash to the list of valid models for the player ped's parachute pack.
staticaddConvarChangeListener(conVarFilter:String, handler:Function):Int
Adds a listener for Console Variable changes.
The function called expects to match the following signature:
function ConVarChangeListener(conVarName: string, reserved: any);- conVarName: The ConVar that changed.
- reserved: Currently unused.
staticaddHealthConfig(configName:String, defaultHealth:Float, defaultArmor:Float, defaultEndurance:Float, fatiguedHealthThreshold:Float, injuredHealthThreshold:Float, dyingHealthThreshold:Float, hurtHealthThreshold:Float, dogTakedownThreshold:Float, writheFromBulletThreshold:Float, meleeCardinalFatalAttack:Bool, invincible:Bool):Dynamic
Adds new health config.
staticaddMinimapOverlay(name:String):Int
Loads a minimap overlay from a GFx file in the current resource.
If you need to control the depth of overlay use ADD_MINIMAP_OVERLAY_WITH_DEPTH.
staticaddMinimapOverlayWithDepth(name:String, depth:Int):Int
Loads a minimap overlay from a GFx file in the current resource.
staticaddReplaceTexture(origTxd:String, origTxn:String, newTxd:String, newTxn:String):Dynamic
Experimental natives, please do not use in a live environment.
staticaddStateBagChangeHandler(keyFilter:String, bagFilter:String, handler:Function):Int
Adds a handler for changes to a state bag.
The function called expects to match the following signature:
function StateBagChangeHandler(bagName: string, key: string, value: any, reserved: number, replicated: boolean);-
bagName: The internal bag ID for the state bag which changed. This is usually
player:Source,entity:NetIDor
localEntity:Handle. - key: The changed key.
- value: The new value stored at key. The old value is still stored in the state bag at the time this callback executes.
- reserved: Currently unused.
- replicated: Whether the set is meant to be replicated.
At this time, the change handler can't opt to reject changes.
If bagName refers to an entity, use GET_ENTITY_FROM_STATE_BAG_NAME to get the entity handle
If bagName refers to a player, use GET_PLAYER_FROM_STATE_BAG_NAME to get the player handle
staticaddTextEntry(entryKey:String, entryText:String):Dynamic
staticaddTextEntryByHash(entryKey:Int, entryText:String):Dynamic
staticapplyWeatherCycles(numEntries:Int, msPerCycle:Int):Bool
staticbreakOffVehicleWheel(vehicle:Dynamic, wheelIndex:Int, leaveDebrisTrail:Bool, deleteWheel:Bool, unknownFlag:Bool, putOnFire:Bool):Dynamic
Break off vehicle wheel by index. The leaveDebrisTrail flag requires putOnFire to be true.
staticcallMinimapScaleformFunction(miniMap:Int, fnName:String):Bool
This is similar to the PushScaleformMovieFunction natives, except it calls in the TIMELINE of a minimap overlay.
staticclearDrawOrigin():Dynamic
Resets the screen's draw-origin which was changed by the function SET_DRAW_ORIGIN back to x=0, y=0. See SET_DRAW_ORIGIN for further information.
staticclearVehicleXenonLightsCustomColor(vehicle:Dynamic):Dynamic
Removes vehicle xenon lights custom RGB color.
staticcloneTimecycleModifier(sourceModifierName:String, clonedModifierName:String):Int
staticcommitRuntimeTexture(tex:Int):Dynamic
Commits the backing pixels to the specified runtime texture.
staticcreateAudioSubmix(name:String):Int
Creates an audio submix with the specified name, or gets the existing audio submix by that name.
staticcreateDryVolume(xMin:Float, yMin:Float, zMin:Float, xMax:Float, yMax:Float, zMax:Float):Int
Creates a volume where water effects do not apply.
Useful for preventing water collisions from flooding areas underneath them.
This has no effect on waterquads, only water created from drawables and collisions.
Don't create volumes when your local ped is swimming (e.g. use IS_PED_SWIMMING in your scripts before you call this)
staticcreateDui(url:String, width:Int, height:Int):Int
Creates a DUI browser. This can be used to draw on a runtime texture using CREATE_RUNTIME_TEXTURE_FROM_DUI_HANDLE.
staticcreateRuntimeTexture(txd:Int, txn:String, width:Int, height:Int):Int
Creates a blank runtime texture.
staticcreateRuntimeTextureFromDuiHandle(txd:Int, txn:String, duiHandle:String):Int
Creates a runtime texture from a DUI handle.
staticcreateRuntimeTextureFromImage(txd:Int, txn:String, fileName:String):Int
Creates a runtime texture from the specified file in the current resource or a base64 data URL.
staticcreateRuntimeTxd(name:String):Int
Creates a runtime texture dictionary with the specified name.
Example:
local txd = CreateRuntimeTxd('meow')staticcreateTimecycleModifier(modifierName:String):Int
Create a clean timecycle modifier. See SET_TIMECYCLE_MODIFIER_VAR to add variables.
staticdeleteFunctionReference(referenceIdentity:String):Dynamic
staticdeleteResourceKvp(key:String):Dynamic
staticdeleteResourceKvpNoSync(key:String):Dynamic
Nonsynchronous DELETE_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.
staticdisableEditorRuntime():Dynamic
Disables the editor runtime mode, changing game behavior to not track entity metadata.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticdisableIdleCamera(state:Bool):Dynamic
Disables the game's afk camera that starts panning around after 30 seconds of inactivity.
staticdisableRawKeyThisFrame(rawKeyIndex:Int):Bool
Disables the specified rawKeyIndex, making it not trigger the regular IS_RAW_KEY_* natives.
Virtual key codes can be found here
staticdisableVehiclePassengerIdleCamera(state:Bool):Dynamic
Disables the game's afk camera that starts panning around after 30 seconds of inactivity(While riding in a car as a passenger)
staticdisableWorldhorizonRendering(state:Bool):Dynamic
Disables the game's world horizon lods rendering (see farlods.#dd).
Using the island hopper natives might also affect this state.
staticdoesTextureExist(textureId:Int):Dynamic
In compare to 0x31DC8D3F216D8509 return true if texture its created when 0x31DC8D3F216D8509 return true if you put there any id in valid range
staticdoesTimecycleModifierHasVar(modifierName:String, varName:String):Bool
staticdoesTrainStopAtStations(train:Dynamic):Bool
staticdoesVehicleUseFuel(vehicle:Dynamic):Bool
Checks whether the vehicle consumes fuel. The check is done based on petrol tank volume and vehicle type. Bicycles and vehicles with petrol tank volume equal to zero (only bicycles by default) do not use fuel. All other vehicles do.
You can customize petrol tank volume using SET_HANDLING_FLOAT/SET_VEHICLE_HANDLING_FLOAT natives with fieldName equal to fPetrolTankVolume.
staticdoorSystemGetActive():Dynamic
Returns a list of door system entries: a door system hash (see ADD_DOOR_TO_SYSTEM) and its object handle.
The data returned adheres to the following layout:
[{doorHash1, doorHandle1}, ..., {doorHashN, doorHandleN}]staticdoorSystemGetSize():Int
staticdrawBox(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, red:Int, green:Int, blue:Int, alpha:Int):Dynamic
staticdrawCorona(posX:Float, posY:Float, posZ:Float, size:Float, alpha:Int, red:Int, green:Int, blue:Int, intensity:Float, zBias:Float, dirX:Float, dirY:Float, dirZ:Float, viewThreshold:Float, innerAngle:Float, outerAngle:Float, flags:Int):Dynamic
Allows drawing advanced light effects, known as coronas, which support flares, volumetric lighting, and customizable glow properties.
staticdrawGizmo(matrixPtr:Int, id:String):Bool
Draws a gizmo. This function supports SDK infrastructure and is not intended to be used directly from your code.
This should be used from JavaScript or another language supporting mutable buffers like ArrayBuffer.
Matrix layout is as follows:
- Element [0], [1] and [2] should represent the right vector.
- Element [4], [5] and [6] should represent the forward vector.
- Element [8], [9] and [10] should represent the up vector.
- Element [12], [13] and [14] should represent X, Y and Z translation coordinates.
- All other elements should be [0, 0, 0, 1].
staticdrawGlowSphere(posX:Float, posY:Float, posZ:Float, radius:Float, colorR:Int, colorG:Int, colorB:Int, intensity:Float, invert:Bool, marker:Bool):Dynamic
Draw a glow sphere this frame. Up to 256 per single frame.
staticdrawLine(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, red:Int, green:Int, blue:Int, alpha:Int):Dynamic
staticdrawLine2D(x1:Float, y1:Float, x2:Float, y2:Float, width:Float, r:Int, g:Int, b:Int, a:Int):Dynamic
Like DRAW_RECT, but it's a line.
staticdrawPoly(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, x3:Float, y3:Float, z3:Float, red:Int, green:Int, blue:Int, alpha:Int):Dynamic
staticdrawRectRotated(x:Float, y:Float, width:Float, height:Float, rotation:Float, r:Int, g:Int, b:Int, a:Int):Dynamic
DRAW_RECT, but with a rotation. Seems to be broken.
staticduplicateFunctionReference(referenceIdentity:String):String
staticenableEditorRuntime():Dynamic
Enables the editor runtime mode, changing game behavior to track entity metadata.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticendFindKvp(handle:Int):Dynamic
staticendFindObject(findHandle:Int):Dynamic
staticendFindPed(findHandle:Int):Dynamic
staticendFindPickup(findHandle:Int):Dynamic
staticendFindVehicle(findHandle:Int):Dynamic
staticensureEntityStateBag(entity:Dynamic):Dynamic
Internal function for ensuring an entity has a state bag.
staticenterCursorMode():Dynamic
Enters cursor mode, suppressing mouse movement to the game and displaying a mouse cursor instead. This function supports
SDK infrastructure and is not intended to be used directly from your code.
staticexecuteCommand(commandString:String):Dynamic
Depending on your use case you may need to use add_acl resource.<your_resource_name> command.<command_name> allow to use this native in your resource.
staticexperimentalLoadCloneCreate(data:String, objectId:Int, tree:String):Dynamic
This native is not implemented.
staticfindFirstObject(outEntity:Dynamic):Int
staticfindFirstPed(outEntity:Dynamic):Int
staticfindFirstPickup(outEntity:Dynamic):Int
staticfindFirstVehicle(outEntity:Dynamic):Int
staticfindKvp(handle:Int):String
staticfindNextObject(findHandle:Int, outEntity:Dynamic):Bool
staticfindNextPed(findHandle:Int, outEntity:Dynamic):Bool
staticfindNextPickup(findHandle:Int, outEntity:Dynamic):Bool
staticfindNextVehicle(findHandle:Int, outEntity:Dynamic):Bool
staticformatStackTrace(traceData:Dynamic):String
An internal function for converting a stack trace object to a string.
staticgetActivePlayers():Dynamic
Returns all player indices for 'active' physical players known to the client.
The data returned adheres to the following layout:
[127, 42, 13, 37]staticgetAllRopes():Dynamic
Returns all rope handles. The data returned adheres to the following layout:
[ 770, 1026, 1282, 1538, 1794, 2050, 2306, 2562, 2818, 3074, 3330, 3586, 3842, 4098, 4354, 4610, ...]staticgetAllTrackJunctions():Dynamic
Returns all track junctions on the client
The data returned adheres to the following structure:
[1, 2, 4, 6, 69, 420]staticgetAllVehicleModels():Dynamic
Returns all registered vehicle model names, including non-dlc vehicles and custom vehicles in no particular order.
Example output
["dubsta", "dubsta2", "dubsta3", "myverycoolcar", "sultan", "sultanrs", ...]
This native will not return vehicles that are unregistered (i.e from a resource being stopped) during runtime.
staticgetAmbientVehicleRangeMultiplier():Float
A getter for SET_AMBIENT_VEHICLE_RANGE_MULTIPLIER_THIS_FRAME.
staticgetAspectRatio():Float
Gets the current aspect ratio
local ratio = GetAspectRatio()
print(string.format("%.2f", ratio))staticgetCalmingQuadAtCoords(x:Float, y:Float):Int
This native returns the index of a calming quad if the given point is inside its bounds.
staticgetCalmingQuadBounds(waterQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool
staticgetCalmingQuadCount():Int
staticgetCalmingQuadDampening(waterQuad:Int, calmingQuadDampening:Dynamic):Bool
staticgetCamMatrix(camera:Dynamic, rightVector:Dynamic, forwardVector:Dynamic, upVector:Dynamic, position:Dynamic):Dynamic
Returns the world matrix of the specified camera. To turn this into a view matrix, calculate the inverse.
staticgetClientConfigBool(flagIndex:Int):Bool
Returns whether a specific client configuration flag is currently enabled.
You can find a list of configuration flags in SET_CLIENT_CONFIG_BOOL.
staticgetClosestTrackNodes(position:Dynamic, radius:Float):Dynamic
Get all track nodes and their track ids within the radius of the specified coordinates.
staticgetConvar(varName:String, default_:String):String
Can be used to get a console variable of type char*, for example a string.
staticgetConvarBool(varName:String, defaultValue:Bool):Bool
Can be used to get a console variable casted back to bool.
staticgetConvarFloat(varName:String, defaultValue:Float):Float
This will have floating point inaccuracy.
staticgetConvarInt(varName:String, default_:Int):Int
Can be used to get a console variable casted back to int (an integer value).
staticgetCurrentScreenResolution(width:Dynamic, height:Dynamic):Dynamic
Gets the current screen resolution.
local width, height = GetCurrentScreenResolution()
print(string.format("Current screen resolution: %dx%d", width, height))
staticgetCurrentServerEndpoint():String
Returns the peer address of the remote game server that the user is currently connected to.
staticgetDuiHandle(duiObject:Int):String
Returns the NUI window handle for a specified DUI browser object.
staticgetEntitiesInRadius(x:Float, y:Float, z:Float, radius:Float, entityType:Int, sortByDistance:Bool, models:Dynamic):Dynamic
Supported types
- [1] : Peds (including animals) and players.
- [2] : Vehicles.
- [3] : Objects (props), doors, and projectiles.
Coordinates need to be send unpacked (x,y,z)
-- Define the allowed model hashes
local allowedModelHashes = { GetHashKey("p_crate03x"), GetHashKey("p_crate22x") }
-- Get the player's current coordinates
local playerCoords = GetEntityCoords(PlayerPedId())
-- Retrieve all entities of type Object (type 3) within a radius of 10.0 units
-- that match the allowed model hashes
-- and sort output entities by distance
local entities = GetEntitiesInRadius(playerCoords.x, playerCoords.y, playerCoords.z, 10.0, 3, true, allowedModelHashes)
-- Iterate through the list of entities and print their ids
for i = 1, #entities do
local entity = entities[i]
print(entity)
end
staticgetEntityAddress(entity:Dynamic):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Returns the memory address of an entity.
This native is intended for singleplayer debugging, and may not be available during multiplayer.
staticgetEntityFromStateBagName(bagName:String):Dynamic
Returns the entity handle for the specified state bag name. For use with ADD_STATE_BAG_CHANGE_HANDLER.
staticgetEntityIndexFromMapdata(mapdata:Int, entity:Int):Int
Returns the transient entity index for a specified mapdata/entity pair.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticgetEntityMapdataOwner(entity:Dynamic, mapdataHandle:Dynamic, entityHandle:Dynamic):Bool
Retrieves the map data and entity handles from a specific entity.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticgetExternalKvpFloat(resource:String, key:String):Float
A getter for SET_RESOURCE_KVP_FLOAT, but for a specified resource.
staticgetExternalKvpInt(resource:String, key:String):Int
A getter for SET_RESOURCE_KVP_INT, but for a specified resource.
staticgetExternalKvpString(resource:String, key:String):String
A getter for SET_RESOURCE_KVP, but for a specified resource.
staticgetFallDamageLandOnFootMultiplier():Float
A getter for SET_FALL_DAMAGE_LAND_ON_FOOT_MULTIPLIER.
staticgetFuelConsumptionRateMultiplier():Float
staticgetFuelConsumptionState():Bool
staticgetGameBuildNumber():Int
Returns the internal build number of the current game being executed.
Possible values:
- FiveM 1604 2060 2189 2372 2545 2612 2699 2802 2944 3095 3258 3323 3407 3570 3751 3788
- RedM 1311 1355 1436 1491
- LibertyM * 43
- FXServer * 0
staticgetGameName():String
Returns the current game being executed.
Possible values:
| Return value | Meaning |
|---|
| ------------ | ------------------------------ |
|---|
fxserver | Server-side code ('Duplicity') |
|---|
fivem | FiveM for GTA V |
|---|
libertym | LibertyM for GTA IV |
|---|
redm | RedM for Red Dead Redemption 2 |
|---|
staticgetGamePool(poolName:String):Dynamic
Returns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as
follows:
[ 770, 1026, 1282, 1538, 1794, 2050, 2306, 2562, 2818, 3074, 3330, 3586, 3842, 4098, 4354, 4610, ...]
Supported pools
CPed: Peds (including animals) and players.CObject: Objects (props), doors, and projectiles.CNetObject: Networked objectsCVehicle: Vehicles.CPickup: Pickups.
staticgetHudComponentAlign(id:Int, horizontalAlign:Dynamic, verticalAlign:Dynamic):Dynamic
See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.
staticgetHudComponentName(id:Int):String
staticgetHudComponentSize(id:Int):Dynamic
staticgetInstanceId():Int
staticgetInteriorEntitiesExtents(interiorId:Int, bbMinX:Dynamic, bbMinY:Dynamic, bbMinZ:Dynamic, bbMaxX:Dynamic, bbMaxY:Dynamic, bbMaxZ:Dynamic):Dynamic
staticgetInteriorPortalCornerPosition(interiorId:Int, portalIndex:Int, cornerIndex:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic
staticgetInteriorPortalCount(interiorId:Int):Int
staticgetInteriorPortalEntityArchetype(interiorId:Int, portalIndex:Int, entityIndex:Int):Int
staticgetInteriorPortalEntityCount(interiorId:Int, portalIndex:Int):Int
staticgetInteriorPortalEntityFlag(interiorId:Int, portalIndex:Int, entityIndex:Int):Int
staticgetInteriorPortalEntityPosition(interiorId:Int, portalIndex:Int, entityIndex:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic
staticgetInteriorPortalEntityRotation(interiorId:Int, portalIndex:Int, entityIndex:Int, rotX:Dynamic, rotY:Dynamic, rotZ:Dynamic, rotW:Dynamic):Dynamic
staticgetInteriorPortalFlag(interiorId:Int, portalIndex:Int):Int
staticgetInteriorPortalRoomFrom(interiorId:Int, portalIndex:Int):Int
staticgetInteriorPortalRoomTo(interiorId:Int, portalIndex:Int):Int
staticgetInteriorPosition(interiorId:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic
staticgetInteriorRoomCount(interiorId:Int):Int
staticgetInteriorRoomExtents(interiorId:Int, roomIndex:Int, bbMinX:Dynamic, bbMinY:Dynamic, bbMinZ:Dynamic, bbMaxX:Dynamic, bbMaxY:Dynamic, bbMaxZ:Dynamic):Dynamic
staticgetInteriorRoomFlag(interiorId:Int, roomIndex:Int):Int
staticgetInteriorRoomIndexByHash(interiorId:Int, roomHash:Int):Int
staticgetInteriorRoomName(interiorId:Int, roomIndex:Int):String
staticgetInteriorRoomTimecycle(interiorId:Int, roomIndex:Int):Int
staticgetInteriorRotation(interiorId:Int, rotx:Dynamic, rotY:Dynamic, rotZ:Dynamic, rotW:Dynamic):Dynamic
staticgetInvokingResource():String
staticgetMapZoomDataLevel(index:Int, zoomScale:Dynamic, zoomSpeed:Dynamic, scrollSpeed:Dynamic, tilesX:Dynamic, tilesY:Dynamic):Bool
Returns the zoom level data by index from mapzoomdata.meta file.
staticgetMapdataEntityHandle(mapDataHash:Int, entityInternalIdx:Int, entityHandle:Dynamic):Bool
Retrieves the map data entity handle.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticgetMapdataEntityMatrix(mapDataHash:Int, entityInternalIdx:Int, matrixPtr:Int):Bool
Returns mapdata's entity matrix. This function supports SDK infrastructure and is not intended to be used directly from your code.
This should be used from JavaScript or another language supporting mutable buffers like ArrayBuffer.
Matrix layout is as follows:
- Element [0], [1] and [2] should represent the right vector.
- Element [4], [5] and [6] should represent the forward vector.
- Element [8], [9] and [10] should represent the up vector.
- Element [12], [13] and [14] should represent X, Y and Z translation coordinates.
- All other elements should be [0, 0, 0, 1].
staticgetMapdataFromHashKey(mapdataHandle:Int):Int
Returns the transient map data index for a specified hash.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticgetNetworkWalkMode():Dynamic
staticgetNuiCursorPosition(x:Dynamic, y:Dynamic):Dynamic
staticgetNumResourceMetadata(resourceName:String, metadataKey:String):Int
Gets the amount of metadata values with the specified key existing in the specified resource's manifest.
See also: Resource manifest
staticgetNumResources():Int
staticgetNumberOfPedCollectionDrawableVariations(ped:Dynamic, componentId:Int, collection:String):Int
An analogue of GET_NUMBER_OF_PED_DRAWABLE_VARIATIONS that returns number of drawable variations inside a single collection instead of the total number across all collections.
staticgetNumberOfPedCollectionPropDrawableVariations(ped:Dynamic, anchorPoint:Int, collection:String):Int
An analogue of GET_NUMBER_OF_PED_PROP_DRAWABLE_VARIATIONS that returns number of prop variations inside a single collection instead of the total number across all collections.
staticgetNumberOfPedCollectionPropTextureVariations(ped:Dynamic, anchorPoint:Int, collection:String, propIndex:Int):Int
An alternative to GET_NUMBER_OF_PED_PROP_TEXTURE_VARIATIONS that uses local collection indexing instead of the global one.
staticgetNumberOfPedCollectionTextureVariations(ped:Dynamic, componentId:Int, collection:String, drawableId:Int):Int
An alternative to GET_NUMBER_OF_PED_TEXTURE_VARIATIONS that uses local collection indexing instead of the global one.
staticgetParkedVehicleDensityMultiplier():Float
A getter for SET_PARKED_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME.
staticgetPauseMapPointerWorldPosition():Dynamic
Returns the world position the pointer is hovering on the pause map.
staticgetPedBoneMatrix(ped:Dynamic, boneId:Int, forwardVector:Dynamic, rightVector:Dynamic, upVector:Dynamic, position:Dynamic):Dynamic
Returns the bone matrix of the specified bone id. usefull for entity attachment
staticgetPedCollectionLocalIndexFromDrawable(ped:Dynamic, componentId:Int, drawableId:Int):Int
Gets local index inside a collection (which can be obtained using GET_PED_COLLECTION_NAME_FROM_DRAWABLE) for the given global drawable ID. The collection name and index are used in functions like SET_PED_COLLECTION_COMPONENT_VARIATION.
staticgetPedCollectionLocalIndexFromProp(ped:Dynamic, anchorPoint:Int, propIndex:Int):Int
Gets local index inside a collection (which can be obtained using GET_PED_COLLECTION_NAME_FROM_PROP) for the given global prop index. The collection name and index are used in functions like SET_PED_COLLECTION_PROP_INDEX.
staticgetPedCollectionName(ped:Dynamic, index:Int):String
Returns name of collection under given index for the given Ped.
Collections are groups of drawable components or props available for the given Ped. Usually collection corresponds to a certain DLC or the base game. See SET_PED_COLLECTION_COMPONENT_VARIATION, SET_PED_COLLECTION_PROP_INDEX, GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS etc natives for more details on how to work with collections.
GET_PED_COLLECTION_NAME can be used together with GET_PED_COLLECTIONS_COUNT to list all collections attached to Ped.
staticgetPedCollectionNameFromDrawable(ped:Dynamic, componentId:Int, drawableId:Int):String
Gets collection name for the given global drawable ID. Together with GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE is used to get collection and local index (inside the given collection) of the drawable. The collection name and index are used in functions like SET_PED_COLLECTION_COMPONENT_VARIATION.
staticgetPedCollectionNameFromProp(ped:Dynamic, anchorPoint:Int, propIndex:Int):String
Gets collection name for the given global prop index. Together with GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP is used to get collection and local index (inside the given collection) of the prop. The collection name and index are used in functions like SET_PED_COLLECTION_PROP_INDEX.
staticgetPedCollectionsCount(ped:Dynamic):Int
Returns number of variation collections available for the given Ped.
Collections are groups of drawable components or props available for the given Ped. Usually collection corresponds to a certain DLC or the base game. See SET_PED_COLLECTION_COMPONENT_VARIATION, SET_PED_COLLECTION_PROP_INDEX, GET_NUMBER_OF_PED_COLLECTION_DRAWABLE_VARIATIONS etc natives for more details on how to work with collections.
GET_PED_COLLECTIONS_COUNT can be used together with GET_PED_COLLECTION_NAME to list all collections attached to Ped.
staticgetPedDecorations(ped:Dynamic):Dynamic
Returns a list of decorations applied to a ped.
The data returned adheres to the following layout:
[ [ collectionHash1, overlayHash1 ], ..., [c ollectionHashN, overlayHashN ] ]
This command will return undefined data if invoked on a remote player ped.
staticgetPedDrawableGlobalIndexFromCollection(ped:Dynamic, componentId:Int, collection:String, drawableId:Int):Int
Returns global drawable index based on the local one. Is it a reverse to GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.
Drawables are stored inside collections. Each collection usually corresponds to a certain DCL or the base game.
If all drawables from all collections are placed into one continuous array - the global index will correspond to the index of drawable in such array. Local index is index of drawable in this array relative to the start of the given collection.
staticgetPedDrawableVariationCollectionLocalIndex(ped:Dynamic, componentId:Int):Int
An analogue to GET_PED_DRAWABLE_VARIATION that returns collection local drawable index (inside GET_PED_DRAWABLE_VARIATION_COLLECTION_NAME collection) instead of the global drawable index.
staticgetPedDrawableVariationCollectionName(ped:Dynamic, componentId:Int):String
An analogue to GET_PED_DRAWABLE_VARIATION that returns collection name instead of the global drawable index.
Should be used together with GET_PED_DRAWABLE_VARIATION_COLLECTION_LOCAL_INDEX.
staticgetPedFaceFeature(ped:Dynamic, index:Int):Float
A getter for _SET_PED_FACE_FEATURE. Returns 0.0 if fails to get.
staticgetPedHairHighlightColor(ped:Dynamic):Int
A getter for _SET_PED_HAIR_COLOR. Returns -1 if fails to get.
staticgetPedHeadOverlayData(ped:Dynamic, index:Int, overlayValue:Dynamic, colourType:Dynamic, firstColour:Dynamic, secondColour:Dynamic, overlayOpacity:Dynamic):Bool
A getter for SET_PED_HEAD_OVERLAY and _SET_PED_HEAD_OVERLAY_COLOR natives.
staticgetPedMovementClipset(ped:Dynamic):Int
staticgetPedPropCollectionLocalIndex(ped:Dynamic, anchorPoint:Int):Int
An analogue to GET_PED_PROP_INDEX that returns collection local prop index (inside GET_PED_PROP_COLLECTION_NAME collection) instead of the global prop index.
staticgetPedPropCollectionName(ped:Dynamic, anchorPoint:Int):String
An analogue to GET_PED_PROP_INDEX that returns collection name instead of the global drawable index.
Should be used together with GET_PED_PROP_COLLECTION_LOCAL_INDEX.
staticgetPedPropGlobalIndexFromCollection(ped:Dynamic, anchorPoint:Int, collection:String, propIndex:Int):Int
Returns global prop index based on the local one. Is it a reverse to GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.
Props are stored inside collections. Each collection usually corresponds to a certain DCL or the base game.
If all props from all collections are placed into one continuous array - the global index will correspond to the index of the prop in such array. Local index is index of the prop in this array relative to the start of the given collection.
staticgetPedScale(ped:Dynamic):Float
staticgetPedWetness(ped:Dynamic):Float
staticgetPedWetnessHeight(ped:Dynamic):Float
staticgetPlayerFromServerId(serverId:Int):Dynamic
Gets a local client's Player ID from its server ID counterpart, assuming the passed serverId exists on the client.
If no matching client is found, or an invalid value is passed over as the serverId native's parameter, the native result will be -1.
It's worth noting that this native method can only retrieve information about clients that are culled to the connected client.
staticgetPlayerFromStateBagName(bagName:String):Int
On the server this will return the players source, on the client it will return the player handle.
staticgetPlayerInvincible2(player:Dynamic):Bool
Unlike GET_PLAYER_INVINCIBLE this native gets both SET_PLAYER_INVINCIBLE_KEEP_RAGDOLL_ENABLED and SET_PLAYER_INVINCIBLE invincibility state.
staticgetPlayerMaxStamina(playerId:Dynamic):Float
staticgetPlayerMeleeWeaponDamageModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER.
staticgetPlayerMeleeWeaponDefenseModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_MELEE_WEAPON_DEFENSE_MODIFIER.
staticgetPlayerServerId(player:Dynamic):Int
staticgetPlayerStamina(playerId:Dynamic):Float
staticgetPlayerVehicleDamageModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_VEHICLE_DAMAGE_MODIFIER.
staticgetPlayerVehicleDefenseModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_VEHICLE_DEFENSE_MODIFIER.
staticgetPlayerWeaponDamageModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_WEAPON_DAMAGE_MODIFIER.
staticgetPlayerWeaponDefenseModifier(playerId:Dynamic):Float
A getter for SET_PLAYER_WEAPON_DEFENSE_MODIFIER.
staticgetPlayerWeaponDefenseModifier2(playerId:Dynamic):Float
A getter for _SET_PLAYER_WEAPON_DEFENSE_MODIFIER_2.
staticgetRandomVehicleDensityMultiplier():Float
A getter for SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME.
Same as vehicle density multiplier.
staticgetRegisteredCommands():Dynamic
Returns all commands that are registered in the command system.
The data returned adheres to the following layout:
[
{
"name": "cmdlist",
"resource": "resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "resource_2",
"arity" = -1,
}
]staticgetResourceByFindIndex(findIndex:Int):String
staticgetResourceCommands(resource:String):Dynamic
Returns all commands registered by the specified resource.
The data returned adheres to the following layout:
[
{
"name": "cmdlist",
"resource": "example_resource",
"arity" = -1,
},
{
"name": "command1"
"resource": "example_resource2",
"arity" = -1,
}
]staticgetResourceMetadata(resourceName:String, metadataKey:String, index:Int):String
Gets the metadata value at a specified key/index from a resource's manifest.
See also: Resource manifest
staticgetResourceState(resourceName:String):String
Returns the current state of the specified resource.
staticgetRopeFlags(rope:Int):Int
enum eRopeFlags
{
DrawShadowEnabled = 2,
Breakable = 4,
RopeUnwindingFront = 8,
RopeWinding = 32
}staticgetRopeLengthChangeRate(rope:Int):Float
staticgetRopeTimeMultiplier(rope:Int):Float
staticgetRopeUpdateOrder(rope:Int):Int
staticgetRuntimeTexturePitch(tex:Int):Int
Gets the row pitch of the specified runtime texture, for use when creating data for SET_RUNTIME_TEXTURE_ARGB_DATA.
staticgetScenarioPedDensityMultiplier():Float
A getter for SET_SCENARIO_PED_DENSITY_MULTIPLIER_THIS_FRAME.
staticgetShapeTestResultIncludingMaterial(shapeTestHandle:Int, hit:Dynamic, endCoords:Dynamic, surfaceNormal:Dynamic, materialHash:Dynamic, entityHit:Dynamic):Int
Returns the result of a shape test, also returning the material of any touched surface.
When used with an asynchronous shape test, this native should be looped until returning 0 or 2, after which the handle is invalidated.
Unless the return value is 2, the other return values are undefined.
staticgetStateBagKeys(bagName:String):Dynamic
staticgetTimecycleModifierCount():Int
staticgetTimecycleModifierIndexByName(modifierName:String):Int
staticgetTimecycleModifierNameByIndex(modifierIndex:Int):String
staticgetTimecycleModifierVar(modifierName:String, varName:String, value1:Dynamic, value2:Dynamic):Bool
staticgetTimecycleModifierVarCount(modifierName:String):Int
staticgetTimecycleModifierVarNameByIndex(modifierName:String, modifierVarIndex:Int):String
staticgetTimecycleVarCount():Int
Returns the amount of variables available to be applied on timecycle modifiers.
staticgetTrackBrakingDistance(track:Int):Float
staticgetTrackMaxSpeed(track:Int):Float
staticgetTrackNodeCoords(trackIndex:Int, trackNode:Int, coords:Dynamic):Dynamic
Gets the coordinates of a specific track node.
staticgetTrainCurrentTrackNode(train:Dynamic):Int
staticgetTrainDoorOpenRatio(train:Dynamic, doorIndex:Int):Float
Gets the ratio that a door is open for on a train.
staticgetTrainState(train:Dynamic):Int
staticgetTrainTrackIndex(train:Dynamic):Int
staticgetVehicleAlarmTimeLeft(vehicle:Dynamic):Int
staticgetVehicleCheatPowerIncrease(vehicle:Dynamic):Float
A getter for SET_VEHICLE_CHEAT_POWER_INCREASE.
staticgetVehicleClutch(vehicle:Dynamic):Float
staticgetVehicleCurrentGear(vehicle:Dynamic):Int
staticgetVehicleCurrentRpm(vehicle:Dynamic):Float
staticgetVehicleDashboardBoost():Float
staticgetVehicleDashboardCurrentGear():Float
Retrieves the current gear displayed on the dashboard of the vehicle the player is in, returned as a float. This value represents the gear shown in the instrument cluster, such as "R" (0.0) or positive values (e.g., 1.0, 2.0, etc.) for drive gears.
staticgetVehicleDashboardFuel():Float
staticgetVehicleDashboardLights():Int
Gets the state of the player vehicle's dashboard lights as a bit set
indicator_left = 1
indicator_right = 2
handbrakeLight = 4
engineLight = 8
ABSLight = 16
gasLight = 32
oilLight = 64
headlights = 128
highBeam = 256
batteryLight = 512
staticgetVehicleDashboardOilPressure():Float
staticgetVehicleDashboardOilTemp():Float
staticgetVehicleDashboardRpm():Float
staticgetVehicleDashboardSpeed(vehicle:Dynamic):Float
staticgetVehicleDashboardTemp():Float
staticgetVehicleDashboardVacuum():Float
staticgetVehicleDrawnWheelAngleMult(vehicle:Dynamic):Float
Gets a vehicle's multiplier used with a wheel's GET_VEHICLE_WHEEL_STEERING_ANGLE to determine the angle the wheel is rendered.
staticgetVehicleEngineTemperature(vehicle:Dynamic):Float
staticgetVehicleFuelLevel(vehicle:Dynamic):Float
staticgetVehicleGravityAmount(vehicle:Dynamic):Float
staticgetVehicleHandbrake(vehicle:Dynamic):Bool
staticgetVehicleHandlingFloat(vehicle:Dynamic, class_:String, fieldName:String):Float
Returns the effective handling data of a vehicle as a floating-point value.
Example: local fSteeringLock = GetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSteeringLock')
staticgetVehicleHandlingInt(vehicle:Dynamic, class_:String, fieldName:String):Int
Returns the effective handling data of a vehicle as an integer value.
Example: local modelFlags = GetVehicleHandlingInt(vehicle, 'CHandlingData', 'strModelFlags')
staticgetVehicleHandlingVector(vehicle:Dynamic, class_:String, fieldName:String):Dynamic
Returns the effective handling data of a vehicle as a vector value.
Example: local inertiaMultiplier = GetVehicleHandlingVector(vehicle, 'CHandlingData', 'vecInertiaMultiplier')
staticgetVehicleHasFlag(vehicle:Dynamic, flagIndex:Int):Dynamic
Note: Flags are not the same based on your gamebuild. Please see here to see a complete list of all vehicle flags.
Get vehicle.meta flag by index. Useful examples include FLAG_LAW_ENFORCEMENT (31), FLAG_RICH_CAR (36), FLAG_IS_ELECTRIC (43), FLAG_IS_OFFROAD_VEHICLE (48).
staticgetVehicleHighGear(vehicle:Dynamic):Int
staticgetVehicleIndicatorLights(vehicle:Dynamic):Int
Gets the vehicle indicator light state. 0 = off, 1 = left, 2 = right, 3 = both
staticgetVehicleLightMultiplier(vehicle:Dynamic):Float
staticgetVehicleNextGear(vehicle:Dynamic):Int
staticgetVehicleNumberOfWheels(vehicle:Dynamic):Int
staticgetVehicleOilLevel(vehicle:Dynamic):Float
staticgetVehicleSteeringAngle(vehicle:Dynamic):Float
staticgetVehicleSteeringScale(vehicle:Dynamic):Float
staticgetVehicleThrottleOffset(vehicle:Dynamic):Float
staticgetVehicleTopSpeedModifier(vehicle:Dynamic):Float
A getter for MODIFY_VEHICLE_TOP_SPEED. Returns -1.0 if a modifier is not set.
staticgetVehicleTurboPressure(vehicle:Dynamic):Float
staticgetVehicleType(vehicle:Dynamic):String
Returns the type of the passed vehicle.
For client scripts, reference the more detailed GET_VEHICLE_TYPE_RAW native.
Vehicle types
- automobile
- bike
- boat
- heli
- plane
- submarine
- trailer
- train
staticgetVehicleTypeRaw(vehicle:Dynamic):Int
Returns the model type of the vehicle as defined by:
enum VehicleType
{
VEHICLE_TYPE_NONE = -1,
VEHICLE_TYPE_CAR = 0,
VEHICLE_TYPE_PLANE = 1,
VEHICLE_TYPE_TRAILER = 2,
VEHICLE_TYPE_QUADBIKE = 3,
VEHICLE_TYPE_DRAFT = 4,
VEHICLE_TYPE_SUBMARINECAR = 5,
VEHICLE_TYPE_AMPHIBIOUS_AUTOMOBILE = 6,
VEHICLE_TYPE_AMPHIBIOUS_QUADBIKE = 7,
VEHICLE_TYPE_HELI = 8,
VEHICLE_TYPE_BLIMP = 9,
VEHICLE_TYPE_AUTOGYRO = 10,
VEHICLE_TYPE_BIKE = 11,
VEHICLE_TYPE_BICYCLE = 12,
VEHICLE_TYPE_BOAT = 13,
VEHICLE_TYPE_TRAIN = 14,
VEHICLE_TYPE_SUBMARINE = 15,
};staticgetVehicleWheelBrakePressure(vehicle:Dynamic, wheelIndex:Int):Float
Gets brake pressure of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
Normal values around 1.0f when braking.
staticgetVehicleWheelFlags(vehicle:Dynamic, wheelIndex:Int):Int
Gets the flags of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelHealth(vehicle:Dynamic, wheelIndex:Int):Float
staticgetVehicleWheelIsPowered(vehicle:Dynamic, wheelIndex:Int):Bool
Gets whether the wheel is powered.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
This is a shortcut to a flag in GET_VEHICLE_WHEEL_FLAGS.
staticgetVehicleWheelPower(vehicle:Dynamic, wheelIndex:Int):Float
Gets power being sent to a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelRimColliderSize(vehicle:Dynamic, wheelIndex:Int):Float
staticgetVehicleWheelRotationSpeed(vehicle:Dynamic, wheelIndex:Int):Float
Gets the rotation speed of a wheel.
This is used internally to calcuate GET_VEHICLE_WHEEL_SPEED.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelSize(vehicle:Dynamic):Float
Returns vehicle's wheels' size (size is the same for all the wheels, cannot get/set specific wheel of vehicle).
Only works on non-default wheels (returns 0 in case of default wheels).
staticgetVehicleWheelSpeed(vehicle:Dynamic, wheelIndex:Int):Float
Gets speed of a wheel at the tyre.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelSteeringAngle(vehicle:Dynamic, wheelIndex:Int):Float
Gets steering angle of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelSurfaceMaterial(vehicle:Dynamic, wheelIndex:Int):Int
staticgetVehicleWheelSuspensionCompression(vehicle:Dynamic, wheelIndex:Int):Float
Gets the current suspension compression of a wheel.
Returns a positive value. 0 means the suspension is fully extended, the wheel is off the ground.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelTireColliderSize(vehicle:Dynamic, wheelIndex:Int):Float
staticgetVehicleWheelTireColliderWidth(vehicle:Dynamic, wheelIndex:Int):Float
staticgetVehicleWheelTractionVectorLength(vehicle:Dynamic, wheelIndex:Int):Float
Gets the traction vector length of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticgetVehicleWheelWidth(vehicle:Dynamic):Float
Returns vehicle's wheels' width (width is the same for all the wheels, cannot get/set specific wheel of vehicle).
Only works on non-default wheels (returns 0 in case of default wheels).
staticgetVehicleWheelXOffset(vehicle:Dynamic, wheelIndex:Int):Float
Returns the offset of the specified wheel relative to the wheel's axle center.
staticgetVehicleWheelYRotation(vehicle:Dynamic, wheelIndex:Int):Float
staticgetVehicleWheelieState(vehicle:Dynamic):Int
List of known states:
1: Not wheeling.
65: Vehicle is ready to do wheelie (burnouting).
129: Vehicle is doing wheelie.staticgetVehicleXenonLightsCustomColor(vehicle:Dynamic, red:Dynamic, green:Dynamic, blue:Dynamic):Bool
Returns vehicle xenon lights custom RGB color values. Do note this native doesn't return non-RGB colors that was set with _SET_VEHICLE_XENON_LIGHTS_COLOR.
staticgetWaterQuadAlpha(waterQuad:Int, a0:Dynamic, a1:Dynamic, a2:Dynamic, a3:Dynamic):Bool
staticgetWaterQuadAtCoords(x:Float, y:Float):Int
This native returns the index of a water quad if the given point is inside its bounds.
*
* *If you also want to check for water level, check out [`GetWaterQuadAtCoords_3d`](#\_0xF8E03DB8)
staticgetWaterQuadAtCoords3D(x:Float, y:Float, z:Float):Int
This alternative implementation of GetWaterQuadAtCoords also checks the height of the water level.
staticgetWaterQuadBounds(waterQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool
staticgetWaterQuadCount():Int
staticgetWaterQuadHasLimitedDepth(waterQuad:Int, hasLimitedDepth:Dynamic):Bool
staticgetWaterQuadIsInvisible(waterQuad:Int, isInvisible:Dynamic):Bool
staticgetWaterQuadLevel(waterQuad:Int, waterQuadLevel:Dynamic):Bool
*level is defined as "z" in water.xml
staticgetWaterQuadNoStencil(waterQuad:Int, noStencil:Dynamic):Bool
staticgetWaterQuadType(waterQuad:Int, waterType:Dynamic):Bool
Valid type definitions:
*
* * **0** Square
* * **1** Right triangle where the 90 degree angle is at maxX, minY
* * **2** Right triangle where the 90 degree angle is at minX, minY
* * **3** Right triangle where the 90 degree angle is at minX, maxY
* * **4** Right triangle where the 90 degree angle is at maxY, maxY
staticgetWaveQuadAmplitude(waveQuad:Int, waveQuadAmplitude:Dynamic):Bool
staticgetWaveQuadAtCoords(x:Float, y:Float):Int
This native returns the index of a wave quad if the given point is inside its bounds.
staticgetWaveQuadBounds(waveQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool
staticgetWaveQuadCount():Int
staticgetWaveQuadDirection(waveQuad:Int, directionX:Dynamic, directionY:Dynamic):Bool
staticgetWeaponComponentAccuracyModifier(componentHash:Int):Float
A getter for CWeaponAccuracyModifier in a weapon component.
staticgetWeaponComponentCameraHash(componentHash:Int):Int
A getter for CameraHash in a weapon scope component.
staticgetWeaponComponentDamageModifier(componentHash:Int):Float
A getter for CWeaponDamageModifier in a weapon component.
staticgetWeaponComponentRangeDamageModifier(componentHash:Int):Float
A getter for CWeaponFallOffModifier damage modifier value in a weapon component.
staticgetWeaponComponentRangeModifier(componentHash:Int):Float
A getter for CWeaponFallOffModifier range modifier value in a weapon component.
staticgetWeaponComponentReticuleHash(componentHash:Int):Int
A getter for ReticuleHash in a weapon scope component.
staticgetWeaponRecoilShakeAmplitude(weaponHash:Int):Float
A getter for the recoil shake amplitude of a weapon.
staticgetWorldCoordFromScreenCoord(screenX:Float, screenY:Float, worldVector:Dynamic, normalVector:Dynamic):Dynamic
Converts a screen coordinate into its relative world coordinate.
statichasMinimapOverlayLoaded(id:Int):Bool
Returns whether or not the specific minimap overlay has loaded.
staticisAceAllowed(object:String):Bool
staticisBigmapActive():Bool
Returns true if the minimap is currently expanded. False if it's the normal minimap state.
Use IsBigmapFull to check if the full map is currently revealed on the minimap.
staticisBigmapFull():Bool
staticisDisabledRawKeyDown(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is pressed down, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.
Virtual key codes can be found here
staticisDisabledRawKeyPressed(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is pressed, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.
Virtual key codes can be found here
staticisDisabledRawKeyReleased(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex was released, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.
Virtual key codes can be found here
staticisDisabledRawKeyUp(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is up, even if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME.
Virtual key codes can be found here
staticisDuiAvailable(duiObject:Int):Bool
Returns whether or not a browser is created for a specified DUI browser object.
staticisGameEnhancedVersion():Bool
staticisNuiFocusKeepingInput():Bool
Checks if keyboard input is enabled during NUI focus using SET_NUI_FOCUS_KEEP_INPUT.
staticisPedCollectionComponentVariationGen9Exclusive(ped:Dynamic, componentId:Int, collection:String, drawableId:Int):Dynamic
An alternative to IS_PED_COMPONENT_VARIATION_GEN9_EXCLUSIVE that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.
staticisPedCollectionComponentVariationValid(ped:Dynamic, componentId:Int, collection:String, drawableId:Int, textureId:Int):Dynamic
An alternative to IS_PED_COMPONENT_VARIATION_VALID that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.
staticisPedComponentVariationGen9Exclusive(ped:Dynamic, componentId:Int, drawableId:Int):Dynamic
staticisPrincipalAceAllowed(principal:String, object:String):Bool
staticisRawKeyDown(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is pressed down on the keyboard.
This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME
Virtual key codes can be found here
staticisRawKeyPressed(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is pressed on the keyboard.
This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME
Virtual key codes can be found here
staticisRawKeyReleased(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex was just released on the keyboard.
This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME
Virtual key codes can be found here
staticisRawKeyUp(rawKeyIndex:Int):Bool
Gets if the specified rawKeyIndex is up on the keyboard.
This will not be triggered if the key is disabled with DISABLE_RAW_KEY_THIS_FRAME
Virtual key codes can be found here
staticisStreamingFileReady(registerAs:String):Bool
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Returns whether an asynchronous streaming file registration completed.
staticisTrackSwitchedOff(track:Int):Dynamic
Getter for SWITCH_TRAIN_TRACK. Determines if ambient trains are able to spawn on this track.
staticisVehicleAlarmSet(vehicle:Dynamic):Bool
staticisVehicleEngineStarting(vehicle:Dynamic):Bool
staticisVehicleInteriorLightOn(vehicle:Dynamic):Bool
staticisVehicleNeedsToBeHotwired(vehicle:Dynamic):Bool
staticisVehiclePreviouslyOwnedByPlayer(vehicle:Dynamic):Bool
staticisVehicleWanted(vehicle:Dynamic):Bool
staticisVehicleWheelBrokenOff(vehicle:Dynamic, wheelIndex:Int):Bool
Getter for BREAK_OFF_VEHICLE_WHEEL.
staticleaveCursorMode():Dynamic
Leaves cursor mode. This function supports SDK infrastructure and is not intended to be used directly from your code.
staticloadResourceFile(resourceName:String, fileName:String):String
Reads the contents of a text file in a specified resource.
If executed on the client, this file has to be included in files in the resource manifest.
Example: local data = LoadResourceFile("devtools", "data.json")
staticloadWaterFromPath(resourceName:String, fileName:String):Bool
Define the xml in a resources fxmanifest, under the file(s) section.
staticmumbleAddVoiceChannelListen(channel:Int):Dynamic
Starts listening to the specified channel, when available.
staticmumbleAddVoiceTargetChannel(targetId:Int, channel:Int):Dynamic
Adds the specified channel to the target list for the specified Mumble voice target ID.
staticmumbleAddVoiceTargetPlayer(targetId:Int, player:Dynamic):Dynamic
Adds the specified player to the target list for the specified Mumble voice target ID.
staticmumbleAddVoiceTargetPlayerByServerId(targetId:Int, serverId:Int):Dynamic
Adds the specified player to the target list for the specified Mumble voice target ID.
staticmumbleClearVoiceChannel():Dynamic
staticmumbleClearVoiceTarget(targetId:Int):Dynamic
Clears the target list for the specified Mumble voice target ID.
staticmumbleClearVoiceTargetChannels(targetId:Int):Dynamic
Clears channels from the target list for the specified Mumble voice target ID.
staticmumbleClearVoiceTargetPlayers(targetId:Int):Dynamic
Clears players from the target list for the specified Mumble voice target ID.
staticmumbleDoesChannelExist(channel:Int):Bool
Check whether specified channel exists on the Mumble server.
staticmumbleGetTalkerProximity():Float
staticmumbleGetVoiceChannelFromServerId(serverId:Int):Int
Returns the mumble voice channel from a player's server id.
staticmumbleIsActive():Bool
staticmumbleIsConnected():Bool
This native will return true if the user succesfully connected to the voice server.
If the user disabled the voice-chat setting it will return false.
staticmumbleIsPlayerTalking(player:Dynamic):Bool
staticmumbleRemoveVoiceTargetChannel(targetId:Int, channel:Int):Dynamic
Removes the specified voice channel from the user's voice targets.
Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_CHANNEL
staticmumbleRemoveVoiceTargetPlayer(targetId:Int, player:Dynamic):Dynamic
Removes the specified player from the user's voice targets.
Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_PLAYER
staticmumbleRemoveVoiceTargetPlayerByServerId(targetId:Int, serverId:Int):Dynamic
Removes the specified player from the user's voice targets.
Performs the opposite operation of MUMBLE_ADD_VOICE_TARGET_PLAYER_BY_SERVER_ID
staticmumbleSetActive(state:Bool):Dynamic
staticmumbleSetAudioInputDistance(distance:Float):Dynamic
Sets the current input distance. The player will be able to talk to other players within this distance.
staticmumbleSetAudioInputIntent(intentHash:Int):Dynamic
Use this native to disable noise suppression and high pass filters.
The possible intents for this are as follows (backticks are used to represent hashes):
| Index | Description |
|---|
| - | - |
|---|
\speech\ | Default intent |
|---|
\music\ | Disable noise suppression and high pass filter |
|---|
staticmumbleSetAudioOutputDistance(distance:Float):Dynamic
Sets the current output distance. The player will be able to hear other players talking within this distance.
staticmumbleSetServerAddress(address:String, port:Int):Dynamic
Changes the Mumble server address to connect to, and reconnects to the new address.
Setting the address to an empty string and the port to -1 will reset to the built in FXServer Mumble Implementation.
staticmumbleSetSubmixForServerId(serverId:Int, submixId:Int):Dynamic
Sets the audio submix ID for a specified player using Mumble 'Native Audio' functionality.
staticmumbleSetTalkerProximity(value:Float):Dynamic
staticmumbleSetVoiceChannel(channel:Int):Dynamic
staticmumbleSetVoiceTarget(targetId:Int):Dynamic
Sets the current Mumble voice target ID to broadcast voice to.
staticmumbleSetVolumeOverride(player:Dynamic, volume:Float):Dynamic
Overrides the output volume for a particular player on Mumble. This will also bypass 3D audio and distance calculations. -1.0 to reset the override.
Set to -1.0 to reset the Volume override.
staticmumbleSetVolumeOverrideByServerId(serverId:Int, volume:Float):Dynamic
Overrides the output volume for a particular player with the specified server id and player name on Mumble. This will also bypass 3D audio and distance calculations. -1.0 to reset the override.
staticnetworkDoesEntityExistWithNetworkId(netId:Int):Bool
staticonesyncEnableRemoteAttachmentSanitization(enable:Bool):Dynamic
Toggles a check that prevents attaching (networked) entities to remotely owned peds. This is disabled by default.
staticoverridePedsCanStandOnTopFlag(flag:Bool):Dynamic
Sets whether peds can stand on top of all vehicles without falling off.
Note this flag is not replicated automatically, you will have to manually do so.
staticoverridePedsUseDefaultDriveByClipset(flag:Bool):Dynamic
Allows the bypassing of default game behavior that prevents the use of SET_PED_DRIVE_BY_CLIPSET_OVERRIDE in certain scenarios to avoid clipping issues (e.g., when there is more than one Ped in a vehicle).
Note: This flag and the overridden clipset are not replicated values and require synchronization through user scripts. Additionally, current game behavior also restricts applying this clipset locally when in first-person mode and will require a temporary workaround.
staticoverridePopGroups(path:String):Dynamic
Replaces the popgroups (CPopGroupList) meta file with the file in the specified path.
staticoverrideReactionToVehicleSiren(state:Bool, reaction:Int):Dynamic
Setting the state to true and a value between 0 and 2 will cause pedestrian vehicles to react accordingly to sirens.
enum Reactions {
Left = 0,
Right = 1,
Stop = 2
}staticoverrideVehiclePedsCanStandOnTopFlag(vehicle:Dynamic, can:Bool):Dynamic
Overrides whether or not peds can stand on top of the specified vehicle.
Note this flag is not replicated automatically, you will have to manually do so.
staticprepareLight(lightType:Int, flags:Int, x:Float, y:Float, z:Float, r:Int, g:Int, b:Int, intensity:Float):Dynamic
Create a new light with specified type, flags, position, color, and intensity.
staticregisterArchetypes(factory:Function):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Registers a set of archetypes with the game engine. These should match CBaseArchetypeDef class information from the game.
staticregisterCommand(commandName:String, handler:Function, restricted:Bool):Dynamic
Registered commands can be executed by entering them in the client console (this works for client side and server side registered commands). Or by entering them in the server console/through an RCON client (only works for server side registered commands). Or if you use a supported chat resource, like the default one provided in the cfx-server-data repository, then you can enter the command in chat by prefixing it with a /.
Commands registered using this function can also be executed by resources, using the ExecuteCommand native.
The restricted bool is not used on the client side. Permissions can only be checked on the server side, so if you want to limit your command with an ace permission automatically, make it a server command (by registering it in a server script).
Example result:

staticregisterFontFile(fileName:String):Dynamic
Registers a specified .gfx file as GFx font library.
The .gfx file has to be registered with the streamer already.
staticregisterFontId(fontName:String):Int
Registers a specified font name for use with text draw commands.
staticregisterKeyMapping(commandString:String, description:String, defaultMapper:String, defaultParameter:String):Dynamic
Registers a key mapping for the current resource.
See the related cookbook post for more information.
Below you can find some examples on how to create these keybindings as well as the alternate keybinding syntax, which is preceded by ~! to indicate that it's an alternate key.
staticregisterNuiCallback(callbackType:String, callback:Function):Dynamic
staticregisterNuiCallbackType(callbackType:String):Dynamic
staticregisterRawKeymap(keymapName:String, onKeyDown:Function, onKeyUp:Function, rawKeyIndex:Int, canBeDisabled:Bool):Dynamic
Registers a keymap that will be triggered whenever rawKeyIndex is pressed or released.
onKeyUp and onKeyDown will not provide any arguments.
function onStateChange();staticregisterRawNuiCallback(callbackType:String, callback:Function):Dynamic
staticregisterResourceAsEventHandler(eventName:String):Dynamic
An internal function which allows the current resource's HLL script runtimes to receive state for the specified event.
staticregisterRopeData(numSections:Int, radius:Float, diffuseTextureName:String, normalMapName:String, distanceMappingScale:Float, uvScaleX:Float, uvScaleY:Float, specularFresnel:Float, specularFalloff:Float, specularIntensity:Float, bumpiness:Float, color:Int):Int
Registers a custom rope data with the game. For guidance on what these values should be use common:/data/ropedata.xml as a reference.
Returns a rope type which can be passed into ADD_ROPE to use a custom rope design.
Once a rope data is registered it can be used indefinitely and you should take caution not too register too many as to exceed the games limit.
staticregisterStreamingFileFromCache(resourceName:String, fileName:String, cacheString:String):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Registers a dynamic streaming asset from the server with the GTA streaming module system.
staticregisterStreamingFileFromKvs(kvsKey:String):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Registers a KVP value as an asset with the GTA streaming module system. This function currently won't work.
staticregisterStreamingFileFromUrl(registerAs:String, url:String):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Registers a file from an URL as a streaming asset in the GTA streaming subsystem. This will asynchronously register the asset, and caching is done based on the URL itself - cache headers are ignored.
Use IS_STREAMING_FILE_READY to check if the asset has been registered successfully.
staticregisterTrackJunction(trackIndex:Int, trackNode:Int, newIndex:Int, newNode:Int, direction:Dynamic):Int
Registers a track junction that when enabled will cause a train on the defined trackIndex, node and direction to change its current track index and begin traveling on the new node
staticremapRawKeymap(keymapName:String, newRawKeyIndex:Int):Dynamic
Remaps the keymap bound to keymapName to newRawKeyIndex
Virtual key codes can be found here
staticremoveConvarChangeListener(cookie:Int):Dynamic
staticremoveDryVolume(handle:Int):Dynamic
Removes a dry volume from the game session.
See CREATE_DRY_VOLUME for more info
staticremoveReplaceTexture(origTxd:String, origTxn:String):Dynamic
Experimental natives, please do not use in a live environment.
staticremoveStateBagChangeHandler(cookie:Int):Dynamic
Experimental: This native may be altered or removed in future versions of CitizenFX without warning.
Removes a handler for changes to a state bag.
staticremoveTexture(textureId:Int):Dynamic
Removes the specified texture and remove it from the ped.
Unlike 0x6BEFAA907B076859 which only marks the texture as "can be reused" (and keeps it until will be reused), this function deletes it right away. Can fix some sync issues. DOES_TEXTURE_EXIST can be use to wait until fully unloaded by game
RemoveTexture(textureId)
while DoesTextureExist(textureId) do
Wait(0)
endstaticremoveTimecycleModifier(modifierName:String):Dynamic
staticremoveTimecycleModifierVar(modifierName:String, varName:String):Dynamic
staticrequestResourceFileSet(setName:String):Bool
Requests a resource file set with the specified name to be downloaded and mounted on top of the current resource.
Resource file sets are specified in fxmanifest.lua with the following syntax:
file_set 'addon_ui' {
'ui/addon/index.html',
'ui/addon/ **.js',
}
This command will trigger a script error if the request failed.
staticresetEntityDrawOutlineRenderTechnique():Dynamic
This function undoes changes made by SET_ENTITY_DRAW_OUTLINE_RENDER_TECHNIQUE, restoring the original outline rendering behavior. The default render technique group is unlit.
staticresetFlyThroughWindscreenParams():Dynamic
Resets parameters which is used by the game for checking is ped needs to fly through windscreen after a crash to default values.
staticresetMapZoomDataLevel(index:Int):Dynamic
Resets values from the zoom level data by index to defaults from mapzoomdata.meta.
staticresetMapdataEntityMatrix(mapDataHash:Int, entityInternalIdx:Int):Bool
Resets mapdata entity transform matrix to its original state.
This function supports SDK infrastructure and is not intended to be used directly from your code.
staticresetPedModelPersonality(modelHash:Int):Dynamic
Restores an overridden ped model personality type to the default value.
staticresetVehiclePedsCanStandOnTopFlag(vehicle:Dynamic):Dynamic
Resets whether or not peds can stand on top of the specified vehicle.
Note this flag is not replicated automatically, you will have to manually do so.
staticselectEntityAtCursor(hitFlags:Int, precise:Bool):Dynamic
Gets the selected entity at the current mouse cursor position, and changes the current selection depth. This function supports SDK infrastructure and is not intended to be used directly from your code.
staticselectEntityAtPos(fracX:Float, fracY:Float, hitFlags:Int, precise:Bool):Dynamic
Gets the selected entity at the specified mouse cursor position, and changes the current selection depth. This function supports SDK infrastructure and is not intended to be used directly from your code.
staticsendDuiMessage(duiObject:Int, jsonString:String):Dynamic
Sends a message to the specific DUI root page. This is similar to SEND_NUI_MESSAGE.
staticsendDuiMouseDown(duiObject:Int, button:String):Dynamic
Injects a 'mouse down' event for a DUI object. Coordinates are expected to be set using SEND_DUI_MOUSE_MOVE.
staticsendDuiMouseMove(duiObject:Int, x:Int, y:Int):Dynamic
Injects a 'mouse move' event for a DUI object. Coordinates are in browser space.
staticsendDuiMouseUp(duiObject:Int, button:String):Dynamic
Injects a 'mouse up' event for a DUI object. Coordinates are expected to be set using SEND_DUI_MOUSE_MOVE.
staticsendDuiMouseWheel(duiObject:Int, deltaY:Int, deltaX:Int):Dynamic
Injects a 'mouse wheel' event for a DUI object.
staticsendLoadingScreenMessage(jsonString:String):Bool
Sends a message to the loadingScreen NUI frame, which contains the HTML page referenced in loadscreen resources.
staticsendNuiMessage(jsonString:String):Bool
staticsetAimCooldown(value:Int):Dynamic
Adds a cooldown between instances of moving and then aiming.
Can be optionally used to hinder 'speedboosting'
To turn off, set value to 0
staticsetAudioSubmixEffectParamFloat(submixId:Int, effectSlot:Int, paramIndex:Int, paramValue:Float):Dynamic
Sets a floating-point parameter for a submix effect.
staticsetAudioSubmixEffectParamInt(submixId:Int, effectSlot:Int, paramIndex:Int, paramValue:Int):Dynamic
Sets an integer parameter for a submix effect.
staticsetAudioSubmixEffectRadioFx(submixId:Int, effectSlot:Int):Dynamic
Assigns a RadioFX effect to a submix effect slot.
The parameter values for this effect are as follows (backticks are used to represent hashes):
| Index | Type | Description |
|---|
| - | - | - |
|---|
\enabled\ | int | Enables or disables RadioFX on this DSP. |
|---|
\default\ | int | Sets default parameters for the RadioFX DSP and enables it. |
|---|
\freq_low\ | float |
|---|
\freq_hi\ | float |
|---|
\fudge\ | float |
|---|
\rm_mod_freq\ | float |
|---|
\rm_mix\ | float |
|---|
\o_freq_lo\ | float |
|---|
\o_freq_hi\ | float |
|---|
staticsetAudioSubmixOutputVolumes(submixId:Int, outputSlot:Int, frontLeftVolume:Float, frontRightVolume:Float, rearLeftVolume:Float, rearRightVolume:Float, channel5Volume:Float, channel6Volume:Float):Dynamic
Sets the volumes for the sound channels in a submix effect.
Values can be between 0.0 and 1.0.
Channel 5 and channel 6 are not used in voice chat but are believed to be center and LFE channels.
Output slot starts at 0 for the first ADD_AUDIO_SUBMIX_OUTPUT call then incremented by 1 on each subsequent call.
staticsetBackfaceculling(toggle:Bool):Dynamic
staticsetCalmingQuadBounds(waterQuad:Int, minX:Int, minY:Int, maxX:Int, maxY:Int):Bool
staticsetCalmingQuadDampening(calmingQuad:Int, dampening:Float):Bool
staticsetClientConfigBool(flagIndex:Int, enabled:Bool):Dynamic
enum ClientConfigFlag
{
WeaponsNoAutoReload = 0,
UIVisibleWhenDead = 1,
DisableDeathAudioScene = 2,
DisableRemoteAttachments = 3
}
Sets the value of a client configuration flag.
This native allows enabling or disabling specific one-time client-side features.
staticsetCursorLocation(x:Float, y:Float):Bool
staticsetDefaultVehicleNumberPlateTextPattern(plateIndex:Int, pattern:String):Dynamic
Sets the default number plate text pattern for vehicles seen on the local client with the specified plate index as their default index (plateProbabilities from carvariations).
For consistency, this should be used with the same value on all clients, since vehicles without custom text will use a seeded random number generator with this pattern to determine the default plate text.
The default value is 11AAA111, and using this or a NULL string will revert to the default game RNG.
Pattern string format
1will lead to a random number from 0-9.Awill lead to a random letter from A-Z..will lead to a random letter or number, with 50% probability of being either.^1will lead to a literal1being emitted.^Awill lead to a literalAbeing emitted.- Any other character will lead to said character being emitted.
- A string shorter than 8 characters will be padded on the right.
staticsetDiscordAppId(appId:String):Dynamic
This native sets the app id for the discord rich presence implementation.
staticsetDiscordRichPresenceAction(index:Int, label:String, url:String):Dynamic
Sets a clickable button to be displayed in a player's Discord rich presence.
staticsetDiscordRichPresenceAsset(assetName:String):Dynamic
This native sets the image asset for the discord rich presence implementation.
staticsetDiscordRichPresenceAssetSmall(assetName:String):Dynamic
This native sets the small image asset for the discord rich presence implementation.
staticsetDiscordRichPresenceAssetSmallText(text:String):Dynamic
This native sets the hover text of the small image asset for the discord rich presence implementation.
staticsetDiscordRichPresenceAssetText(text:String):Dynamic
This native sets the hover text of the image asset for the discord rich presence implementation.
staticsetDrawOrigin(x:Float, y:Float, z:Float, is2d:Bool):Dynamic
Sets the on-screen drawing origin for draw-functions in world coordinates.
The effect can be reset by calling CLEAR_DRAW_ORIGIN and is limited to 32 different origins each frame.
staticsetDuiUrl(duiObject:Int, url:String):Dynamic
Navigates the specified DUI browser to a different URL.
staticsetEmitterProbeLength(probeLength:Float):Dynamic
Allows StaticEmitter's without a linked entity to make use of environment features like occlusion and reverb even if they are located higher than 20.0 units above any static collision inside interiors.
This native allows you to extend the probe range up to 150.0 units.
staticsetEntityDrawOutline(entity:Dynamic, enabled:Bool):Dynamic
Draws an outline around a given entity. This function supports SDK infrastructure and is not intended to be used directly from your code.
staticsetEntityDrawOutlineColor(red:Int, green:Int, blue:Int, alpha:Int):Dynamic
Sets color for entity outline. 255, 0, 255, 255 by default.
staticsetEntityDrawOutlineRenderTechnique(techniqueGroup:String):Dynamic
Sets the render technique for drawing an entity's outline. This function allows you to specify a technique group name to control how the entity's outline is rendered in the game.
List of known technique group's:
alt0
alt1
alt2
alt3
alt4
alt5
alt6
alt7
alt8
blit
cube
default
geometry
imposter
imposterdeferred
lightweight0
lightweight0CutOut
lightweight0CutOutTint
lightweight0WaterRefractionAlpha
lightweight4
lightweight4CutOut
lightweight4CutOutTint
lightweight4WaterRefractionAlpha
lightweight8
lightweight8CutOut
lightweight8CutOutTint
lightweight8WaterRefractionAlpha
lightweightHighQuality0
lightweightHighQuality0CutOut
lightweightHighQuality0WaterRefractionAlpha
lightweightHighQuality4
lightweightHighQuality4CutOut
lightweightHighQuality4WaterRefractionAlpha
lightweightHighQuality8
lightweightHighQuality8CutOut
lightweightHighQuality8WaterRefractionAlpha
lightweightNoCapsule4
lightweightNoCapsule8
multilight
tessellate
ui
unlit
waterreflection
waterreflectionalphaclip
waterreflectionalphacliptint
wdcascadestaticsetEntityDrawOutlineShader(shader:Int):Dynamic
Sets variant of shader that will be used to draw entity outline.
Variants are:
- 0: Default value, gauss shader.
- 1: 2px wide solid color outline.
- 2: Fullscreen solid color except for entity.
staticsetEntityMatrix(entity:Dynamic, forwardX:Float, forwardY:Float, forwardZ:Float, rightX:Float, rightY:Float, rightZ:Float, upX:Float, upY:Float, upZ:Float, atX:Float, atY:Float, atZ:Float):Dynamic
Sets an entity's matrix. Arguments are in the same order as with GET_ENTITY_MATRIX.
staticsetFallDamageLandOnFootMultiplier(multiplier:Float):Dynamic
A setter for GET_FALL_DAMAGE_LAND_ON_FOOT_MULTIPLIER.
staticsetFlashLightKeepOnWhileMoving(state:Bool):Dynamic
Allows Weapon-Flashlight beams to stay visible while moving. Normally it only stays on while aiming.
staticsetFlyThroughWindscreenParams(vehMinSpeed:Float, unkMinSpeed:Float, unkModifier:Float, minDamage:Float):Bool
Sets some in-game parameters which is used for checks is ped needs to fly through windscreen after a crash.
staticsetFogVolumeRenderDisabled(state:Bool):Dynamic
This completely disables rendering of fog volumes (vfxfogvolumeinfo.ymt).
staticsetFuelConsumptionRateMultiplier(multiplier:Float):Dynamic
Sets fuel consumption rate multiplier for all vehicles operated by a player. This is a way to slow down or speed up fuel consumption for all vehicles at a time. If 0 - it practically means that fuel will not be consumed. By default is set to 1.
When the multiplier is set to 1 a default 65 litre gas tank car with average fuel consumption can stay idle for ~16.67 hours or run with max RPM for ~2.5 hours.
To customize fuel consumption per vehicle / vehicle class use SET_HANDLING_FLOAT/SET_VEHICLE_HANDLING_FLOAT natives with fieldName equal to fPetrolConsumptionRate. By default it is set to 0.5 for all vehicles.
staticsetFuelConsumptionState(state:Bool):Dynamic
Turns on and off fuel consumption in all vehicles operated by a player. NPC operated vehicles will not consume fuel to avoid traffic disruptions.
The default Gta5 behaviour is fuel consumption turned off.
staticsetGlobalPassengerMassMultiplier(massMul:Float):Dynamic
staticsetHandlingField(vehicle:String, class_:String, fieldName:String, value:Dynamic):Dynamic
Sets a global handling override for a specific vehicle class. The name is supposed to match the handlingName field from handling.meta.
Example: SetHandlingField('AIRTUG', 'CHandlingData', 'fSteeringLock', 360.0)
staticsetHandlingFloat(vehicle:String, class_:String, fieldName:String, value:Float):Dynamic
Sets a global handling override for a specific vehicle class. The name is supposed to match the handlingName field from handling.meta.
Example: SetHandlingFloat('AIRTUG', 'CHandlingData', 'fSteeringLock', 360.0)
staticsetHandlingInt(vehicle:String, class_:String, fieldName:String, value:Int):Dynamic
Sets a global handling override for a specific vehicle class. The name is supposed to match the handlingName field from handling.meta.
staticsetHandlingVector(vehicle:String, class_:String, fieldName:String, value:Dynamic):Dynamic
Sets a global handling override for a specific vehicle class. The name is supposed to match the handlingName field from handling.meta.
Example: SetHandlingVector('AIRTUG', 'CHandlingData', 'vecCentreOfMassOffset', vector3(0.0, 0.0, -5.0))
staticsetHealthConfigDefaultArmor(configName:String, newValue:Float):Dynamic
Sets default armor value for specific health config.
staticsetHealthConfigDefaultEndurance(configName:String, newValue:Float):Dynamic
Sets default endurance value for specific health config.
staticsetHealthConfigDefaultHealth(configName:String, newValue:Float):Dynamic
Sets default health value for specific health config.
staticsetHealthConfigDogTakedownThreshold(configName:String, newValue:Float):Dynamic
Sets default dog takedown threshold value for specific health config.
staticsetHealthConfigDyingThreshold(configName:String, newValue:Float):Dynamic
Sets default dying health threshold value for specific health config.
staticsetHealthConfigFatiguedThreshold(configName:String, newValue:Float):Dynamic
Sets default fatigued health threshold value for specific health config.
staticsetHealthConfigHurtThreshold(configName:String, newValue:Float):Dynamic
Sets default hurt health threshold value for specific health config.
staticsetHealthConfigInjuredThreshold(configName:String, newValue:Float):Dynamic
Sets default injured health threshold value for specific health config.
staticsetHealthConfigInvincible(configName:String, newValue:Bool):Dynamic
Sets default invincible value for specific health config.
staticsetHealthConfigMeleeFatalAttack(configName:String, newValue:Bool):Dynamic
Sets default melee cardinal fatal attack value for specific health config.
staticsetHealthConfigWritheFromBulletThreshold(configName:String, newValue:Float):Dynamic
Sets default writhe from bullet threshold value for specific health config.
staticsetHudComponentAlign(id:Int, horizontalAlign:Int, verticalAlign:Int):Dynamic
See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.
staticsetHudComponentSize(id:Int, x:Float, y:Float):Dynamic
staticsetIgnoreVehicleOwnershipForStowing(ignore:Bool):Dynamic
Sets whether or not ownership checks should be performed while trying to stow a carriable on a hunting wagon.
staticsetInteriorPortalCornerPosition(interiorId:Int, portalIndex:Int, cornerIndex:Int, posX:Float, posY:Float, posZ:Float):Dynamic
staticsetInteriorPortalEntityFlag(interiorId:Int, portalIndex:Int, entityIndex:Int, flag:Int):Dynamic
staticsetInteriorPortalFlag(interiorId:Int, portalIndex:Int, flag:Int):Dynamic
staticsetInteriorPortalRoomFrom(interiorId:Int, portalIndex:Int, roomFrom:Int):Dynamic
staticsetInteriorPortalRoomTo(interiorId:Int, portalIndex:Int, roomTo:Int):Dynamic
staticsetInteriorProbeLength(probeLength:Float):Dynamic
Overwrite the games default CPortalTracker interior detection range.
This fixes potentially unwanted behaviour in the base game and allows you to build custom interiors with larger ceiling heights without running into graphical glitches.
By default CPortalTracker will probe 4 units downward trying to reach collisions that are part of the interior the entity is in.
If no collision can be found 16 units are used in some circumstances.
There are 30+ hard coded special cases, only some of them exposed via script (for example ENABLE_STADIUM_PROBES_THIS_FRAME).
This native allows you to extend the probe range up to 150 units which is the same value the game uses for the xs_arena_interior
staticsetInteriorRoomExtents(interiorId:Int, roomIndex:Int, bbMinX:Float, bbMinY:Float, bbMinZ:Float, bbMaxX:Float, bbMaxY:Float, bbMaxZ:Float):Dynamic
staticsetInteriorRoomFlag(interiorId:Int, roomIndex:Int, flag:Int):Dynamic
staticsetInteriorRoomTimecycle(interiorId:Int, roomIndex:Int, timecycleHash:Int):Dynamic
staticsetKeyMappingHideResources(hide:Dynamic):Dynamic
Toggles the visibility of resource names in the FiveM key mapping page.
staticsetLightAo(intensity:Float, radius:Float, bias:Float, intensity2:Float):Dynamic
Set ambient occlusion (AO) parameters for a specified light.
staticsetLightClipRect(x:Int, y:Int, width:Int, height:Int):Dynamic
Set the clip rectangle for a created light.
staticsetLightCone(innerConeAngle:Float, outerConeAngle:Float):Dynamic
Set the inner and outer cone angles of a specified light.
staticsetLightCoords(x:Float, y:Float, z:Float):Dynamic
Set the world coordinates of a specified light.
staticsetLightDirection(xDir:Float, yDir:Float, zDir:Float, xTanDir:Float, yTanDir:Float, zTanDir:Float):Dynamic
Set the forward and tangent direction vectors for an existing light, allowing control over its orientation (useful for spotlights and directional lights).
staticsetLightExtraflags(extraFlags:Int):Dynamic
Set additional configuration flags for an existing light
staticsetLightFalloff(falloff:Float):Dynamic
Adjust the falloff parameter for an existing light, affecting how light intensity decreases over distance.
staticsetLightFlags(flags:Int):Dynamic
Set or update specific flags for a created light to control its behavior or properties.
staticsetLightHeadlight(intensity:Float, range:Float):Dynamic
Set the headlight properties of a created light, adjusting its intensity and range.
staticsetLightInterior(interiorId:Int, isPortal:Dynamic, roomIndex:Int):Dynamic
Set the interior and room where the light should be active.
staticsetLightPlane(x:Float, y:Float, z:Float, w:Float):Dynamic
Set the plane parameters for a light.
staticsetLightShadowDetails(shadowFlags:Int, shadowDistance:Float, shadowFade:Float, shadowDepthBiasScale:Float):Dynamic
Set the shadow details for a created light.
staticsetLightShadowFadeDistance(fadeDistance:Int):Dynamic
Set the fade distance for the shadows of a created light.
staticsetLightSpecularFadeDistance(fadeDistance:Int):Dynamic
Set the specular fade distance for a created light.
staticsetLightTexture(textureDict:String, textureHash:Int):Dynamic
Assign a texture to an existing light source, allowing custom light shapes or patterns using textures from streaming assets.
staticsetLightType(lightType:Int):Dynamic
Change the light type of a already created light.
Certain light type needs more configurations to work properly (Like direction, flags or size)
staticsetLightVolumeDetails(volIntensity:Float, volSizeScale:Float, r:Float, g:Float, b:Float, i:Float, outerExponent:Float):Dynamic
Set volumetric light properties for an existing light, enabling custom volumetric effects such as fog-like glow.
staticsetLightVolumetricFadeDistance(volumetricFadeDistance:Int):Dynamic
Set the fade distance for volumetric lightingn.
staticsetManualShutdownLoadingScreenNui(manualShutdown:Bool):Dynamic
Note: This native is deprecated and doesn't work anymore. Use loadscreen_manual_shutdown in the fxmanifest.lua instead.
staticsetMapZoomDataLevel(index:Int, zoomScale:Float, zoomSpeed:Float, scrollSpeed:Float, tilesX:Float, tilesY:Float):Dynamic
Sets values to the zoom level data by index.
staticsetMillisecondsPerGameMinute(value:Int):Dynamic
Overrides how many real ms are equal to one game minute.
A setter for GetMillisecondsPerGameMinute.
staticsetMinimapClipType(type:Int):Dynamic
Sets the type for the minimap blip clipping object to be either rectangular or rounded.
staticsetMinimapComponentPosition(name:String, alignX:String, alignY:String, posX:Float, posY:Float, sizeX:Float, sizeY:Float):Dynamic
Overrides the minimap component data (from common:/data/ui/frontend.xml) for a specified component.
staticsetMinimapOverlayDisplay(miniMap:Int, x:Float, y:Float, xScale:Float, yScale:Float, alpha:Float):Dynamic
Sets the display info for a minimap overlay.
staticsetMinimapType(type:Int):Dynamic
Possible Types:
0 = Off,
1 = Regular,
2 = Expanded,
3 = Simple,staticsetModelHeadlightConfiguration(modelHash:Int, ratePerSecond:Float, headlightRotation:Float, invertRotation:Bool):Dynamic
**This native is deprecated and does nothing!
staticsetMpGamerTagsUseVehicleBehavior(enabled:Dynamic):Dynamic
Sets whether all tags should group (normal game behavior) or should remain independent and above each ped's respective head when in a vehicle.
staticsetMpGamerTagsVisibleDistance(distance:Float):Dynamic
Sets the maximum distance at which all tags will be visible and which beyond will not be displayed. Distance is measured from the camera position.
staticsetNetworkWalkMode(enabled:Dynamic):Dynamic
staticsetNuiFocus(hasFocus:Bool, hasCursor:Bool):Dynamic
staticsetNuiFocusKeepInput(keepInput:Bool):Dynamic
staticsetPedCollectionComponentVariation(ped:Dynamic, componentId:Int, collection:String, drawableId:Int, textureId:Int, paletteId:Int):Dynamic
An alternative to SET_PED_COMPONENT_VARIATION that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.
staticsetPedCollectionPreloadPropData(ped:Dynamic, anchorPoint:Int, collection:String, propIndex:Int, textureId:Int):Dynamic
An alternative to SET_PED_PRELOAD_PROP_DATA that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.
staticsetPedCollectionPreloadVariationData(ped:Dynamic, componentId:Int, collection:String, drawableId:Int, textureId:Int):Dynamic
An alternative to SET_PED_PRELOAD_VARIATION_DATA that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_DRAWABLE and GET_PED_COLLECTION_LOCAL_INDEX_FROM_DRAWABLE natives.
staticsetPedCollectionPropIndex(ped:Dynamic, anchorPoint:Int, collection:String, propIndex:Int, textureId:Int, attach:Bool):Dynamic
An alternative to SET_PED_PROP_INDEX that uses local collection indexing instead of the global one.
The local / collection relative indexing is useful because the global index may get shifted after Title Update. While local index will remain the same which simplifies migration to the newer game version.
Collection name and local index inside the collection can be obtained from the global index using GET_PED_COLLECTION_NAME_FROM_PROP and GET_PED_COLLECTION_LOCAL_INDEX_FROM_PROP natives.
staticsetPedMeleeCombatLimits(primaryCount:Int, secondaryCount:Int, populationPedCount:Int):Dynamic
Override the limits on the number and types of melee combatants. The game is limited to at most ten combatants among the three types: primary, secondary, and observers.
This native infers the number of observers based on the primary and secondary counts.
staticsetPedModelHealthConfig(modelHash:Int, configName:String):Dynamic
Sets a ped model's health config.
Takes effect only after setting player model with SET_PLAYER_MODEL.
staticsetPedModelPersonality(modelHash:Int, personalityHash:Int):Dynamic
Overrides a ped model personality type.
staticsetPedTurningThresholds(min:Float, max:Float):Dynamic
Purpose: The game's default values for these make shooting while traveling Left quite a bit slower than shooting while traveling right (This could be a game-balance thing?)
Default Min: -45 Degrees
Default Max: 135 Degrees
\ ,- ~ ||~ - ,
, ' \ x x ' ,
, \ x x x ,
, \ x x ,
, \ x x ,
, \ x ,
, \ x ,
, \ x x ,
, \ x ,
, , '
' - , \ \ _ , ' \
If the transition angle is within the shaded portion (x), there will be no transition(Quicker)
The angle corresponds to where you are looking(North on the circle) vs. the heading of your Ped.
Note: For some reason,
You can set these values to whatever you'd like with this native, but keep in mind that the transitional spin is only clockwise for some reason.
I'd personally recommend something like -135/135
staticsetPlayerMaxStamina(playerId:Dynamic, maxStamina:Float):Dynamic
staticsetPlayerStamina(playerId:Dynamic, stamina:Float):Dynamic
staticsetPlayerTalkingOverride(player:Dynamic, state:Bool):Dynamic
the status of default voip system. It affects on NETWORK_IS_PLAYER_TALKING and mp_facial animation.
This function doesn't need to be called every frame, it works like a switcher.
staticsetReactionToVehicleSirenDisabled(state:Bool):Dynamic
This completely disables pedestrian vehicles from reacting to sirens. They will not try to do any maneuver to evade.
staticsetResourceKvpFloatNoSync(key:String, value:Float):Dynamic
Nonsynchronous SET_RESOURCE_KVP_FLOAT operation; see FLUSH_RESOURCE_KVP.
staticsetResourceKvpIntNoSync(key:String, value:Int):Dynamic
Nonsynchronous SET_RESOURCE_KVP_INT operation; see FLUSH_RESOURCE_KVP.
staticsetResourceKvpNoSync(key:String, value:String):Dynamic
Nonsynchronous SET_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.
staticsetRichPresence(presenceState:String):Dynamic
Sets the player's rich presence detail state for social platform providers to a specified string.
staticsetRopeLengthChangeRate(rope:Int, lengthChangeRate:Float):Dynamic
Set's the ropes length change rate, which is the speed that rope should wind if started.
staticsetRopesCreateNetworkWorldState(shouldCreate:Bool):Dynamic
Toggles whether the usage of ADD_ROPE should create an underlying CNetworkRopeWorldStateData. By default this is set to false.
staticsetRuntimeTextureArgbData(tex:Int, buffer:String, length:Int):Bool
staticsetRuntimeTextureImage(tex:Int, fileName:String):Bool
Replaces the pixel data in a runtime texture with the image data from a file in the current resource, or a data URL.
If the bitmap is a different size compared to the existing texture, it will be resampled.
This command may end up executed asynchronously, and only update the texture data at a later time.
staticsetRuntimeTexturePixel(tex:Int, x:Int, y:Int, r:Int, g:Int, b:Int, a:Int):Dynamic
Sets a pixel in the specified runtime texture. This will have to be committed using COMMIT_RUNTIME_TEXTURE to have any effect.
staticsetSnakeoilForEntry(name:String, path:String, data:String):Dynamic
staticsetStateBagValue(bagName:String, keyName:String, valueData:String, valueLength:Int, replicated:Bool):Dynamic
Internal function for setting a state bag value.
staticsetTextChatEnabled(enabled:Bool):Bool
staticsetTextFontForCurrentCommand(fontId:Int):Dynamic
Sets the text font for the current text drawing command.
staticsetTextJustification(justifyType:Int):Dynamic
staticsetTextWrap(start:Float, end:Float):Dynamic
staticsetTimecycleModifierVar(modifierName:String, varName:String, value1:Float, value2:Float):Dynamic
staticsetTrackBrakingDistance(track:Int, brakingDistance:Float):Dynamic
Sets the braking distance of the track. Used by trains to determine the point to slow down when entering a station.
staticsetTrackEnabled(track:Int, enabled:Dynamic):Dynamic
Toggles the track being active. If disabled mission trains will not be able to spawn on this track and will look for the next closest track to spawn
staticsetTrackJunctionActive(junctionIndex:Int, state:Dynamic):Dynamic
Sets the state of a track junction.
staticsetTrackMaxSpeed(track:Int, newSpeed:Int):Dynamic
Sets the max speed for the train tracks. Used by ambient trains and for station calculations
staticsetTrainDoorOpenRatio(train:Dynamic, doorIndex:Int, ratio:Float):Dynamic
Sets the ratio that a door is open for on a train.
staticsetTrainState(train:Dynamic, state:Int):Dynamic
staticsetTrainStopAtStations(train:Dynamic, state:Bool):Dynamic
Toggles a train's ability to stop at stations
staticsetTrainsForceDoorsOpen(forceOpen:Dynamic):Dynamic
Enables or disables whether train doors should be forced open whilst a player is inside the train. This is enabled by default in multiplayer.
staticsetVehicleAlarmTimeLeft(vehicle:Dynamic, time:Int):Dynamic
staticsetVehicleAutoRepairDisabled(vehicle:Dynamic, value:Bool):Dynamic
Disables the vehicle from being repaired when a vehicle extra is enabled.
staticsetVehicleClutch(vehicle:Dynamic, clutch:Float):Dynamic
staticsetVehicleCurrentGear(vehicle:Dynamic, gear:Int):Dynamic
staticsetVehicleCurrentRpm(vehicle:Dynamic, rpm:Float):Dynamic
staticsetVehicleEngineTemperature(vehicle:Dynamic, temperature:Float):Dynamic
staticsetVehicleFlag(vehicle:Dynamic, flagIndex:Int, value:Dynamic):Dynamic
This native is a setter for GET_VEHICLE_HAS_FLAG.
staticsetVehicleFuelLevel(vehicle:Dynamic, level:Float):Dynamic
staticsetVehicleGearRatio(vehicle:Dynamic, gear:Int, ratio:Float):Dynamic
Sets the vehicles gear ratio on choosen gear, reverse gear needs to be a negative float and forward moving gear needs to be a positive float. Refer to the examples if confused.
staticsetVehicleGravityAmount(vehicle:Dynamic, gravity:Float):Dynamic
staticsetVehicleHandlingField(vehicle:Dynamic, class_:String, fieldName:String, value:Dynamic):Dynamic
Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_FIELD, this might require some experimentation.
Example: SetVehicleHandlingField(vehicle, 'CHandlingData', 'fSteeringLock', 360.0)
staticsetVehicleHandlingFloat(vehicle:Dynamic, class_:String, fieldName:String, value:Float):Dynamic
Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_FLOAT, this might require some experimentation.
Example: SetVehicleHandlingFloat(vehicle, 'CHandlingData', 'fSteeringLock', 360.0)
staticsetVehicleHandlingInt(vehicle:Dynamic, class_:String, fieldName:String, value:Int):Dynamic
Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_INT, this might require some experimentation.
staticsetVehicleHandlingVector(vehicle:Dynamic, class_:String, fieldName:String, value:Dynamic):Dynamic
Sets a handling override for a specific vehicle. Certain handling flags can only be set globally using SET_HANDLING_VECTOR, this might require some experimentation.
staticsetVehicleHighGear(vehicle:Dynamic, gear:Int):Dynamic
staticsetVehicleNextGear(vehicle:Dynamic, nextGear:Int):Dynamic
staticsetVehicleNitroPtfxRange(range:Float):Dynamic
Sets the maximum distance in which _SET_VEHICLE_NITRO_ENABLED PTFX are rendered. Distance is measured from the camera position.
staticsetVehicleOilLevel(vehicle:Dynamic, level:Float):Dynamic
staticsetVehiclePitchBias(vehicle:Dynamic, value:Float):Dynamic
Set the vehicle's pitch bias. Only works on planes.
staticsetVehicleRollBias(vehicle:Dynamic, value:Float):Dynamic
Set the vehicle's roll bias. Only works on planes.
staticsetVehicleSteeringAngle(vehicle:Dynamic, angle:Float):Dynamic
staticsetVehicleSteeringScale(vehicle:Dynamic, scale:Float):Dynamic
staticsetVehicleSuspensionHeight(vehicle:Dynamic, newHeight:Float):Dynamic
Sets the height of the vehicle's suspension.
This changes the same value set by Suspension in the mod shop.
Negatives values raise the car. Positive values lower the car.
This is change is visual only. The collision of the vehicle will not move.
staticsetVehicleTurboPressure(vehicle:Dynamic, pressure:Float):Dynamic
staticsetVehicleWheelBrakePressure(vehicle:Dynamic, wheelIndex:Int, pressure:Float):Dynamic
Sets brake pressure of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
Normal values around 1.0f
staticsetVehicleWheelFlags(vehicle:Dynamic, wheelIndex:Int, flags:Int):Dynamic
Sets the flags of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticsetVehicleWheelHealth(vehicle:Dynamic, wheelIndex:Int, health:Float):Dynamic
staticsetVehicleWheelIsPowered(vehicle:Dynamic, wheelIndex:Int, powered:Bool):Dynamic
Sets whether the wheel is powered.
On all wheel drive cars this works to change which wheels receive power, but if a car's fDriveBiasFront doesn't send power to that wheel, it won't get power anyway. This can be fixed by changing the fDriveBiasFront with SET_VEHICLE_HANDLING_FLOAT.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
This is a shortcut to a flag in SET_VEHICLE_WHEEL_FLAGS.
staticsetVehicleWheelPower(vehicle:Dynamic, wheelIndex:Int, power:Float):Dynamic
Sets power being sent to a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticsetVehicleWheelRimColliderSize(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic
Not sure what this changes, probably determines physical rim size in case the tire is blown.
staticsetVehicleWheelRotationSpeed(vehicle:Dynamic, wheelIndex:Int, speed:Float):Dynamic
Sets the rotation speed of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticsetVehicleWheelSize(vehicle:Dynamic, size:Float):Bool
Sets vehicle's wheels' size (size is the same for all the wheels, cannot get/set specific wheel of vehicle).
Only works on non-default wheels.
Returns whether change was successful (can be false if trying to set size for non-default wheels).
staticsetVehicleWheelTireColliderSize(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic
Use along with SetVehicleWheelSize to resize the wheels (this native sets the collider size affecting physics while SetVehicleWheelSize will change visual size).
staticsetVehicleWheelTireColliderWidth(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic
Use along with SetVehicleWheelWidth to resize the wheels (this native sets the collider width affecting physics while SetVehicleWheelWidth will change visual width).
staticsetVehicleWheelTractionVectorLength(vehicle:Dynamic, wheelIndex:Int, length:Float):Dynamic
Sets the traction vector length of a wheel.
Max number of wheels can be retrieved with the native GET_VEHICLE_NUMBER_OF_WHEELS.
staticsetVehicleWheelWidth(vehicle:Dynamic, width:Float):Bool
Sets vehicle's wheels' width (width is the same for all the wheels, cannot get/set specific wheel of vehicle).
Only works on non-default wheels.
Returns whether change was successful (can be false if trying to set width for non-default wheels).
staticsetVehicleWheelXOffset(vehicle:Dynamic, wheelIndex:Int, offset:Float):Dynamic
Adjusts the offset of the specified wheel relative to the wheel's axle center.
Needs to be called every frame in order to function properly, as GTA will reset the offset otherwise.
This function can be especially useful to set the track width of a vehicle, for example:
function SetVehicleFrontTrackWidth(vehicle, width)
SetVehicleWheelXOffset(vehicle, 0, -width/2)
SetVehicleWheelXOffset(vehicle, 1, width/2)
endstaticsetVehicleWheelYRotation(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic
staticsetVehicleWheelieState(vehicle:Dynamic, state:Int):Dynamic
Example script: https://pastebin.com/J6XGbkCW
List of known states:
1: Not wheeling.
65: Vehicle is ready to do wheelie (burnouting).
129: Vehicle is doing wheelie.staticsetVehicleXenonLightsCustomColor(vehicle:Dynamic, red:Int, green:Int, blue:Int):Dynamic
Sets custom vehicle xenon lights color, allowing to use RGB palette. The game will ignore lights color set by _SET_VEHICLE_XENON_LIGHTS_COLOR when custom color is active. This native is not synced between players. Requires xenon lights mod to be set on vehicle.
staticsetVehicleXmasSnowFactor(gripFactor:Float):Dynamic
staticsetVisualSettingFloat(name:String, value:Float):Dynamic
Overrides a floating point value from visualsettings.dat temporarily.
staticsetWaterAreaClipRect(minX:Int, minY:Int, maxX:Int, maxY:Int):Dynamic
Sets world clip boundaries for water quads file (water.xml, water_heistisland.xml)
Used internally by LOAD_GLOBAL_WATER_FILE
staticsetWaterQuadAlpha(waterQuad:Int, a0:Int, a1:Int, a2:Int, a3:Int):Bool
staticsetWaterQuadBounds(waterQuad:Int, minX:Int, minY:Int, maxX:Int, maxY:Int):Bool
This native allows you to update the bounds of a specified water quad index.
staticsetWaterQuadHasLimitedDepth(waterQuad:Int, hasLimitedDepth:Bool):Bool
staticsetWaterQuadIsInvisible(waterQuad:Int, isInvisible:Bool):Bool
staticsetWaterQuadLevel(waterQuad:Int, level:Float):Bool
staticsetWaterQuadNoStencil(waterQuad:Int, noStencil:Dynamic):Bool
staticsetWaterQuadType(waterQuad:Int, type:Int):Bool
This native allows you to update the water quad type.
Valid type definitions:
- 0 Square
- 1 Right triangle where the 90 degree angle is at maxX, minY
- 2 Right triangle where the 90 degree angle is at minX, minY
- 3 Right triangle where the 90 degree angle is at minX, maxY
- 4 Right triangle where the 90 degree angle is at maxY, maxY
staticsetWaveQuadAmplitude(waveQuad:Int, amplitude:Float):Bool
staticsetWaveQuadBounds(waveQuad:Int, minX:Int, minY:Int, maxX:Int, maxY:Int):Bool
This native allows you to update the bounds of a specified water quad index.
staticsetWaveQuadDirection(waveQuad:Int, directionX:Float, directionY:Float):Bool
directionX/Y should be constrained between -1.0 and 1.0
A positive value will create the wave starting at min and rolling towards max
A negative value will create the wave starting at max and rolling towards min
Applying both values allows you to make diagonal waves
staticsetWeaponAccuracySpread(weaponHash:Int, spread:Float):Dynamic
A setter for the accuracy spread of a weapon.
staticsetWeaponRecoilShakeAmplitude(weaponHash:Int, amplitude:Float):Dynamic
A setter for the recoil shake amplitude of a weapon.
staticsetWeaponsNoAimBlocking(state:Bool):Dynamic
Disables weapons aim blocking due to environment for local player.
For non-player peds SET_PED_ENABLE_WEAPON_BLOCKING can be used.
staticsetWeaponsNoAutoswap(state:Bool):Dynamic
Disables autoswapping to another weapon when the current weapon runs out of ammo.
staticsetWeatherCycleEntry(index:Int, typeName:String, timeMult:Int):Bool
staticsetWeatherOwnedByNetwork(network:Bool):Dynamic
Sets whether or not the weather should be owned by the network subsystem.
To be able to use _SET_WEATHER_TYPE_TRANSITION, this has to be set to false.
staticsetWetClothPinRadiusScale(scale:Float):Dynamic
Modifies the radius scale used in the simulation of wet cloth physics.
This affects how cloth behaves when wet, changing how it sticks or reacts to movement.
staticshutdownLoadingScreenNui():Dynamic
Shuts down the loadingScreen NUI frame, similarly to SHUTDOWN_LOADING_SCREEN.
staticstartFindExternalKvp(resourceName:String, prefix:String):Int
Equivalent of START_FIND_KVP, but for another resource than the current one.
staticstartFindKvp(prefix:String):Int
staticstateBagHasKey(bagName:String, key:String):Dynamic
statictriggerEventInternal(eventName:String, eventPayload:String, payloadLength:Int):Dynamic
The backing function for TriggerEvent.
statictriggerLatentServerEventInternal(eventName:String, eventPayload:String, payloadLength:Int, bps:Int):Dynamic
The backing function for TriggerLatentServerEvent.
statictriggerServerEventInternal(eventName:String, eventPayload:String, payloadLength:Int):Dynamic
The backing function for TriggerServerEvent.
staticunregisterRawNuiCallback(callbackType:String):Dynamic
Will unregister and cleanup a registered NUI callback handler.
Use along side the REGISTER_RAW_NUI_CALLBACK native.
staticupdateMapdataEntity(mapdata:Int, entity:Int, entityDef:Dynamic):Dynamic
Transiently updates the entity with the specified mapdata index and entity index.
This function supports SDK infrastructure and is not intended to be used directly from your code.