Static methods

@:native("ActivateTimecycleEditor")staticactivateTimecycleEditor():Dynamic

Activates built-in timecycle editing tool.

@:native("AddAudioSubmixOutput")staticaddAudioSubmixOutput(submixId:Int, outputSubmixId:Int):Dynamic

Adds an output for the specified audio submix.

@:native("AddAuthorizedParachuteModel")staticaddAuthorizedParachuteModel(modelNameHash:Int):Dynamic

Adds the given model name hash to the list of valid models for the player ped's parachute.

@:native("AddAuthorizedParachutePackModel")staticaddAuthorizedParachutePackModel(modelNameHash:Int):Dynamic

Adds the given model name hash to the list of valid models for the player ped's parachute pack.

@:native("AddConvarChangeListener")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.

@:native("AddHealthConfig")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.

@:native("AddMinimapOverlay")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.

@:native("AddMinimapOverlayWithDepth")staticaddMinimapOverlayWithDepth(name:String, depth:Int):Int

Loads a minimap overlay from a GFx file in the current resource.

@:native("AddReplaceTexture")staticaddReplaceTexture(origTxd:String, origTxn:String, newTxd:String, newTxn:String):Dynamic

Experimental natives, please do not use in a live environment.

@:native("AddStateBagChangeHandler")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:NetID

    or 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

@:native("AddTextEntry")staticaddTextEntry(entryKey:String, entryText:String):Dynamic

@:native("AddTextEntryByHash")staticaddTextEntryByHash(entryKey:Int, entryText:String):Dynamic

@:native("ApplyWeatherCycles")staticapplyWeatherCycles(numEntries:Int, msPerCycle:Int):Bool

@:native("BreakOffVehicleWheel")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.

@:native("CallMinimapScaleformFunction")staticcallMinimapScaleformFunction(miniMap:Int, fnName:String):Bool

This is similar to the PushScaleformMovieFunction natives, except it calls in the TIMELINE of a minimap overlay.

@:native("CancelEvent")staticcancelEvent():Dynamic

Cancels the currently executing event.

@:native("ClearDrawOrigin")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.

@:native("ClearVehicleXenonLightsCustomColor")staticclearVehicleXenonLightsCustomColor(vehicle:Dynamic):Dynamic

Removes vehicle xenon lights custom RGB color.

@:native("CloneTimecycleModifier")staticcloneTimecycleModifier(sourceModifierName:String, clonedModifierName:String):Int

@:native("CommitRuntimeTexture")staticcommitRuntimeTexture(tex:Int):Dynamic

Commits the backing pixels to the specified runtime texture.

@:native("CreateAudioSubmix")staticcreateAudioSubmix(name:String):Int

Creates an audio submix with the specified name, or gets the existing audio submix by that name.

@:native("CreateDryVolume")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)

@:native("CreateDui")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.

@:native("CreateRuntimeTexture")staticcreateRuntimeTexture(txd:Int, txn:String, width:Int, height:Int):Int

Creates a blank runtime texture.

@:native("CreateRuntimeTextureFromDuiHandle")staticcreateRuntimeTextureFromDuiHandle(txd:Int, txn:String, duiHandle:String):Int

Creates a runtime texture from a DUI handle.

@:native("CreateRuntimeTextureFromImage")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.

@:native("CreateRuntimeTxd")staticcreateRuntimeTxd(name:String):Int

Creates a runtime texture dictionary with the specified name.

Example:

local txd = CreateRuntimeTxd('meow')

@:native("CreateTimecycleModifier")staticcreateTimecycleModifier(modifierName:String):Int

Create a clean timecycle modifier. See SET_TIMECYCLE_MODIFIER_VAR to add variables.

@:native("DeleteFunctionReference")staticdeleteFunctionReference(referenceIdentity:String):Dynamic

@:native("DeleteResourceKvp")staticdeleteResourceKvp(key:String):Dynamic

@:native("DeleteResourceKvpNoSync")staticdeleteResourceKvpNoSync(key:String):Dynamic

Nonsynchronous DELETE_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.

@:native("DestroyDui")staticdestroyDui(duiObject:Int):Dynamic

Destroys a DUI browser.

@:native("DisableEditorRuntime")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.

@:native("DisableIdleCamera")staticdisableIdleCamera(state:Bool):Dynamic

Disables the game's afk camera that starts panning around after 30 seconds of inactivity.

@:native("DisableRawKeyThisFrame")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

@:native("DisableVehiclePassengerIdleCamera")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)

@:native("DisableWorldhorizonRendering")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.

@:native("DoesTextureExist")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

@:native("DoesTimecycleModifierHasVar")staticdoesTimecycleModifierHasVar(modifierName:String, varName:String):Bool

@:native("DoesTrainStopAtStations")staticdoesTrainStopAtStations(train:Dynamic):Bool

@:native("DoesVehicleUseFuel")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.

@:native("DoorSystemGetActive")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}]

@:native("DoorSystemGetSize")staticdoorSystemGetSize():Int

@:native("DrawBox")staticdrawBox(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, red:Int, green:Int, blue:Int, alpha:Int):Dynamic

@:native("DrawCorona")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.

@:native("DrawGizmo")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].

@:native("DrawGlowSphere")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.

@:native("DrawLight")staticdrawLight():Dynamic

Draw the prepared light.

@:native("DrawLine")staticdrawLine(x1:Float, y1:Float, z1:Float, x2:Float, y2:Float, z2:Float, red:Int, green:Int, blue:Int, alpha:Int):Dynamic

@:native("DrawLine_2d")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.

@:native("DrawPoly")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

@:native("DrawRectRotated")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.

@:native("DuplicateFunctionReference")staticduplicateFunctionReference(referenceIdentity:String):String

@:native("EnableEditorRuntime")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.

@:native("EndFindKvp")staticendFindKvp(handle:Int):Dynamic

@:native("EndFindObject")staticendFindObject(findHandle:Int):Dynamic

@:native("EndFindPed")staticendFindPed(findHandle:Int):Dynamic

@:native("EndFindPickup")staticendFindPickup(findHandle:Int):Dynamic

@:native("EndFindVehicle")staticendFindVehicle(findHandle:Int):Dynamic

@:native("EnsureEntityStateBag")staticensureEntityStateBag(entity:Dynamic):Dynamic

Internal function for ensuring an entity has a state bag.

@:native("EnterCursorMode")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.

@:native("ExecuteCommand")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.

@:native("ExperimentalLoadCloneCreate")staticexperimentalLoadCloneCreate(data:String, objectId:Int, tree:String):Dynamic

This native is not implemented.

@:native("ExperimentalLoadCloneSync")staticexperimentalLoadCloneSync(entity:Dynamic, data:String):Dynamic

This native is not implemented.

@:native("ExperimentalSaveCloneCreate")staticexperimentalSaveCloneCreate(entity:Dynamic):String

This native is not implemented.

@:native("ExperimentalSaveCloneSync")staticexperimentalSaveCloneSync(entity:Dynamic):String

This native is not implemented.

@:native("FindFirstObject")staticfindFirstObject(outEntity:Dynamic):Int

@:native("FindFirstPed")staticfindFirstPed(outEntity:Dynamic):Int

@:native("FindFirstPickup")staticfindFirstPickup(outEntity:Dynamic):Int

@:native("FindFirstVehicle")staticfindFirstVehicle(outEntity:Dynamic):Int

@:native("FindKvp")staticfindKvp(handle:Int):String

@:native("FindNextObject")staticfindNextObject(findHandle:Int, outEntity:Dynamic):Bool

@:native("FindNextPed")staticfindNextPed(findHandle:Int, outEntity:Dynamic):Bool

@:native("FindNextPickup")staticfindNextPickup(findHandle:Int, outEntity:Dynamic):Bool

@:native("FindNextVehicle")staticfindNextVehicle(findHandle:Int, outEntity:Dynamic):Bool

@:native("ForceSnowPass")staticforceSnowPass(enabled:Bool):Dynamic

Forces the game snow pass to render.

@:native("FormatStackTrace")staticformatStackTrace(traceData:Dynamic):String

An internal function for converting a stack trace object to a string.

@:native("GetActivePlayers")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]

@:native("GetAllRopes")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, ...]

@:native("GetAllTrackJunctions")staticgetAllTrackJunctions():Dynamic

Returns all track junctions on the client

The data returned adheres to the following structure:

[1, 2, 4, 6, 69, 420]

@:native("GetAllVehicleModels")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.

@:native("GetAmbientPedRangeMultiplier")staticgetAmbientPedRangeMultiplier():Float

@:native("GetAmbientVehicleRangeMultiplier")staticgetAmbientVehicleRangeMultiplier():Float

@:native("GetAspectRatio")staticgetAspectRatio():Float

Gets the current aspect ratio

local ratio = GetAspectRatio()

print(string.format("%.2f", ratio))

@:native("GetCalmingQuadAtCoords")staticgetCalmingQuadAtCoords(x:Float, y:Float):Int

This native returns the index of a calming quad if the given point is inside its bounds.

@:native("GetCalmingQuadBounds")staticgetCalmingQuadBounds(waterQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool

@:native("GetCalmingQuadCount")staticgetCalmingQuadCount():Int

@:native("GetCalmingQuadDampening")staticgetCalmingQuadDampening(waterQuad:Int, calmingQuadDampening:Dynamic):Bool

@:native("GetCamMatrix")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.

@:native("GetClientConfigBool")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.

@:native("GetClosestTrackNodes")staticgetClosestTrackNodes(position:Dynamic, radius:Float):Dynamic

Get all track nodes and their track ids within the radius of the specified coordinates.

@:native("GetConvar")staticgetConvar(varName:String, default_:String):String

Can be used to get a console variable of type char*, for example a string.

@:native("GetConvarBool")staticgetConvarBool(varName:String, defaultValue:Bool):Bool

Can be used to get a console variable casted back to bool.

@:native("GetConvarFloat")staticgetConvarFloat(varName:String, defaultValue:Float):Float

This will have floating point inaccuracy.

@:native("GetConvarInt")staticgetConvarInt(varName:String, default_:Int):Int

Can be used to get a console variable casted back to int (an integer value).

@:native("GetCurrentGameName")staticgetCurrentGameName():String

This native returns the currently used game's name.

@:native("GetCurrentResourceName")staticgetCurrentResourceName():String

Returns the name of the currently executing resource.

@:native("GetCurrentScreenResolution")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))

@:native("GetCurrentServerEndpoint")staticgetCurrentServerEndpoint():String

Returns the peer address of the remote game server that the user is currently connected to.

@:native("GetDuiHandle")staticgetDuiHandle(duiObject:Int):String

Returns the NUI window handle for a specified DUI browser object.

@:native("GetEntitiesInRadius")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

@:native("GetEntityAddress")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.

@:native("GetEntityArchetypeName")staticgetEntityArchetypeName(entity:Dynamic):String

Returns entity's archetype name, if available.

@:native("GetEntityFromStateBagName")staticgetEntityFromStateBagName(bagName:String):Dynamic

Returns the entity handle for the specified state bag name. For use with ADD_STATE_BAG_CHANGE_HANDLER.

@:native("GetEntityIndexFromMapdata")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.

@:native("GetEntityMapdataOwner")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.

@:native("GetExternalKvpFloat")staticgetExternalKvpFloat(resource:String, key:String):Float

A getter for SET_RESOURCE_KVP_FLOAT, but for a specified resource.

@:native("GetExternalKvpInt")staticgetExternalKvpInt(resource:String, key:String):Int

A getter for SET_RESOURCE_KVP_INT, but for a specified resource.

@:native("GetExternalKvpString")staticgetExternalKvpString(resource:String, key:String):String

A getter for SET_RESOURCE_KVP, but for a specified resource.

@:native("GetFallDamageLandOnFootMultiplier")staticgetFallDamageLandOnFootMultiplier():Float

@:native("GetFallDamageMultiplier")staticgetFallDamageMultiplier():Float

@:native("GetFuelConsumptionRateMultiplier")staticgetFuelConsumptionRateMultiplier():Float

@:native("GetFuelConsumptionState")staticgetFuelConsumptionState():Bool

@:native("GetGameBuildNumber")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

@:native("GetGameName")staticgetGameName():String

Returns the current game being executed.

Possible values:

Return valueMeaning
------------------------------------------
fxserverServer-side code ('Duplicity')
fivemFiveM for GTA V
libertymLibertyM for GTA IV
redmRedM for Red Dead Redemption 2

@:native("GetGamePool")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 objects
  • CVehicle: Vehicles.
  • CPickup: Pickups.

@:native("GetGlobalPassengerMassMultiplier")staticgetGlobalPassengerMassMultiplier():Float

@:native("GetHudComponentAlign")staticgetHudComponentAlign(id:Int, horizontalAlign:Dynamic, verticalAlign:Dynamic):Dynamic

See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.

@:native("GetHudComponentName")staticgetHudComponentName(id:Int):String

@:native("GetHudComponentSize")staticgetHudComponentSize(id:Int):Dynamic

@:native("GetInstanceId")staticgetInstanceId():Int

@:native("GetInteriorEntitiesExtents")staticgetInteriorEntitiesExtents(interiorId:Int, bbMinX:Dynamic, bbMinY:Dynamic, bbMinZ:Dynamic, bbMaxX:Dynamic, bbMaxY:Dynamic, bbMaxZ:Dynamic):Dynamic

@:native("GetInteriorPortalCornerPosition")staticgetInteriorPortalCornerPosition(interiorId:Int, portalIndex:Int, cornerIndex:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic

@:native("GetInteriorPortalCount")staticgetInteriorPortalCount(interiorId:Int):Int

@:native("GetInteriorPortalEntityArchetype")staticgetInteriorPortalEntityArchetype(interiorId:Int, portalIndex:Int, entityIndex:Int):Int

@:native("GetInteriorPortalEntityCount")staticgetInteriorPortalEntityCount(interiorId:Int, portalIndex:Int):Int

@:native("GetInteriorPortalEntityFlag")staticgetInteriorPortalEntityFlag(interiorId:Int, portalIndex:Int, entityIndex:Int):Int

@:native("GetInteriorPortalEntityPosition")staticgetInteriorPortalEntityPosition(interiorId:Int, portalIndex:Int, entityIndex:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic

@:native("GetInteriorPortalEntityRotation")staticgetInteriorPortalEntityRotation(interiorId:Int, portalIndex:Int, entityIndex:Int, rotX:Dynamic, rotY:Dynamic, rotZ:Dynamic, rotW:Dynamic):Dynamic

@:native("GetInteriorPortalFlag")staticgetInteriorPortalFlag(interiorId:Int, portalIndex:Int):Int

@:native("GetInteriorPortalRoomFrom")staticgetInteriorPortalRoomFrom(interiorId:Int, portalIndex:Int):Int

@:native("GetInteriorPortalRoomTo")staticgetInteriorPortalRoomTo(interiorId:Int, portalIndex:Int):Int

@:native("GetInteriorPosition")staticgetInteriorPosition(interiorId:Int, posX:Dynamic, posY:Dynamic, posZ:Dynamic):Dynamic

@:native("GetInteriorRoomCount")staticgetInteriorRoomCount(interiorId:Int):Int

@:native("GetInteriorRoomExtents")staticgetInteriorRoomExtents(interiorId:Int, roomIndex:Int, bbMinX:Dynamic, bbMinY:Dynamic, bbMinZ:Dynamic, bbMaxX:Dynamic, bbMaxY:Dynamic, bbMaxZ:Dynamic):Dynamic

@:native("GetInteriorRoomFlag")staticgetInteriorRoomFlag(interiorId:Int, roomIndex:Int):Int

@:native("GetInteriorRoomIndexByHash")staticgetInteriorRoomIndexByHash(interiorId:Int, roomHash:Int):Int

@:native("GetInteriorRoomName")staticgetInteriorRoomName(interiorId:Int, roomIndex:Int):String

@:native("GetInteriorRoomTimecycle")staticgetInteriorRoomTimecycle(interiorId:Int, roomIndex:Int):Int

@:native("GetInteriorRotation")staticgetInteriorRotation(interiorId:Int, rotx:Dynamic, rotY:Dynamic, rotZ:Dynamic, rotW:Dynamic):Dynamic

@:native("GetInvokingResource")staticgetInvokingResource():String

@:native("GetKillFallHeight")staticgetKillFallHeight():Float

A getter for SET_KILL_FALL_HEIGHT.

@:native("GetMapZoomDataLevel")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.

@:native("GetMapdataEntityHandle")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.

@:native("GetMapdataEntityMatrix")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].

@:native("GetMapdataFromHashKey")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.

@:native("GetMinimapType")staticgetMinimapType():Int

Get the minimap type:

0 = Off,

1 = Regular,

2 = Expanded,

3 = Simple,

@:native("GetNetworkWalkMode")staticgetNetworkWalkMode():Dynamic

@:native("GetNuiCursorPosition")staticgetNuiCursorPosition(x:Dynamic, y:Dynamic):Dynamic

@:native("GetNumResourceMetadata")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

@:native("GetNumResources")staticgetNumResources():Int

@:native("GetNumberOfPedCollectionDrawableVariations")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.

@:native("GetNumberOfPedCollectionPropDrawableVariations")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.

@:native("GetNumberOfPedCollectionPropTextureVariations")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.

@:native("GetNumberOfPedCollectionTextureVariations")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.

@:native("GetParkedVehicleDensityMultiplier")staticgetParkedVehicleDensityMultiplier():Float

@:native("GetPauseMapPointerWorldPosition")staticgetPauseMapPointerWorldPosition():Dynamic

Returns the world position the pointer is hovering on the pause map.

@:native("GetPedBoneMatrix")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

@:native("GetPedCollectionLocalIndexFromDrawable")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.

@:native("GetPedCollectionLocalIndexFromProp")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.

@:native("GetPedCollectionName")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.

@:native("GetPedCollectionNameFromDrawable")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.

@:native("GetPedCollectionNameFromProp")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.

@:native("GetPedCollectionsCount")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.

@:native("GetPedDecorations")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.

@:native("GetPedDensityMultiplier")staticgetPedDensityMultiplier():Float

@:native("GetPedDrawableGlobalIndexFromCollection")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.

@:native("GetPedDrawableVariationCollectionLocalIndex")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.

@:native("GetPedDrawableVariationCollectionName")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.

@:native("GetPedEyeColor")staticgetPedEyeColor(ped:Dynamic):Int

A getter for _SET_PED_EYE_COLOR. Returns -1 if fails to get.

@:native("GetPedFaceFeature")staticgetPedFaceFeature(ped:Dynamic, index:Int):Float

A getter for _SET_PED_FACE_FEATURE. Returns 0.0 if fails to get.

@:native("GetPedHairColor")staticgetPedHairColor(ped:Dynamic):Int

A getter for _SET_PED_HAIR_COLOR. Returns -1 if fails to get.

@:native("GetPedHairHighlightColor")staticgetPedHairHighlightColor(ped:Dynamic):Int

A getter for _SET_PED_HAIR_COLOR. Returns -1 if fails to get.

@:native("GetPedHeadOverlayData")staticgetPedHeadOverlayData(ped:Dynamic, index:Int, overlayValue:Dynamic, colourType:Dynamic, firstColour:Dynamic, secondColour:Dynamic, overlayOpacity:Dynamic):Bool

@:native("GetPedModelHealthConfig")staticgetPedModelHealthConfig(modelHash:Int):Int

Gets a ped model's health config.

@:native("GetPedModelPersonality")staticgetPedModelPersonality(modelHash:Int):Int

Gets a ped model's personality type.

@:native("GetPedMovementClipset")staticgetPedMovementClipset(ped:Dynamic):Int

@:native("GetPedPropCollectionLocalIndex")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.

@:native("GetPedPropCollectionName")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.

@:native("GetPedPropGlobalIndexFromCollection")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.

@:native("GetPedScale")staticgetPedScale(ped:Dynamic):Float

@:native("GetPedSweat")staticgetPedSweat(ped:Dynamic):Float

A getter for SET_PED_SWEAT.

@:native("GetPedWetness")staticgetPedWetness(ped:Dynamic):Float

@:native("GetPedWetnessHeight")staticgetPedWetnessHeight(ped:Dynamic):Float

@:native("GetPlayerFromServerId")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.

@:native("GetPlayerFromStateBagName")staticgetPlayerFromStateBagName(bagName:String):Int

On the server this will return the players source, on the client it will return the player handle.

@:native("GetPlayerInvincible_2")staticgetPlayerInvincible2(player:Dynamic):Bool

Unlike GET_PLAYER_INVINCIBLE this native gets both SET_PLAYER_INVINCIBLE_KEEP_RAGDOLL_ENABLED and SET_PLAYER_INVINCIBLE invincibility state.

@:native("GetPlayerKillFallHeight")staticgetPlayerKillFallHeight():Float

@:native("GetPlayerMaxStamina")staticgetPlayerMaxStamina(playerId:Dynamic):Float

@:native("GetPlayerMeleeWeaponDamageModifier")staticgetPlayerMeleeWeaponDamageModifier(playerId:Dynamic):Float

@:native("GetPlayerMeleeWeaponDefenseModifier")staticgetPlayerMeleeWeaponDefenseModifier(playerId:Dynamic):Float

@:native("GetPlayerServerId")staticgetPlayerServerId(player:Dynamic):Int

@:native("GetPlayerStamina")staticgetPlayerStamina(playerId:Dynamic):Float

@:native("GetPlayerVehicleDamageModifier")staticgetPlayerVehicleDamageModifier(playerId:Dynamic):Float

@:native("GetPlayerVehicleDefenseModifier")staticgetPlayerVehicleDefenseModifier(playerId:Dynamic):Float

@:native("GetPlayerWeaponDamageModifier")staticgetPlayerWeaponDamageModifier(playerId:Dynamic):Float

@:native("GetPlayerWeaponDefenseModifier")staticgetPlayerWeaponDefenseModifier(playerId:Dynamic):Float

@:native("GetPlayerWeaponDefenseModifier_2")staticgetPlayerWeaponDefenseModifier2(playerId:Dynamic):Float

@:native("GetRandomVehicleDensityMultiplier")staticgetRandomVehicleDensityMultiplier():Float

A getter for SET_RANDOM_VEHICLE_DENSITY_MULTIPLIER_THIS_FRAME.

Same as vehicle density multiplier.

@:native("GetRegisteredCommands")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,

}

]

@:native("GetResourceByFindIndex")staticgetResourceByFindIndex(findIndex:Int):String

@:native("GetResourceCommands")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,

}

]

@:native("GetResourceKvpFloat")staticgetResourceKvpFloat(key:String):Float

@:native("GetResourceKvpInt")staticgetResourceKvpInt(key:String):Int

A getter for SET_RESOURCE_KVP_INT.

@:native("GetResourceKvpString")staticgetResourceKvpString(key:String):String

A getter for SET_RESOURCE_KVP.

@:native("GetResourceMetadata")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

@:native("GetResourceState")staticgetResourceState(resourceName:String):String

Returns the current state of the specified resource.

@:native("GetRopeFlags")staticgetRopeFlags(rope:Int):Int

enum eRopeFlags

{

    DrawShadowEnabled = 2,

	Breakable = 4,

	RopeUnwindingFront = 8,

	RopeWinding = 32

}

@:native("GetRopeLengthChangeRate")staticgetRopeLengthChangeRate(rope:Int):Float

@:native("GetRopeTimeMultiplier")staticgetRopeTimeMultiplier(rope:Int):Float

@:native("GetRopeUpdateOrder")staticgetRopeUpdateOrder(rope:Int):Int

@:native("GetRuntimeTextureHeight")staticgetRuntimeTextureHeight(tex:Int):Int

Gets the height of the specified runtime texture.

@:native("GetRuntimeTexturePitch")staticgetRuntimeTexturePitch(tex:Int):Int

Gets the row pitch of the specified runtime texture, for use when creating data for SET_RUNTIME_TEXTURE_ARGB_DATA.

@:native("GetRuntimeTextureWidth")staticgetRuntimeTextureWidth(tex:Int):Int

Gets the width of the specified runtime texture.

@:native("GetScenarioPedDensityMultiplier")staticgetScenarioPedDensityMultiplier():Float

@:native("GetShapeTestResultIncludingMaterial")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.

@:native("GetStateBagKeys")staticgetStateBagKeys(bagName:String):Dynamic

@:native("GetStateBagValue")staticgetStateBagValue(bagName:String, key:String):Dynamic

Returns the value of a state bag key.

@:native("GetTimecycleModifierCount")staticgetTimecycleModifierCount():Int

@:native("GetTimecycleModifierIndexByName")staticgetTimecycleModifierIndexByName(modifierName:String):Int

@:native("GetTimecycleModifierNameByIndex")staticgetTimecycleModifierNameByIndex(modifierIndex:Int):String

@:native("GetTimecycleModifierStrength")staticgetTimecycleModifierStrength():Float

@:native("GetTimecycleModifierVar")staticgetTimecycleModifierVar(modifierName:String, varName:String, value1:Dynamic, value2:Dynamic):Bool

@:native("GetTimecycleModifierVarCount")staticgetTimecycleModifierVarCount(modifierName:String):Int

@:native("GetTimecycleModifierVarNameByIndex")staticgetTimecycleModifierVarNameByIndex(modifierName:String, modifierVarIndex:Int):String

@:native("GetTimecycleVarCount")staticgetTimecycleVarCount():Int

Returns the amount of variables available to be applied on timecycle modifiers.

@:native("GetTimecycleVarDefaultValueByIndex")staticgetTimecycleVarDefaultValueByIndex(varIndex:Int):Float

@:native("GetTimecycleVarNameByIndex")staticgetTimecycleVarNameByIndex(varIndex:Int):String

@:native("GetTrackBrakingDistance")staticgetTrackBrakingDistance(track:Int):Float

@:native("GetTrackMaxSpeed")staticgetTrackMaxSpeed(track:Int):Float

@:native("GetTrackNodeCoords")staticgetTrackNodeCoords(trackIndex:Int, trackNode:Int, coords:Dynamic):Dynamic

Gets the coordinates of a specific track node.

@:native("GetTrackNodeCount")staticgetTrackNodeCount(trackIndex:Int):Int

Gets the specified tracks node count.

@:native("GetTrainCruiseSpeed")staticgetTrainCruiseSpeed(train:Dynamic):Float

Gets the trains desired speed.

@:native("GetTrainCurrentTrackNode")staticgetTrainCurrentTrackNode(train:Dynamic):Int

@:native("GetTrainDirection")staticgetTrainDirection(train:Dynamic):Bool

Gets the direction the train is facing

@:native("GetTrainDoorCount")staticgetTrainDoorCount(train:Dynamic):Int

Gets the door count for the specified train.

@:native("GetTrainDoorOpenRatio")staticgetTrainDoorOpenRatio(train:Dynamic, doorIndex:Int):Float

Gets the ratio that a door is open for on a train.

@:native("GetTrainSpeed")staticgetTrainSpeed(train:Dynamic):Float

Gets the speed the train is currently going.

@:native("GetTrainState")staticgetTrainState(train:Dynamic):Int

@:native("GetTrainTrackIndex")staticgetTrainTrackIndex(train:Dynamic):Int

@:native("GetVehicleAlarmTimeLeft")staticgetVehicleAlarmTimeLeft(vehicle:Dynamic):Int

@:native("GetVehicleCheatPowerIncrease")staticgetVehicleCheatPowerIncrease(vehicle:Dynamic):Float

@:native("GetVehicleClutch")staticgetVehicleClutch(vehicle:Dynamic):Float

@:native("GetVehicleCurrentGear")staticgetVehicleCurrentGear(vehicle:Dynamic):Int

@:native("GetVehicleCurrentRpm")staticgetVehicleCurrentRpm(vehicle:Dynamic):Float

@:native("GetVehicleDashboardBoost")staticgetVehicleDashboardBoost():Float

@:native("GetVehicleDashboardCurrentGear")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.

@:native("GetVehicleDashboardFuel")staticgetVehicleDashboardFuel():Float

@:native("GetVehicleDashboardLights")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

@:native("GetVehicleDashboardOilPressure")staticgetVehicleDashboardOilPressure():Float

@:native("GetVehicleDashboardOilTemp")staticgetVehicleDashboardOilTemp():Float

@:native("GetVehicleDashboardRpm")staticgetVehicleDashboardRpm():Float

@:native("GetVehicleDashboardSpeed")staticgetVehicleDashboardSpeed(vehicle:Dynamic):Float

@:native("GetVehicleDashboardTemp")staticgetVehicleDashboardTemp():Float

@:native("GetVehicleDashboardVacuum")staticgetVehicleDashboardVacuum():Float

@:native("GetVehicleDensityMultiplier")staticgetVehicleDensityMultiplier():Float

@:native("GetVehicleDrawnWheelAngleMult")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.

@:native("GetVehicleEngineTemperature")staticgetVehicleEngineTemperature(vehicle:Dynamic):Float

@:native("GetVehicleFuelLevel")staticgetVehicleFuelLevel(vehicle:Dynamic):Float

@:native("GetVehicleGearRatio")staticgetVehicleGearRatio(vehicle:Dynamic, gear:Int):Float

Gets vehicles gear ratio on choosen gear.

@:native("GetVehicleGravityAmount")staticgetVehicleGravityAmount(vehicle:Dynamic):Float

@:native("GetVehicleHandbrake")staticgetVehicleHandbrake(vehicle:Dynamic):Bool

@:native("GetVehicleHandlingFloat")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')

@:native("GetVehicleHandlingInt")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')

@:native("GetVehicleHandlingVector")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')

@:native("GetVehicleHasFlag")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).

@:native("GetVehicleHighGear")staticgetVehicleHighGear(vehicle:Dynamic):Int

@:native("GetVehicleIndicatorLights")staticgetVehicleIndicatorLights(vehicle:Dynamic):Int

Gets the vehicle indicator light state. 0 = off, 1 = left, 2 = right, 3 = both

@:native("GetVehicleLightMultiplier")staticgetVehicleLightMultiplier(vehicle:Dynamic):Float

@:native("GetVehicleNextGear")staticgetVehicleNextGear(vehicle:Dynamic):Int

@:native("GetVehicleNumberOfWheels")staticgetVehicleNumberOfWheels(vehicle:Dynamic):Int

@:native("GetVehicleOilLevel")staticgetVehicleOilLevel(vehicle:Dynamic):Float

@:native("GetVehicleSteeringAngle")staticgetVehicleSteeringAngle(vehicle:Dynamic):Float

@:native("GetVehicleSteeringScale")staticgetVehicleSteeringScale(vehicle:Dynamic):Float

@:native("GetVehicleThrottleOffset")staticgetVehicleThrottleOffset(vehicle:Dynamic):Float

@:native("GetVehicleTopSpeedModifier")staticgetVehicleTopSpeedModifier(vehicle:Dynamic):Float

A getter for MODIFY_VEHICLE_TOP_SPEED. Returns -1.0 if a modifier is not set.

@:native("GetVehicleTurboPressure")staticgetVehicleTurboPressure(vehicle:Dynamic):Float

@:native("GetVehicleType")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

@:native("GetVehicleTypeRaw")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,

};

@:native("GetVehicleWheelBrakePressure")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.

@:native("GetVehicleWheelFlags")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.

@:native("GetVehicleWheelHealth")staticgetVehicleWheelHealth(vehicle:Dynamic, wheelIndex:Int):Float

@:native("GetVehicleWheelIsPowered")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.

@:native("GetVehicleWheelPower")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.

@:native("GetVehicleWheelRimColliderSize")staticgetVehicleWheelRimColliderSize(vehicle:Dynamic, wheelIndex:Int):Float

@:native("GetVehicleWheelRotationSpeed")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.

@:native("GetVehicleWheelSize")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).

@:native("GetVehicleWheelSpeed")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.

@:native("GetVehicleWheelSteeringAngle")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.

@:native("GetVehicleWheelSurfaceMaterial")staticgetVehicleWheelSurfaceMaterial(vehicle:Dynamic, wheelIndex:Int):Int

@:native("GetVehicleWheelSuspensionCompression")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.

@:native("GetVehicleWheelTireColliderSize")staticgetVehicleWheelTireColliderSize(vehicle:Dynamic, wheelIndex:Int):Float

@:native("GetVehicleWheelTireColliderWidth")staticgetVehicleWheelTireColliderWidth(vehicle:Dynamic, wheelIndex:Int):Float

@:native("GetVehicleWheelTractionVectorLength")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.

@:native("GetVehicleWheelWidth")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).

@:native("GetVehicleWheelXOffset")staticgetVehicleWheelXOffset(vehicle:Dynamic, wheelIndex:Int):Float

Returns the offset of the specified wheel relative to the wheel's axle center.

@:native("GetVehicleWheelYRotation")staticgetVehicleWheelYRotation(vehicle:Dynamic, wheelIndex:Int):Float

@:native("GetVehicleWheelieState")staticgetVehicleWheelieState(vehicle:Dynamic):Int

List of known states:

1: Not wheeling.

65: Vehicle is ready to do wheelie (burnouting).

129: Vehicle is doing wheelie.

@:native("GetVehicleXenonLightsCustomColor")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.

@:native("GetVehicleXmasSnowFactor")staticgetVehicleXmasSnowFactor():Float

@:native("GetVisualSettingFloat")staticgetVisualSettingFloat(name:String):Float

@:native("GetWaterQuadAlpha")staticgetWaterQuadAlpha(waterQuad:Int, a0:Dynamic, a1:Dynamic, a2:Dynamic, a3:Dynamic):Bool

@:native("GetWaterQuadAtCoords")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)

@:native("GetWaterQuadAtCoords_3d")staticgetWaterQuadAtCoords3D(x:Float, y:Float, z:Float):Int

This alternative implementation of GetWaterQuadAtCoords also checks the height of the water level.

@:native("GetWaterQuadBounds")staticgetWaterQuadBounds(waterQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool

@:native("GetWaterQuadCount")staticgetWaterQuadCount():Int

@:native("GetWaterQuadHasLimitedDepth")staticgetWaterQuadHasLimitedDepth(waterQuad:Int, hasLimitedDepth:Dynamic):Bool

@:native("GetWaterQuadIsInvisible")staticgetWaterQuadIsInvisible(waterQuad:Int, isInvisible:Dynamic):Bool

@:native("GetWaterQuadLevel")staticgetWaterQuadLevel(waterQuad:Int, waterQuadLevel:Dynamic):Bool

*level is defined as "z" in water.xml

@:native("GetWaterQuadNoStencil")staticgetWaterQuadNoStencil(waterQuad:Int, noStencil:Dynamic):Bool

@:native("GetWaterQuadType")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

@:native("GetWaveQuadAmplitude")staticgetWaveQuadAmplitude(waveQuad:Int, waveQuadAmplitude:Dynamic):Bool

@:native("GetWaveQuadAtCoords")staticgetWaveQuadAtCoords(x:Float, y:Float):Int

This native returns the index of a wave quad if the given point is inside its bounds.

@:native("GetWaveQuadBounds")staticgetWaveQuadBounds(waveQuad:Int, minX:Dynamic, minY:Dynamic, maxX:Dynamic, maxY:Dynamic):Bool

@:native("GetWaveQuadCount")staticgetWaveQuadCount():Int

@:native("GetWaveQuadDirection")staticgetWaveQuadDirection(waveQuad:Int, directionX:Dynamic, directionY:Dynamic):Bool

@:native("GetWeaponAccuracySpread")staticgetWeaponAccuracySpread(weaponHash:Int):Float

A getter for the accuracy spread of a weapon.

@:native("GetWeaponAnimationOverride")staticgetWeaponAnimationOverride(ped:Dynamic):Int

@:native("GetWeaponComponentAccuracyModifier")staticgetWeaponComponentAccuracyModifier(componentHash:Int):Float

A getter for CWeaponAccuracyModifier in a weapon component.

@:native("GetWeaponComponentCameraHash")staticgetWeaponComponentCameraHash(componentHash:Int):Int

A getter for CameraHash in a weapon scope component.

@:native("GetWeaponComponentClipSize")staticgetWeaponComponentClipSize(componentHash:Int):Int

A getter for ClipSize in a weapon component.

@:native("GetWeaponComponentDamageModifier")staticgetWeaponComponentDamageModifier(componentHash:Int):Float

A getter for CWeaponDamageModifier in a weapon component.

@:native("GetWeaponComponentRangeDamageModifier")staticgetWeaponComponentRangeDamageModifier(componentHash:Int):Float

A getter for CWeaponFallOffModifier damage modifier value in a weapon component.

@:native("GetWeaponComponentRangeModifier")staticgetWeaponComponentRangeModifier(componentHash:Int):Float

A getter for CWeaponFallOffModifier range modifier value in a weapon component.

@:native("GetWeaponComponentReticuleHash")staticgetWeaponComponentReticuleHash(componentHash:Int):Int

A getter for ReticuleHash in a weapon scope component.

@:native("GetWeaponDamageModifier")staticgetWeaponDamageModifier(weaponHash:Int):Float

@:native("GetWeaponRecoilShakeAmplitude")staticgetWeaponRecoilShakeAmplitude(weaponHash:Int):Float

A getter for the recoil shake amplitude of a weapon.

@:native("GetWorldCoordFromScreenCoord")staticgetWorldCoordFromScreenCoord(screenX:Float, screenY:Float, worldVector:Dynamic, normalVector:Dynamic):Dynamic

Converts a screen coordinate into its relative world coordinate.

@:native("HasMinimapOverlayLoaded")statichasMinimapOverlayLoaded(id:Int):Bool

Returns whether or not the specific minimap overlay has loaded.

@:native("IsAceAllowed")staticisAceAllowed(object:String):Bool

@:native("IsBigmapActive")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.

@:native("IsBigmapFull")staticisBigmapFull():Bool

@:native("IsDisabledRawKeyDown")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

@:native("IsDisabledRawKeyPressed")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

@:native("IsDisabledRawKeyReleased")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

@:native("IsDisabledRawKeyUp")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

@:native("IsDuiAvailable")staticisDuiAvailable(duiObject:Int):Bool

Returns whether or not a browser is created for a specified DUI browser object.

@:native("IsDuplicityVersion")staticisDuplicityVersion():Bool

Gets whether or not this is the CitizenFX server.

@:native("IsEntityPositionFrozen")staticisEntityPositionFrozen(entity:Dynamic):Dynamic

@:native("IsGameEnhancedVersion")staticisGameEnhancedVersion():Bool

@:native("IsNuiFocusKeepingInput")staticisNuiFocusKeepingInput():Bool

Checks if keyboard input is enabled during NUI focus using SET_NUI_FOCUS_KEEP_INPUT.

@:native("IsNuiFocused")staticisNuiFocused():Bool

Returns the current NUI focus state previously set with SET_NUI_FOCUS.

@:native("IsPedCollectionComponentVariationGen9Exclusive")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.

@:native("IsPedCollectionComponentVariationValid")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.

@:native("IsPedComponentVariationGen9Exclusive")staticisPedComponentVariationGen9Exclusive(ped:Dynamic, componentId:Int, drawableId:Int):Dynamic

@:native("IsPrincipalAceAllowed")staticisPrincipalAceAllowed(principal:String, object:String):Bool

@:native("IsRawKeyDown")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

@:native("IsRawKeyPressed")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

@:native("IsRawKeyReleased")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

@:native("IsRawKeyUp")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

@:native("IsStreamingFileReady")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.

@:native("IsTrackEnabled")staticisTrackEnabled(track:Int):Dynamic

@:native("IsTrackSwitchedOff")staticisTrackSwitchedOff(track:Int):Dynamic

Getter for SWITCH_TRAIN_TRACK. Determines if ambient trains are able to spawn on this track.

@:native("IsVehicleAlarmSet")staticisVehicleAlarmSet(vehicle:Dynamic):Bool

@:native("IsVehicleEngineStarting")staticisVehicleEngineStarting(vehicle:Dynamic):Bool

@:native("IsVehicleInteriorLightOn")staticisVehicleInteriorLightOn(vehicle:Dynamic):Bool

@:native("IsVehicleNeedsToBeHotwired")staticisVehicleNeedsToBeHotwired(vehicle:Dynamic):Bool

@:native("IsVehiclePreviouslyOwnedByPlayer")staticisVehiclePreviouslyOwnedByPlayer(vehicle:Dynamic):Bool

@:native("IsVehicleWanted")staticisVehicleWanted(vehicle:Dynamic):Bool

@:native("IsVehicleWheelBrokenOff")staticisVehicleWheelBrokenOff(vehicle:Dynamic, wheelIndex:Int):Bool

@:native("LeaveCursorMode")staticleaveCursorMode():Dynamic

Leaves cursor mode. This function supports SDK infrastructure and is not intended to be used directly from your code.

@:native("LoadResourceFile")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")

@:native("LoadWaterFromPath")staticloadWaterFromPath(resourceName:String, fileName:String):Bool

Define the xml in a resources fxmanifest, under the file(s) section.

@:native("MumbleAddVoiceChannelListen")staticmumbleAddVoiceChannelListen(channel:Int):Dynamic

Starts listening to the specified channel, when available.

@:native("MumbleAddVoiceTargetChannel")staticmumbleAddVoiceTargetChannel(targetId:Int, channel:Int):Dynamic

Adds the specified channel to the target list for the specified Mumble voice target ID.

@:native("MumbleAddVoiceTargetPlayer")staticmumbleAddVoiceTargetPlayer(targetId:Int, player:Dynamic):Dynamic

Adds the specified player to the target list for the specified Mumble voice target ID.

@:native("MumbleAddVoiceTargetPlayerByServerId")staticmumbleAddVoiceTargetPlayerByServerId(targetId:Int, serverId:Int):Dynamic

Adds the specified player to the target list for the specified Mumble voice target ID.

@:native("MumbleClearVoiceChannel")staticmumbleClearVoiceChannel():Dynamic

@:native("MumbleClearVoiceTarget")staticmumbleClearVoiceTarget(targetId:Int):Dynamic

Clears the target list for the specified Mumble voice target ID.

@:native("MumbleClearVoiceTargetChannels")staticmumbleClearVoiceTargetChannels(targetId:Int):Dynamic

Clears channels from the target list for the specified Mumble voice target ID.

@:native("MumbleClearVoiceTargetPlayers")staticmumbleClearVoiceTargetPlayers(targetId:Int):Dynamic

Clears players from the target list for the specified Mumble voice target ID.

@:native("MumbleDoesChannelExist")staticmumbleDoesChannelExist(channel:Int):Bool

Check whether specified channel exists on the Mumble server.

@:native("MumbleGetTalkerProximity")staticmumbleGetTalkerProximity():Float

@:native("MumbleGetVoiceChannelFromServerId")staticmumbleGetVoiceChannelFromServerId(serverId:Int):Int

Returns the mumble voice channel from a player's server id.

@:native("MumbleIsActive")staticmumbleIsActive():Bool

@:native("MumbleIsConnected")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.

@:native("MumbleIsPlayerTalking")staticmumbleIsPlayerTalking(player:Dynamic):Bool

@:native("MumbleRemoveVoiceChannelListen")staticmumbleRemoveVoiceChannelListen(channel:Int):Dynamic

Stops listening to the specified channel.

@:native("MumbleRemoveVoiceTargetChannel")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

@:native("MumbleRemoveVoiceTargetPlayer")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

@:native("MumbleRemoveVoiceTargetPlayerByServerId")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

@:native("MumbleSetActive")staticmumbleSetActive(state:Bool):Dynamic

@:native("MumbleSetAudioInputDistance")staticmumbleSetAudioInputDistance(distance:Float):Dynamic

Sets the current input distance. The player will be able to talk to other players within this distance.

@:native("MumbleSetAudioInputIntent")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):

IndexDescription
--
\speech\Default intent
\music\Disable noise suppression and high pass filter

@:native("MumbleSetAudioOutputDistance")staticmumbleSetAudioOutputDistance(distance:Float):Dynamic

Sets the current output distance. The player will be able to hear other players talking within this distance.

@:native("MumbleSetServerAddress")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.

@:native("MumbleSetSubmixForServerId")staticmumbleSetSubmixForServerId(serverId:Int, submixId:Int):Dynamic

Sets the audio submix ID for a specified player using Mumble 'Native Audio' functionality.

@:native("MumbleSetTalkerProximity")staticmumbleSetTalkerProximity(value:Float):Dynamic

@:native("MumbleSetVoiceChannel")staticmumbleSetVoiceChannel(channel:Int):Dynamic

@:native("MumbleSetVoiceTarget")staticmumbleSetVoiceTarget(targetId:Int):Dynamic

Sets the current Mumble voice target ID to broadcast voice to.

@:native("MumbleSetVolumeOverride")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.

@:native("MumbleSetVolumeOverrideByServerId")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.

@:native("NetworkDoesEntityExistWithNetworkId")staticnetworkDoesEntityExistWithNetworkId(netId:Int):Bool

@:native("NetworkGetEntityOwner")staticnetworkGetEntityOwner(entity:Dynamic):Int

Returns the owner ID of the specified entity.

@:native("OnesyncEnableRemoteAttachmentSanitization")staticonesyncEnableRemoteAttachmentSanitization(enable:Bool):Dynamic

Toggles a check that prevents attaching (networked) entities to remotely owned peds. This is disabled by default.

@:native("OverridePedsCanStandOnTopFlag")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.

@:native("OverridePedsUseDefaultDriveByClipset")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.

@:native("OverridePopGroups")staticoverridePopGroups(path:String):Dynamic

Replaces the popgroups (CPopGroupList) meta file with the file in the specified path.

@:native("OverrideReactionToVehicleSiren")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

}

@:native("OverrideVehiclePedsCanStandOnTopFlag")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.

@:native("PrepareLight")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.

@:native("ProfilerEnterScope")staticprofilerEnterScope(scopeName:String):Dynamic

Scope entry for profiler.

@:native("ProfilerExitScope")staticprofilerExitScope():Dynamic

Scope exit for profiler.

@:native("ProfilerIsRecording")staticprofilerIsRecording():Bool

Returns true if the profiler is active.

@:native("RegisterArchetypes")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.

@:native("RegisterCommand")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:

@:native("RegisterFontFile")staticregisterFontFile(fileName:String):Dynamic

Registers a specified .gfx file as GFx font library.

The .gfx file has to be registered with the streamer already.

@:native("RegisterFontId")staticregisterFontId(fontName:String):Int

Registers a specified font name for use with text draw commands.

@:native("RegisterKeyMapping")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.

@:native("RegisterNuiCallback")staticregisterNuiCallback(callbackType:String, callback:Function):Dynamic

@:native("RegisterNuiCallbackType")staticregisterNuiCallbackType(callbackType:String):Dynamic

@:native("RegisterRawKeymap")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();

@:native("RegisterRawNuiCallback")staticregisterRawNuiCallback(callbackType:String, callback:Function):Dynamic

@:native("RegisterResourceAsEventHandler")staticregisterResourceAsEventHandler(eventName:String):Dynamic

An internal function which allows the current resource's HLL script runtimes to receive state for the specified event.

@:native("RegisterRopeData")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.

@:native("RegisterStreamingFileFromCache")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.

@:native("RegisterStreamingFileFromKvs")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.

@:native("RegisterStreamingFileFromUrl")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.

@:native("RegisterTrackJunction")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

@:native("RemapRawKeymap")staticremapRawKeymap(keymapName:String, newRawKeyIndex:Int):Dynamic

Remaps the keymap bound to keymapName to newRawKeyIndex

Virtual key codes can be found here

@:native("RemoveConvarChangeListener")staticremoveConvarChangeListener(cookie:Int):Dynamic

@:native("RemoveDryVolume")staticremoveDryVolume(handle:Int):Dynamic

Removes a dry volume from the game session.

See CREATE_DRY_VOLUME for more info

@:native("RemoveHealthConfig")staticremoveHealthConfig(configName:String):Dynamic

Removes health config.

@:native("RemoveReplaceTexture")staticremoveReplaceTexture(origTxd:String, origTxn:String):Dynamic

Experimental natives, please do not use in a live environment.

@:native("RemoveStateBagChangeHandler")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.

@:native("RemoveTexture")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)

end

@:native("RemoveTimecycleModifier")staticremoveTimecycleModifier(modifierName:String):Dynamic

@:native("RemoveTimecycleModifierVar")staticremoveTimecycleModifierVar(modifierName:String, varName:String):Dynamic

@:native("RemoveTrackJunction")staticremoveTrackJunction(junctionIndex:Int):Dynamic

Removes the specified track junction.

@:native("RequestResourceFileSet")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.

@:native("ResetEntityDrawOutlineRenderTechnique")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.

@:native("ResetFlyThroughWindscreenParams")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.

@:native("ResetMapZoomDataLevel")staticresetMapZoomDataLevel(index:Int):Dynamic

Resets values from the zoom level data by index to defaults from mapzoomdata.meta.

@:native("ResetMapdataEntityMatrix")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.

@:native("ResetPedModelPersonality")staticresetPedModelPersonality(modelHash:Int):Dynamic

Restores an overridden ped model personality type to the default value.

@:native("ResetVehiclePedsCanStandOnTopFlag")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.

@:native("ResetWater")staticresetWater():Dynamic

Resets the water to the games default water.xml.

@:native("SelectEntityAtCursor")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.

@:native("SelectEntityAtPos")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.

@:native("SendDuiMessage")staticsendDuiMessage(duiObject:Int, jsonString:String):Dynamic

Sends a message to the specific DUI root page. This is similar to SEND_NUI_MESSAGE.

@:native("SendDuiMouseDown")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.

@:native("SendDuiMouseMove")staticsendDuiMouseMove(duiObject:Int, x:Int, y:Int):Dynamic

Injects a 'mouse move' event for a DUI object. Coordinates are in browser space.

@:native("SendDuiMouseUp")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.

@:native("SendDuiMouseWheel")staticsendDuiMouseWheel(duiObject:Int, deltaY:Int, deltaX:Int):Dynamic

Injects a 'mouse wheel' event for a DUI object.

@:native("SendLoadingScreenMessage")staticsendLoadingScreenMessage(jsonString:String):Bool

Sends a message to the loadingScreen NUI frame, which contains the HTML page referenced in loadscreen resources.

@:native("SendNuiMessage")staticsendNuiMessage(jsonString:String):Bool

@:native("SetAimCooldown")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

@:native("SetAudioSubmixEffectParamFloat")staticsetAudioSubmixEffectParamFloat(submixId:Int, effectSlot:Int, paramIndex:Int, paramValue:Float):Dynamic

Sets a floating-point parameter for a submix effect.

@:native("SetAudioSubmixEffectParamInt")staticsetAudioSubmixEffectParamInt(submixId:Int, effectSlot:Int, paramIndex:Int, paramValue:Int):Dynamic

Sets an integer parameter for a submix effect.

@:native("SetAudioSubmixEffectRadioFx")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):

IndexTypeDescription
---
\enabled\intEnables or disables RadioFX on this DSP.
\default\intSets 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

@:native("SetAudioSubmixOutputVolumes")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.

@:native("SetBackfaceculling")staticsetBackfaceculling(toggle:Bool):Dynamic

@:native("SetCalmingQuadBounds")staticsetCalmingQuadBounds(waterQuad:Int, minX:Int, minY:Int, maxX:Int, maxY:Int):Bool

@:native("SetCalmingQuadDampening")staticsetCalmingQuadDampening(calmingQuad:Int, dampening:Float):Bool

@:native("SetClientConfigBool")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.

@:native("SetCursorLocation")staticsetCursorLocation(x:Float, y:Float):Bool

@:native("SetDefaultVehicleNumberPlateTextPattern")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

  • 1 will lead to a random number from 0-9.
  • A will lead to a random letter from A-Z.
  • . will lead to a random letter or number, with 50% probability of being either.
  • ^1 will lead to a literal 1 being emitted.
  • ^A will lead to a literal A being emitted.
  • Any other character will lead to said character being emitted.
  • A string shorter than 8 characters will be padded on the right.

@:native("SetDiscordAppId")staticsetDiscordAppId(appId:String):Dynamic

This native sets the app id for the discord rich presence implementation.

@:native("SetDiscordRichPresenceAction")staticsetDiscordRichPresenceAction(index:Int, label:String, url:String):Dynamic

Sets a clickable button to be displayed in a player's Discord rich presence.

@:native("SetDiscordRichPresenceAsset")staticsetDiscordRichPresenceAsset(assetName:String):Dynamic

This native sets the image asset for the discord rich presence implementation.

@:native("SetDiscordRichPresenceAssetSmall")staticsetDiscordRichPresenceAssetSmall(assetName:String):Dynamic

This native sets the small image asset for the discord rich presence implementation.

@:native("SetDiscordRichPresenceAssetSmallText")staticsetDiscordRichPresenceAssetSmallText(text:String):Dynamic

This native sets the hover text of the small image asset for the discord rich presence implementation.

@:native("SetDiscordRichPresenceAssetText")staticsetDiscordRichPresenceAssetText(text:String):Dynamic

This native sets the hover text of the image asset for the discord rich presence implementation.

@:native("SetDrawOrigin")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.

@:native("SetDuiUrl")staticsetDuiUrl(duiObject:Int, url:String):Dynamic

Navigates the specified DUI browser to a different URL.

@:native("SetEmitterProbeLength")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.

@:native("SetEntityDrawOutline")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.

@:native("SetEntityDrawOutlineColor")staticsetEntityDrawOutlineColor(red:Int, green:Int, blue:Int, alpha:Int):Dynamic

Sets color for entity outline. 255, 0, 255, 255 by default.

@:native("SetEntityDrawOutlineRenderTechnique")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

wdcascade

@:native("SetEntityDrawOutlineShader")staticsetEntityDrawOutlineShader(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.

@:native("SetEntityMatrix")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.

@:native("SetFallDamageLandOnFootMultiplier")staticsetFallDamageLandOnFootMultiplier(multiplier:Float):Dynamic

@:native("SetFallDamageMultiplier")staticsetFallDamageMultiplier(multiplier:Float):Dynamic

@:native("SetFlashLightKeepOnWhileMoving")staticsetFlashLightKeepOnWhileMoving(state:Bool):Dynamic

Allows Weapon-Flashlight beams to stay visible while moving. Normally it only stays on while aiming.

@:native("SetFlyThroughWindscreenParams")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.

@:native("SetFogVolumeRenderDisabled")staticsetFogVolumeRenderDisabled(state:Bool):Dynamic

This completely disables rendering of fog volumes (vfxfogvolumeinfo.ymt).

@:native("SetFuelConsumptionRateMultiplier")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.

@:native("SetFuelConsumptionState")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.

@:native("SetGlobalPassengerMassMultiplier")staticsetGlobalPassengerMassMultiplier(massMul:Float):Dynamic

@:native("SetHandlingField")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)

@:native("SetHandlingFloat")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)

@:native("SetHandlingInt")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.

@:native("SetHandlingVector")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))

@:native("SetHealthConfigDefaultArmor")staticsetHealthConfigDefaultArmor(configName:String, newValue:Float):Dynamic

Sets default armor value for specific health config.

@:native("SetHealthConfigDefaultEndurance")staticsetHealthConfigDefaultEndurance(configName:String, newValue:Float):Dynamic

Sets default endurance value for specific health config.

@:native("SetHealthConfigDefaultHealth")staticsetHealthConfigDefaultHealth(configName:String, newValue:Float):Dynamic

Sets default health value for specific health config.

@:native("SetHealthConfigDogTakedownThreshold")staticsetHealthConfigDogTakedownThreshold(configName:String, newValue:Float):Dynamic

Sets default dog takedown threshold value for specific health config.

@:native("SetHealthConfigDyingThreshold")staticsetHealthConfigDyingThreshold(configName:String, newValue:Float):Dynamic

Sets default dying health threshold value for specific health config.

@:native("SetHealthConfigFatiguedThreshold")staticsetHealthConfigFatiguedThreshold(configName:String, newValue:Float):Dynamic

Sets default fatigued health threshold value for specific health config.

@:native("SetHealthConfigHurtThreshold")staticsetHealthConfigHurtThreshold(configName:String, newValue:Float):Dynamic

Sets default hurt health threshold value for specific health config.

@:native("SetHealthConfigInjuredThreshold")staticsetHealthConfigInjuredThreshold(configName:String, newValue:Float):Dynamic

Sets default injured health threshold value for specific health config.

@:native("SetHealthConfigInvincible")staticsetHealthConfigInvincible(configName:String, newValue:Bool):Dynamic

Sets default invincible value for specific health config.

@:native("SetHealthConfigMeleeFatalAttack")staticsetHealthConfigMeleeFatalAttack(configName:String, newValue:Bool):Dynamic

Sets default melee cardinal fatal attack value for specific health config.

@:native("SetHealthConfigWritheFromBulletThreshold")staticsetHealthConfigWritheFromBulletThreshold(configName:String, newValue:Float):Dynamic

Sets default writhe from bullet threshold value for specific health config.

@:native("SetHudComponentAlign")staticsetHudComponentAlign(id:Int, horizontalAlign:Int, verticalAlign:Int):Dynamic

See SET_SCRIPT_GFX_ALIGN for details about how gfx align works.

@:native("SetHudComponentSize")staticsetHudComponentSize(id:Int, x:Float, y:Float):Dynamic

@:native("SetIgnoreVehicleOwnershipForStowing")staticsetIgnoreVehicleOwnershipForStowing(ignore:Bool):Dynamic

Sets whether or not ownership checks should be performed while trying to stow a carriable on a hunting wagon.

@:native("SetInteriorPortalCornerPosition")staticsetInteriorPortalCornerPosition(interiorId:Int, portalIndex:Int, cornerIndex:Int, posX:Float, posY:Float, posZ:Float):Dynamic

@:native("SetInteriorPortalEntityFlag")staticsetInteriorPortalEntityFlag(interiorId:Int, portalIndex:Int, entityIndex:Int, flag:Int):Dynamic

@:native("SetInteriorPortalFlag")staticsetInteriorPortalFlag(interiorId:Int, portalIndex:Int, flag:Int):Dynamic

@:native("SetInteriorPortalRoomFrom")staticsetInteriorPortalRoomFrom(interiorId:Int, portalIndex:Int, roomFrom:Int):Dynamic

@:native("SetInteriorPortalRoomTo")staticsetInteriorPortalRoomTo(interiorId:Int, portalIndex:Int, roomTo:Int):Dynamic

@:native("SetInteriorProbeLength")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

@:native("SetInteriorRoomExtents")staticsetInteriorRoomExtents(interiorId:Int, roomIndex:Int, bbMinX:Float, bbMinY:Float, bbMinZ:Float, bbMaxX:Float, bbMaxY:Float, bbMaxZ:Float):Dynamic

@:native("SetInteriorRoomFlag")staticsetInteriorRoomFlag(interiorId:Int, roomIndex:Int, flag:Int):Dynamic

@:native("SetInteriorRoomTimecycle")staticsetInteriorRoomTimecycle(interiorId:Int, roomIndex:Int, timecycleHash:Int):Dynamic

@:native("SetKeyMappingHideResources")staticsetKeyMappingHideResources(hide:Dynamic):Dynamic

Toggles the visibility of resource names in the FiveM key mapping page.

@:native("SetKillFallHeight")staticsetKillFallHeight(height:Float):Dynamic

A setter for GET_KILL_FALL_HEIGHT.

@:native("SetLightAlpha")staticsetLightAlpha(alpha:Float):Dynamic

Set the alpha transparency of the light.

@:native("SetLightAo")staticsetLightAo(intensity:Float, radius:Float, bias:Float, intensity2:Float):Dynamic

Set ambient occlusion (AO) parameters for a specified light.

@:native("SetLightCapsuleSize")staticsetLightCapsuleSize(size:Float):Dynamic

Set the capsule size of a specified light.

@:native("SetLightClipRect")staticsetLightClipRect(x:Int, y:Int, width:Int, height:Int):Dynamic

Set the clip rectangle for a created light.

@:native("SetLightColor")staticsetLightColor(r:Int, g:Int, b:Int):Dynamic

Set the color of a specified light.

@:native("SetLightCone")staticsetLightCone(innerConeAngle:Float, outerConeAngle:Float):Dynamic

Set the inner and outer cone angles of a specified light.

@:native("SetLightCoords")staticsetLightCoords(x:Float, y:Float, z:Float):Dynamic

Set the world coordinates of a specified light.

@:native("SetLightDirection")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).

@:native("SetLightExtraflags")staticsetLightExtraflags(extraFlags:Int):Dynamic

Set additional configuration flags for an existing light

@:native("SetLightFadeDistance")staticsetLightFadeDistance(fadeDistance:Int):Dynamic

Set the fade distance.

@:native("SetLightFalloff")staticsetLightFalloff(falloff:Float):Dynamic

Adjust the falloff parameter for an existing light, affecting how light intensity decreases over distance.

@:native("SetLightFlags")staticsetLightFlags(flags:Int):Dynamic

Set or update specific flags for a created light to control its behavior or properties.

@:native("SetLightHeadlight")staticsetLightHeadlight(intensity:Float, range:Float):Dynamic

Set the headlight properties of a created light, adjusting its intensity and range.

@:native("SetLightIntensity")staticsetLightIntensity(intensity:Float):Dynamic

Set the intensity of an existing light.

@:native("SetLightInterior")staticsetLightInterior(interiorId:Int, isPortal:Dynamic, roomIndex:Int):Dynamic

Set the interior and room where the light should be active.

@:native("SetLightPlane")staticsetLightPlane(x:Float, y:Float, z:Float, w:Float):Dynamic

Set the plane parameters for a light.

@:native("SetLightRadius")staticsetLightRadius(radius:Float):Dynamic

Set the radius of a created light.

@:native("SetLightShadowDetails")staticsetLightShadowDetails(shadowFlags:Int, shadowDistance:Float, shadowFade:Float, shadowDepthBiasScale:Float):Dynamic

Set the shadow details for a created light.

@:native("SetLightShadowFadeDistance")staticsetLightShadowFadeDistance(fadeDistance:Int):Dynamic

Set the fade distance for the shadows of a created light.

@:native("SetLightSpecularFadeDistance")staticsetLightSpecularFadeDistance(fadeDistance:Int):Dynamic

Set the specular fade distance for a created light.

@:native("SetLightTexture")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.

@:native("SetLightType")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)

@:native("SetLightVolumeDetails")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.

@:native("SetLightVolumetricFadeDistance")staticsetLightVolumetricFadeDistance(volumetricFadeDistance:Int):Dynamic

Set the fade distance for volumetric lightingn.

@:native("SetManualShutdownLoadingScreenNui")staticsetManualShutdownLoadingScreenNui(manualShutdown:Bool):Dynamic

Note: This native is deprecated and doesn't work anymore. Use loadscreen_manual_shutdown in the fxmanifest.lua instead.

@:native("SetMapZoomDataLevel")staticsetMapZoomDataLevel(index:Int, zoomScale:Float, zoomSpeed:Float, scrollSpeed:Float, tilesX:Float, tilesY:Float):Dynamic

Sets values to the zoom level data by index.

@:native("SetMillisecondsPerGameMinute")staticsetMillisecondsPerGameMinute(value:Int):Dynamic

Overrides how many real ms are equal to one game minute.

A setter for GetMillisecondsPerGameMinute.

@:native("SetMinimapClipType")staticsetMinimapClipType(type:Int):Dynamic

Sets the type for the minimap blip clipping object to be either rectangular or rounded.

@:native("SetMinimapComponentPosition")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.

@:native("SetMinimapOverlayDisplay")staticsetMinimapOverlayDisplay(miniMap:Int, x:Float, y:Float, xScale:Float, yScale:Float, alpha:Float):Dynamic

Sets the display info for a minimap overlay.

@:native("SetMinimapType")staticsetMinimapType(type:Int):Dynamic

Possible Types:

0 = Off,

1 = Regular,

2 = Expanded,

3 = Simple,

@:native("SetModelHeadlightConfiguration")staticsetModelHeadlightConfiguration(modelHash:Int, ratePerSecond:Float, headlightRotation:Float, invertRotation:Bool):Dynamic

**This native is deprecated and does nothing!

@:native("SetMpGamerTagsUseVehicleBehavior")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.

@:native("SetMpGamerTagsVisibleDistance")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.

@:native("SetNetworkWalkMode")staticsetNetworkWalkMode(enabled:Dynamic):Dynamic

@:native("SetNuiFocus")staticsetNuiFocus(hasFocus:Bool, hasCursor:Bool):Dynamic

@:native("SetNuiFocusKeepInput")staticsetNuiFocusKeepInput(keepInput:Bool):Dynamic

@:native("SetNuiZindex")staticsetNuiZindex(zIndex:Int):Dynamic

Set the z-index of the NUI resource.

@:native("SetPedCollectionComponentVariation")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.

@:native("SetPedCollectionPreloadPropData")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.

@:native("SetPedCollectionPreloadVariationData")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.

@:native("SetPedCollectionPropIndex")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.

@:native("SetPedMeleeCombatLimits")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.

@:native("SetPedModelHealthConfig")staticsetPedModelHealthConfig(modelHash:Int, configName:String):Dynamic

Sets a ped model's health config.

Takes effect only after setting player model with SET_PLAYER_MODEL.

@:native("SetPedModelPersonality")staticsetPedModelPersonality(modelHash:Int, personalityHash:Int):Dynamic

Overrides a ped model personality type.

@:native("SetPedTurningThresholds")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

@:native("SetPlayerKillFallHeight")staticsetPlayerKillFallHeight(height:Float):Dynamic

@:native("SetPlayerMaxStamina")staticsetPlayerMaxStamina(playerId:Dynamic, maxStamina:Float):Dynamic

@:native("SetPlayerStamina")staticsetPlayerStamina(playerId:Dynamic, stamina:Float):Dynamic

@:native("SetPlayerTalkingOverride")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.

@:native("SetReactionToVehicleSirenDisabled")staticsetReactionToVehicleSirenDisabled(state:Bool):Dynamic

This completely disables pedestrian vehicles from reacting to sirens. They will not try to do any maneuver to evade.

@:native("SetResourceKvp")staticsetResourceKvp(key:String, value:String):Dynamic

@:native("SetResourceKvpFloat")staticsetResourceKvpFloat(key:String, value:Float):Dynamic

@:native("SetResourceKvpFloatNoSync")staticsetResourceKvpFloatNoSync(key:String, value:Float):Dynamic

Nonsynchronous SET_RESOURCE_KVP_FLOAT operation; see FLUSH_RESOURCE_KVP.

@:native("SetResourceKvpInt")staticsetResourceKvpInt(key:String, value:Int):Dynamic

A setter for GET_RESOURCE_KVP_INT.

@:native("SetResourceKvpIntNoSync")staticsetResourceKvpIntNoSync(key:String, value:Int):Dynamic

Nonsynchronous SET_RESOURCE_KVP_INT operation; see FLUSH_RESOURCE_KVP.

@:native("SetResourceKvpNoSync")staticsetResourceKvpNoSync(key:String, value:String):Dynamic

Nonsynchronous SET_RESOURCE_KVP operation; see FLUSH_RESOURCE_KVP.

@:native("SetRichPresence")staticsetRichPresence(presenceState:String):Dynamic

Sets the player's rich presence detail state for social platform providers to a specified string.

@:native("SetRopeLengthChangeRate")staticsetRopeLengthChangeRate(rope:Int, lengthChangeRate:Float):Dynamic

Set's the ropes length change rate, which is the speed that rope should wind if started.

@:native("SetRopesCreateNetworkWorldState")staticsetRopesCreateNetworkWorldState(shouldCreate:Bool):Dynamic

Toggles whether the usage of ADD_ROPE should create an underlying CNetworkRopeWorldStateData. By default this is set to false.

@:native("SetRuntimeTextureArgbData")staticsetRuntimeTextureArgbData(tex:Int, buffer:String, length:Int):Bool

@:native("SetRuntimeTextureImage")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.

@:native("SetRuntimeTexturePixel")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.

@:native("SetSnakeoilForEntry")staticsetSnakeoilForEntry(name:String, path:String, data:String):Dynamic

@:native("SetStateBagValue")staticsetStateBagValue(bagName:String, keyName:String, valueData:String, valueLength:Int, replicated:Bool):Dynamic

Internal function for setting a state bag value.

@:native("SetTextChatEnabled")staticsetTextChatEnabled(enabled:Bool):Bool

@:native("SetTextFontForCurrentCommand")staticsetTextFontForCurrentCommand(fontId:Int):Dynamic

Sets the text font for the current text drawing command.

@:native("SetTextJustification")staticsetTextJustification(justifyType:Int):Dynamic

@:native("SetTextWrap")staticsetTextWrap(start:Float, end:Float):Dynamic

@:native("SetTimecycleModifierVar")staticsetTimecycleModifierVar(modifierName:String, varName:String, value1:Float, value2:Float):Dynamic

@:native("SetTrackBrakingDistance")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.

@:native("SetTrackEnabled")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

@:native("SetTrackJunctionActive")staticsetTrackJunctionActive(junctionIndex:Int, state:Dynamic):Dynamic

Sets the state of a track junction.

@:native("SetTrackMaxSpeed")staticsetTrackMaxSpeed(track:Int, newSpeed:Int):Dynamic

Sets the max speed for the train tracks. Used by ambient trains and for station calculations

@:native("SetTrainDoorOpenRatio")staticsetTrainDoorOpenRatio(train:Dynamic, doorIndex:Int, ratio:Float):Dynamic

Sets the ratio that a door is open for on a train.

@:native("SetTrainState")staticsetTrainState(train:Dynamic, state:Int):Dynamic

@:native("SetTrainStopAtStations")staticsetTrainStopAtStations(train:Dynamic, state:Bool):Dynamic

Toggles a train's ability to stop at stations

@:native("SetTrainsForceDoorsOpen")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.

@:native("SetVehicleAlarmTimeLeft")staticsetVehicleAlarmTimeLeft(vehicle:Dynamic, time:Int):Dynamic

@:native("SetVehicleAutoRepairDisabled")staticsetVehicleAutoRepairDisabled(vehicle:Dynamic, value:Bool):Dynamic

Disables the vehicle from being repaired when a vehicle extra is enabled.

@:native("SetVehicleClutch")staticsetVehicleClutch(vehicle:Dynamic, clutch:Float):Dynamic

@:native("SetVehicleCurrentGear")staticsetVehicleCurrentGear(vehicle:Dynamic, gear:Int):Dynamic

@:native("SetVehicleCurrentRpm")staticsetVehicleCurrentRpm(vehicle:Dynamic, rpm:Float):Dynamic

@:native("SetVehicleEngineTemperature")staticsetVehicleEngineTemperature(vehicle:Dynamic, temperature:Float):Dynamic

@:native("SetVehicleFlag")staticsetVehicleFlag(vehicle:Dynamic, flagIndex:Int, value:Dynamic):Dynamic

This native is a setter for GET_VEHICLE_HAS_FLAG.

@:native("SetVehicleFuelLevel")staticsetVehicleFuelLevel(vehicle:Dynamic, level:Float):Dynamic

@:native("SetVehicleGearRatio")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.

@:native("SetVehicleGravityAmount")staticsetVehicleGravityAmount(vehicle:Dynamic, gravity:Float):Dynamic

@:native("SetVehicleHandlingField")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)

@:native("SetVehicleHandlingFloat")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)

@:native("SetVehicleHandlingInt")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.

@:native("SetVehicleHandlingVector")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.

@:native("SetVehicleHighGear")staticsetVehicleHighGear(vehicle:Dynamic, gear:Int):Dynamic

@:native("SetVehicleNextGear")staticsetVehicleNextGear(vehicle:Dynamic, nextGear:Int):Dynamic

@:native("SetVehicleNitroPtfxRange")staticsetVehicleNitroPtfxRange(range:Float):Dynamic

Sets the maximum distance in which _SET_VEHICLE_NITRO_ENABLED PTFX are rendered. Distance is measured from the camera position.

@:native("SetVehicleOilLevel")staticsetVehicleOilLevel(vehicle:Dynamic, level:Float):Dynamic

@:native("SetVehiclePitchBias")staticsetVehiclePitchBias(vehicle:Dynamic, value:Float):Dynamic

Set the vehicle's pitch bias. Only works on planes.

@:native("SetVehicleRollBias")staticsetVehicleRollBias(vehicle:Dynamic, value:Float):Dynamic

Set the vehicle's roll bias. Only works on planes.

@:native("SetVehicleSteeringAngle")staticsetVehicleSteeringAngle(vehicle:Dynamic, angle:Float):Dynamic

@:native("SetVehicleSteeringScale")staticsetVehicleSteeringScale(vehicle:Dynamic, scale:Float):Dynamic

@:native("SetVehicleSuspensionHeight")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.

@:native("SetVehicleTurboPressure")staticsetVehicleTurboPressure(vehicle:Dynamic, pressure:Float):Dynamic

@:native("SetVehicleWheelBrakePressure")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

@:native("SetVehicleWheelFlags")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.

@:native("SetVehicleWheelHealth")staticsetVehicleWheelHealth(vehicle:Dynamic, wheelIndex:Int, health:Float):Dynamic

@:native("SetVehicleWheelIsPowered")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.

@:native("SetVehicleWheelPower")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.

@:native("SetVehicleWheelRimColliderSize")staticsetVehicleWheelRimColliderSize(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic

Not sure what this changes, probably determines physical rim size in case the tire is blown.

@:native("SetVehicleWheelRotationSpeed")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.

@:native("SetVehicleWheelSize")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).

@:native("SetVehicleWheelTireColliderSize")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).

@:native("SetVehicleWheelTireColliderWidth")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).

@:native("SetVehicleWheelTractionVectorLength")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.

@:native("SetVehicleWheelWidth")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).

@:native("SetVehicleWheelXOffset")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)

end

@:native("SetVehicleWheelYRotation")staticsetVehicleWheelYRotation(vehicle:Dynamic, wheelIndex:Int, value:Float):Dynamic

@:native("SetVehicleWheelieState")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.

@:native("SetVehicleXenonLightsCustomColor")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.

@:native("SetVehicleXmasSnowFactor")staticsetVehicleXmasSnowFactor(gripFactor:Float):Dynamic

@:native("SetVisualSettingFloat")staticsetVisualSettingFloat(name:String, value:Float):Dynamic

Overrides a floating point value from visualsettings.dat temporarily.

@:native("SetWaterAreaClipRect")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

@:native("SetWaterQuadAlpha")staticsetWaterQuadAlpha(waterQuad:Int, a0:Int, a1:Int, a2:Int, a3:Int):Bool

@:native("SetWaterQuadBounds")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.

@:native("SetWaterQuadHasLimitedDepth")staticsetWaterQuadHasLimitedDepth(waterQuad:Int, hasLimitedDepth:Bool):Bool

@:native("SetWaterQuadIsInvisible")staticsetWaterQuadIsInvisible(waterQuad:Int, isInvisible:Bool):Bool

@:native("SetWaterQuadLevel")staticsetWaterQuadLevel(waterQuad:Int, level:Float):Bool

@:native("SetWaterQuadNoStencil")staticsetWaterQuadNoStencil(waterQuad:Int, noStencil:Dynamic):Bool

@:native("SetWaterQuadType")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

@:native("SetWaveQuadAmplitude")staticsetWaveQuadAmplitude(waveQuad:Int, amplitude:Float):Bool

@:native("SetWaveQuadBounds")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.

@:native("SetWaveQuadDirection")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

@:native("SetWeaponAccuracySpread")staticsetWeaponAccuracySpread(weaponHash:Int, spread:Float):Dynamic

A setter for the accuracy spread of a weapon.

@:native("SetWeaponRecoilShakeAmplitude")staticsetWeaponRecoilShakeAmplitude(weaponHash:Int, amplitude:Float):Dynamic

A setter for the recoil shake amplitude of a weapon.

@:native("SetWeaponsNoAimBlocking")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.

@:native("SetWeaponsNoAutoreload")staticsetWeaponsNoAutoreload(state:Bool):Dynamic

Disables the game's built-in auto-reloading.

@:native("SetWeaponsNoAutoswap")staticsetWeaponsNoAutoswap(state:Bool):Dynamic

Disables autoswapping to another weapon when the current weapon runs out of ammo.

@:native("SetWeatherCycleEntry")staticsetWeatherCycleEntry(index:Int, typeName:String, timeMult:Int):Bool

@:native("SetWeatherOwnedByNetwork")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.

@:native("SetWetClothPinRadiusScale")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.

@:native("ShutdownLoadingScreenNui")staticshutdownLoadingScreenNui():Dynamic

Shuts down the loadingScreen NUI frame, similarly to SHUTDOWN_LOADING_SCREEN.

@:native("StartFindExternalKvp")staticstartFindExternalKvp(resourceName:String, prefix:String):Int

Equivalent of START_FIND_KVP, but for another resource than the current one.

@:native("StartFindKvp")staticstartFindKvp(prefix:String):Int

@:native("StateBagHasKey")staticstateBagHasKey(bagName:String, key:String):Dynamic

@:native("TriggerEventInternal")statictriggerEventInternal(eventName:String, eventPayload:String, payloadLength:Int):Dynamic

The backing function for TriggerEvent.

@:native("TriggerLatentServerEventInternal")statictriggerLatentServerEventInternal(eventName:String, eventPayload:String, payloadLength:Int, bps:Int):Dynamic

The backing function for TriggerLatentServerEvent.

@:native("TriggerServerEventInternal")statictriggerServerEventInternal(eventName:String, eventPayload:String, payloadLength:Int):Dynamic

The backing function for TriggerServerEvent.

@:native("UnregisterRawNuiCallback")staticunregisterRawNuiCallback(callbackType:String):Dynamic

Will unregister and cleanup a registered NUI callback handler.

Use along side the REGISTER_RAW_NUI_CALLBACK native.

@:native("UpdateMapdataEntity")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.

@:native("WasEventCanceled")staticwasEventCanceled():Bool

Returns whether or not the currently executing event was canceled.