Skip to content

Общие ​

83 функций. Используйте поиск (Ctrl K) или список ниже.

ФункцияОписание
AddConvarChangeListenerAdds a listener for Console Variable changes.
AddStateBagChangeHandlerAdds a handler for changes to a state bag.
CancelEventCancels the currently executing event.
CreateColshapeCircleCreates a 2D circular collision shape at the specified position.
CreateColshapeCuboidCreates an axis-aligned box collision shape at the specified 3D position.
CreateColshapeCylinderCreates a vertical cylinder collision shape at the specified 3D position.
CreateColshapePolygonCreates a polygon collision shape defined by a set of 2D points extruded between minZ and maxZ. Requires at least 3 points.
CreateColshapeRectangleCreates a rotated rectangle collision shape at the specified 3D position.
CreateColshapeSphereCreates a spherical collision shape at the specified 3D position.
DeleteColshapeDeletes the collision shape with the given ID.
DeleteFunctionReferencereferenceIdentity:
DoesColshapeExistReturns whether a collision shape with the given ID exists.
DoesTrainStopAtStationstrain: The train handle
DuplicateFunctionReferencereferenceIdentity:
EnsureEntityStateBagInternal function for ensuring an entity has a state bag.
ExecuteCommandDepending 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
FormatStackTraceAn internal function for converting a stack trace object to a string.
GetColshapeCircleDataGets the data of a circle collision shape.
GetColshapeCuboidDataGets the data of a cuboid collision shape.
GetColshapeCylinderDataGets the data of a cylinder collision shape.
GetColshapePolygonDataGets the vertical bounds of a polygon collision shape.
GetColshapeRectangleDataGets the data of a rectangle collision shape.
GetColshapeSphereDataGets the data of a sphere collision shape.
GetConvarCan be used to get a console variable of type char, for example a string.
GetConvarBoolCan be used to get a console variable casted back to bool.
GetConvarFloatThis will have floating point inaccuracy.
GetConvarIntCan be used to get a console variable casted back to int (an integer value).
GetCurrentResourceNameReturns the name of the currently executing resource.
GetEntitiesInRadius[1] : Peds (including animals) and players. [2] : Vehicles. [3] : Objects (props), doors, and projectiles.
GetEntityFromStateBagNameReturns the entity handle for the specified state bag name. For use with ADD_STATE_BAG_CHANGE_HANDLER.
GetGameBuildNumberReturns the internal build number of the current game being executed.
GetGameNameReturns the current game being executed.
GetGamePoolReturns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as follows:
GetInstanceId—
GetInvokingResource—
GetNumResourceMetadataGets the amount of metadata values with the specified key existing in the specified resource's manifest. See also: [Resource manifest](https
GetNumResources—
GetPlayerFromStateBagNameOn the server this will return the players source, on the client it will return the player handle.
GetPlayerMeleeWeaponDamageModifierA getter for SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER.
GetPlayerWeaponDamageModifierA getter for SET_PLAYER_WEAPON_DAMAGE_MODIFIER.
GetPlayerWeaponDefenseModifierA getter for SET_PLAYER_WEAPON_DEFENSE_MODIFIER.
GetPlayerWeaponDefenseModifier_2A getter for _SET_PLAYER_WEAPON_DEFENSE_MODIFIER_2.
GetRegisteredCommandsReturns all commands that are registered in the command system. The data returned adheres to the following layout: [ { "name": "cmdlist", "r
GetResourceByFindIndexfindIndex: The index of the resource (starting at 0)
GetResourceCommandsReturns all commands registered by the specified resource. The data returned adheres to the following layout: [ { "name": "cmdlist", "resour
GetResourceMetadataGets the metadata value at a specified key/index from a resource's manifest. See also: [Resource manifest](https://docs.fivem.net/docs/scrip
GetResourceStateReturns the current state of the specified resource.
GetStateBagKeysbagName: The name of the bag.
GetStateBagValueReturns the value of a state bag key.
GetTrainCruiseSpeedGets the trains desired speed.
GetTrainDirectionGets the direction the train is facing
GetTrainStatetrain: The train handle
GetTrainTrackIndextrain: The train handle
GetVehicleHandbrakevehicle:
GetVehicleSteeringAnglevehicle:
GetVehicleTypeReturns the type of the passed vehicle.
IsAceAllowedobject:
IsColshapeCircleReturns whether the collision shape with the given ID is a circle.
IsColshapeCuboidReturns whether the collision shape with the given ID is a cuboid.
IsColshapeCylinderReturns whether the collision shape with the given ID is a cylinder.
IsColshapeEntityTypeSetReturns whether the collision shape is set to detect the given entity type. Every type is enabled by default; a type reads as disabled only
IsColshapePolygonReturns whether the collision shape with the given ID is a polygon.
IsColshapeRectangleReturns whether the collision shape with the given ID is a rectangle.
IsColshapeSphereReturns whether the collision shape with the given ID is a sphere.
IsDuplicityVersionGets whether or not this is the CitizenFX server.
IsEntityPositionFrozenA getter for FREEZE_ENTITY_POSITION.
IsPointInsideColshapeReturns whether the given 3D point is inside the collision shape.
IsPrincipalAceAllowedprincipal: object:
IsVehicleEngineStartingvehicle:
LoadResourceFileReads 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
NetworkGetEntityOwnerReturns the owner ID of the specified entity.
ProfilerEnterScopeScope entry for profiler.
ProfilerExitScopeScope exit for profiler.
ProfilerIsRecordingReturns true if the profiler is active.
RegisterCommandRegistered commands can be executed by entering them in the client console (this works for client side and server side registered commands).
RegisterResourceAsEventHandlerAn internal function which allows the current resource's HLL script runtimes to receive state for the specified event.
RemoveConvarChangeListenercookie: The cookie returned from ADD_CONVAR_CHANGE_LISTENER
RemoveStateBagChangeHandlerExperimental: This native may be altered or removed in future versions of CitizenFX without warning.
SetColshapeEntityTypeSets whether the collision shape should detect a specific entity type.
SetStateBagValueInternal function for setting a state bag value.
StateBagHasKeybagName: The name of the bag. key: The key used to check data existence.
TriggerEventInternalThe backing function for TriggerEvent.
WasEventCanceledReturns whether or not the currently executing event was canceled.

Независимый проект на базе Cfx.re. Не связан с Rockstar Games и Take-Two Interactive.