The FiveM developer’s field guide
Know the native.
Build the world.
Engine functions, framework docs, and game assets.
One reference. From the first lookup to the last line.
knowledge base
Explore / FiveM
Native reference
- WEAPONvoid
0x24C024BA8379A70A
``` NativeDB Introduced: v1868 ```
0x24C024BA8379A70A - WEAPONvoid
0x977CA98939E82E4B
``` SET_WEAPON_OBJECT_* ```
0x977CA98939E82E4B - WEAPONint
0xA2C9AC24B4061285
Description not yet documented
0xA2C9AC24B4061285 - WEAPONvoid
0xE4DCEC7FD5B739A5
Description not yet documented
0xE4DCEC7FD5B739A5 - WEAPONvoid
0xE6D2CEDD370FF98E
``` NativeDB Introduced: v2372 ```
0xE6D2CEDD370FF98E - WEAPONvoid
ADD_AMMO_TO_PED
Description not yet documented
0x78F0424C34306220 - WEAPONvoid
_ADD_AMMO_TO_PED_BY_TYPE
Description not yet documented
0x2472622CE1F2D45F - WEAPONBOOL
CAN_USE_WEAPON_ON_PARACHUTE
``` this returns if you can use the weapon while using a parachute ```
0xBC7BE5ABC0879F74 - WEAPONvoid
CLEAR_ENTITY_LAST_WEAPON_DAMAGE
Description not yet documented
0xAC678E40BE7C74D2 - WEAPONvoid
CLEAR_PED_LAST_WEAPON_DAMAGE
Does NOT seem to work with HAS_PED_BEEN_DAMAGED_BY_WEAPON. Use CLEAR_ENTITY_LAST_WEAPON_DAMAGE and HAS_ENTITY_BEEN_DAMAGED_BY_WEAPON instead.
0x0E98F88A24C5F4B8 - WEAPONint
CREATE_AIR_DEFENCE_ANGLED_AREA
Description not yet documented
0x9DA58CDBF6BDBC08 - WEAPONint
CREATE_AIR_DEFENCE_SPHERE
Both coordinates are from objects in the decompiled scripts. Native related to [\_0xECDC202B25E5CF48](#\_0xECDC202B25E5CF48) p1 value. The only weapon hash used in the decompiled scripts is weapon_air_defence_gun. These two natives are used by the yacht script, decompiled scripts suggest it and the weapon hash used (valkyrie's rockets) are also used by yachts.
0x91EF34584710BE99 - WEAPONObject
CREATE_WEAPON_OBJECT
Create a weapon object that cannot be attached to a ped. If you want to create a weapon object that can be attached to a ped, use [`CREATE_OBJECT`](#\_0x509D5878EB39E842) instead. ``` NativeDB Added Parameter 9: BOOL bRegisterAsNetworkObject NativeDB Added Parameter 10: BOOL bScriptHostObject ```
0x9541D3CF0D398F36 - WEAPONBOOL
_DOES_AIR_DEFENSE_ZONE_EXIST
Description not yet documented
0xCD79A550999D7D4F - WEAPONBOOL
DOES_WEAPON_TAKE_WEAPON_COMPONENT
Description not yet documented
0x5CEE3DF569CECAB0 - WEAPONvoid
ENABLE_LASER_SIGHT_RENDERING
``` Enables laser sight on any weapon. It doesn't work. Neither on tick nor OnKeyDown ```
0xC8B46D7727D864AA - WEAPONvoid
EXPLODE_PROJECTILES
``` WEAPON::EXPLODE_PROJECTILES(PLAYER::PLAYER_PED_ID(), func_221(0x00000003), 0x00000001); ```
0xFC4BD125DE7611E4 - WEAPONvoid
_FIRE_AIR_DEFENSE_WEAPON
Description not yet documented
0x44F1012B69313374 - WEAPONBOOL
GET_AMMO_IN_CLIP
Description not yet documented
0x2E1202248937775C - WEAPONint
GET_AMMO_IN_PED_WEAPON
``` WEAPON::GET_AMMO_IN_PED_WEAPON(PLAYER::PLAYER_PED_ID(), a_0) From decompiled scripts Returns total ammo in weapon GTALua Example : natives.WEAPON.GET_AMMO_IN_PED_WEAPON(plyPed, WeaponHash) ```
0x015A522136D7F951 - WEAPONBOOL
_GET_AMMO_IN_VEHICLE_WEAPON_CLIP
``` NativeDB Introduced: v3407 ```
0x2857938C5D407AFA - WEAPONHash
GET_BEST_PED_WEAPON
Description not yet documented
0x8483E98E8B888AE2 - WEAPONBOOL
GET_CURRENT_PED_VEHICLE_WEAPON
Description not yet documented
0x1017582BCD3832DC - WEAPONBOOL
GET_CURRENT_PED_WEAPON
``` The return value seems to indicate returns true if the hash of the weapon object weapon equals the weapon hash. p2 seems to be 1 most of the time; and is not implemented. ```
0x3A87E44BB9A01D54 - WEAPONEntity
GET_CURRENT_PED_WEAPON_ENTITY_INDEX
``` NativeDB Added Parameter 2: Any p1 ```
0x3B390A939AF0B5FC - WEAPONBOOL
GET_IS_PED_GADGET_EQUIPPED
``` gadgetHash - was always 0xFBAB5776 ("GADGET_PARACHUTE"). ```
0xF731332072F5156C - WEAPONfloat
GET_LOCKON_DISTANCE_OF_CURRENT_PED_WEAPON
Description not yet documented
0x840F03E9041E2C9C - WEAPONBOOL
GET_MAX_AMMO
Description not yet documented
0xDC16122C7A20C933 - WEAPONBOOL
_GET_MAX_AMMO_BY_TYPE
Description not yet documented
0x585847C5E4E11709 - WEAPONint
GET_MAX_AMMO_IN_CLIP
``` p2 is mostly 1 in the scripts. ```
0xA38DCFFCEA8962FA - WEAPONfloat
GET_MAX_RANGE_OF_CURRENT_PED_WEAPON
Description not yet documented
0x814C9D19DFD69679 - WEAPONint
GET_PED_AMMO_BY_TYPE
Description not yet documented
0x39D22031557946C1 - WEAPONHash
GET_PED_AMMO_TYPE_FROM_WEAPON
``` Returns the current ammo type of the specified ped's specified weapon. MkII magazines will change the return value, like Pistol MkII returning AMMO_PISTOL without any components and returning AMMO_PISTOL_TRACER after Tracer Rounds component is attached. Use 0xF489B44DD5AF4BD9 if you always want AMMO_PISTOL. ```
0x7FEAD38B326B9F74 - WEAPONHash
_GET_PED_AMMO_TYPE_FROM_WEAPON_2
``` Returns the base/default ammo type of the specified ped's specified weapon. Use GET_PED_AMMO_TYPE_FROM_WEAPON if you want current ammo type (like AMMO_MG_INCENDIARY/AMMO_MG_TRACER while using MkII magazines) and use this if you want base ammo type. (AMMO_MG) ```
0xF489B44DD5AF4BD9 - WEAPONBOOL
GET_PED_LAST_WEAPON_IMPACT_COORD
``` Pass ped. Pass address of Vector3. The coord will be put into the Vector3. The return will determine whether there was a coord found or not. ```
0x6C4D0409BA1A2BC2 - WEAPONint
_GET_PED_WEAPON_LIVERY_COLOR
Description not yet documented
0xF0A60040BE558F2D - WEAPONint
GET_PED_WEAPON_TINT_INDEX
Description not yet documented
0x2B9EEDC07BD06B9F - WEAPONHash
GET_PED_WEAPONTYPE_IN_SLOT
Description not yet documented
0xEFFED78E9011134D - WEAPONHash
GET_SELECTED_PED_WEAPON
Description not yet documented
0x0A6DB4965674D243 - WEAPONint
_GET_TIME_BEFORE_VEHICLE_WEAPON_RELOAD_FINISHES
``` NativeDB Introduced: v3407 ```
0xC8C6F4B1CDEB40EF
A living reference. Documentation coverage varies by native and source.