Общие
83 функций. Используйте поиск (Ctrl K) или список ниже.
| Функция | Описание |
|---|---|
| AddConvarChangeListener | Adds a listener for Console Variable changes. |
| AddStateBagChangeHandler | Adds a handler for changes to a state bag. |
| CancelEvent | Cancels the currently executing event. |
| CreateColshapeCircle | Creates a 2D circular collision shape at the specified position. |
| CreateColshapeCuboid | Creates an axis-aligned box collision shape at the specified 3D position. |
| CreateColshapeCylinder | Creates a vertical cylinder collision shape at the specified 3D position. |
| CreateColshapePolygon | Creates a polygon collision shape defined by a set of 2D points extruded between minZ and maxZ. Requires at least 3 points. |
| CreateColshapeRectangle | Creates a rotated rectangle collision shape at the specified 3D position. |
| CreateColshapeSphere | Creates a spherical collision shape at the specified 3D position. |
| DeleteColshape | Deletes the collision shape with the given ID. |
| DeleteFunctionReference | referenceIdentity: |
| DoesColshapeExist | Returns whether a collision shape with the given ID exists. |
| DoesTrainStopAtStations | train: The train handle |
| DuplicateFunctionReference | referenceIdentity: |
| EnsureEntityStateBag | Internal function for ensuring an entity has a state bag. |
| ExecuteCommand | 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 |
| FormatStackTrace | An internal function for converting a stack trace object to a string. |
| GetColshapeCircleData | Gets the data of a circle collision shape. |
| GetColshapeCuboidData | Gets the data of a cuboid collision shape. |
| GetColshapeCylinderData | Gets the data of a cylinder collision shape. |
| GetColshapePolygonData | Gets the vertical bounds of a polygon collision shape. |
| GetColshapeRectangleData | Gets the data of a rectangle collision shape. |
| GetColshapeSphereData | Gets the data of a sphere collision shape. |
| GetConvar | Can be used to get a console variable of type char, for example a string. |
| GetConvarBool | Can be used to get a console variable casted back to bool. |
| GetConvarFloat | This will have floating point inaccuracy. |
| GetConvarInt | Can be used to get a console variable casted back to int (an integer value). |
| GetCurrentResourceName | Returns the name of the currently executing resource. |
| GetEntitiesInRadius | [1] : Peds (including animals) and players. [2] : Vehicles. [3] : Objects (props), doors, and projectiles. |
| GetEntityFromStateBagName | Returns the entity handle for the specified state bag name. For use with ADD_STATE_BAG_CHANGE_HANDLER. |
| GetGameBuildNumber | Returns the internal build number of the current game being executed. |
| GetGameName | Returns the current game being executed. |
| GetGamePool | Returns a list of entity handles (script GUID) for all entities in the specified pool - the data returned is an array as follows: |
| GetInstanceId | — |
| GetInvokingResource | — |
| GetNumResourceMetadata | Gets the amount of metadata values with the specified key existing in the specified resource's manifest. See also: [Resource manifest](https |
| GetNumResources | — |
| GetPlayerFromStateBagName | On the server this will return the players source, on the client it will return the player handle. |
| GetPlayerMeleeWeaponDamageModifier | A getter for SET_PLAYER_MELEE_WEAPON_DAMAGE_MODIFIER. |
| GetPlayerWeaponDamageModifier | A getter for SET_PLAYER_WEAPON_DAMAGE_MODIFIER. |
| GetPlayerWeaponDefenseModifier | A getter for SET_PLAYER_WEAPON_DEFENSE_MODIFIER. |
| GetPlayerWeaponDefenseModifier_2 | A getter for _SET_PLAYER_WEAPON_DEFENSE_MODIFIER_2. |
| GetRegisteredCommands | Returns all commands that are registered in the command system. The data returned adheres to the following layout: [ { "name": "cmdlist", "r |
| GetResourceByFindIndex | findIndex: The index of the resource (starting at 0) |
| GetResourceCommands | Returns all commands registered by the specified resource. The data returned adheres to the following layout: [ { "name": "cmdlist", "resour |
| GetResourceMetadata | Gets the metadata value at a specified key/index from a resource's manifest. See also: [Resource manifest](https://docs.fivem.net/docs/scrip |
| GetResourceState | Returns the current state of the specified resource. |
| GetStateBagKeys | bagName: The name of the bag. |
| GetStateBagValue | Returns the value of a state bag key. |
| GetTrainCruiseSpeed | Gets the trains desired speed. |
| GetTrainDirection | Gets the direction the train is facing |
| GetTrainState | train: The train handle |
| GetTrainTrackIndex | train: The train handle |
| GetVehicleHandbrake | vehicle: |
| GetVehicleSteeringAngle | vehicle: |
| GetVehicleType | Returns the type of the passed vehicle. |
| IsAceAllowed | object: |
| IsColshapeCircle | Returns whether the collision shape with the given ID is a circle. |
| IsColshapeCuboid | Returns whether the collision shape with the given ID is a cuboid. |
| IsColshapeCylinder | Returns whether the collision shape with the given ID is a cylinder. |
| IsColshapeEntityTypeSet | Returns whether the collision shape is set to detect the given entity type. Every type is enabled by default; a type reads as disabled only |
| IsColshapePolygon | Returns whether the collision shape with the given ID is a polygon. |
| IsColshapeRectangle | Returns whether the collision shape with the given ID is a rectangle. |
| IsColshapeSphere | Returns whether the collision shape with the given ID is a sphere. |
| IsDuplicityVersion | Gets whether or not this is the CitizenFX server. |
| IsEntityPositionFrozen | A getter for FREEZE_ENTITY_POSITION. |
| IsPointInsideColshape | Returns whether the given 3D point is inside the collision shape. |
| IsPrincipalAceAllowed | principal: object: |
| IsVehicleEngineStarting | vehicle: |
| LoadResourceFile | 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 |
| NetworkGetEntityOwner | Returns the owner ID of the specified entity. |
| ProfilerEnterScope | Scope entry for profiler. |
| ProfilerExitScope | Scope exit for profiler. |
| ProfilerIsRecording | Returns true if the profiler is active. |
| RegisterCommand | Registered commands can be executed by entering them in the client console (this works for client side and server side registered commands). |
| RegisterResourceAsEventHandler | An internal function which allows the current resource's HLL script runtimes to receive state for the specified event. |
| RemoveConvarChangeListener | cookie: The cookie returned from ADD_CONVAR_CHANGE_LISTENER |
| RemoveStateBagChangeHandler | Experimental: This native may be altered or removed in future versions of CitizenFX without warning. |
| SetColshapeEntityType | Sets whether the collision shape should detect a specific entity type. |
| SetStateBagValue | Internal function for setting a state bag value. |
| StateBagHasKey | bagName: The name of the bag. key: The key used to check data existence. |
| TriggerEventInternal | The backing function for TriggerEvent. |
| WasEventCanceled | Returns whether or not the currently executing event was canceled. |