The RedM 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 / RedM
Native reference
- WEAPONvoid
_ENABLE_AMMO_TYPE_FOR_PED
Description not yet documented
0x3B7B7908B7ADFB4B - WEAPONvoid
_ENABLE_AMMO_TYPE_FOR_PED_WEAPON
Description not yet documented
0x23FB9FACA28779C1 - WEAPONBOOL
_ENABLE_WEAPON_RESTORE
Description not yet documented
0xC395355843BE134B - WEAPONvoid
_EXPLODE_PED_AMMO_TYPE
Triggers detonation/effect for a specific throwable ammo type associated with the given ped (commonly used to remotely detonate placed dynamite). Known ammo hashes seen in scripts: - AMMO_DYNAMITE - AMMO_MOLOTOV - AMMO_POISONBOTTLE Notes: - Only affects throwables of that ammo type that are attributable to the ped (i.e., their placed/owned instances).
0x44C8F4908F1B2622 - WEAPONBOOL
GET_ALLOW_DUAL_WIELD
Description not yet documented
0x918990BD9CE08582 - WEAPONBOOL
GET_AMMO_IN_CLIP
Description not yet documented
0x2E1202248937775C - WEAPONBOOL
_GET_AMMO_IN_CLIP_BY_INVENTORY_UID
Description not yet documented
0x678F00858980F516 - 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 - WEAPONHash
_GET_AMMO_RECOMMENDED_TYPE_FOR_WEAPON
Works exactly the same as [native: _GET_AMMO_TYPE_FOR_WEAPON]
0xEC97101A8F311282 - WEAPONHash
_GET_AMMO_TYPE_FOR_WEAPON
Identical to _GET_AMMO_RECOMMENDED_TYPE_FOR_WEAPON (0xEC97101A8F311282) -> same native handler address
0x5C2EA6C44F515F34 - WEAPONvoid
GET_BEST_PED_SHORTARM_GUID
Description not yet documented
0xF52BD94B47CCF736 - WEAPONHash
GET_BEST_PED_WEAPON
Description not yet documented
0x8483E98E8B888AE2 - WEAPONHash
_GET_BEST_PED_WEAPON_IN_GROUP
If near your horse when called, weapons stored on your horse will be considered Returns weaponHash
0x9F67929D98E7C6E8 - WEAPONAny
_GET_BEST_PED_WEAPON_IN_INVENTORY
Description not yet documented
0x7B98500614C8E8B8 - WEAPONBOOL
_GET_CAN_TWIRL_WEAPON
Description not yet documented
0x6554ECCE226F2A2A - WEAPONBOOL
_GET_CORRECT_KIT_EMOTE_TWIRL_GUN
_GET_BEST_* - _GET_CLOSEST_*
0xCD356B42C57BFE01 - WEAPONHash
_GET_CURRENT_AMMO_TYPE_FROM_GUID
Returns ammoHash
0xAF9D167A5656D6A6 - 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 - WEAPONHash
_GET_CURRENT_PED_WEAPON_AMMO_TYPE
Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)
0x7E7B19A4355FEE13 - WEAPONEntity
GET_CURRENT_PED_WEAPON_ENTITY_INDEX
Returns weaponObject, attachPoint: see SET_CURRENT_PED_WEAPON
0x3B390A939AF0B5FC - WEAPONHash
_GET_DEFAULT_PED_WEAPON_COLLECTION
Returns weaponCollection Hash Example: RE_POLICECHASE_MALES_01: Carbine Repeater + Knife, LO_AGRO_PED
0xD42514C182121C23 - WEAPONHash
_GET_DEFAULT_UNARMED_WEAPON_HASH
Returns the ped's default unarmed weapon hash as defined in CPedModelInfo (DefaultUnarmedWeapon). Falls back to WEAPON_UNARMED if the ped doesn't have a valid model info pointer, or 0 if the ped doesn't exist.
0x08FF1099ED2E6E21 - WEAPONint
_GET_DEFAULT_WEAPON_ATTACH_POINT
Returns default attach point for given weapon hash. Returns -1 for melee as they can't be attached. Example: https://imgur.com/a/mUE5fug
0x65DC4AC5B96614CB - WEAPONAny
_GET_IGNITED_PROJECTILE_IN_VOLUME
Finds an ignited (lit/fused) explosive projectile inside a Volume. Parameters: - volume: Search volume. - outEntity: [out] Receives the projectile Entity handle. Returns: - BOOL: true if an ignited projectile was found (outEntity set), false otherwise. Notes: - Intended for explosives with a fuse/ignition state (e.g., lit dynamite). - If multiple ignited projectiles are present, returns the first match. - Requires a valid Volume; delete it when done. - Lua example: https://pastebin.com/N9p4anLU _GET_PO*
0x74C8000FDD1BB111 - WEAPONfloat
_GET_LOCKON_RANGE_CURRENT_WEAPON
Returns the current weapon's lock-on/aim-assist range for this ped. Internally selects a different range when the ped is mounted or in a vehicle vs on foot. Returns -1.0 if the ped/weapon data is unavailable. Commonly used to derive a clamp for PLAYER::SET_PLAYER_LOCKON_RANGE_OVERRIDE (e.g., add a margin or cap to 18.0).
0x3799EFCC3C8CD5E1 - WEAPONBOOL
_GET_LONGARM_STORE_ON_DISMOUNT_STATE
Returns true if ped is on a horse while inside of a town Params: p1 = 0 GET_L* - GET_MA*
0x5A695BD328586B44 - WEAPONBOOL
GET_MAX_AMMO
Description not yet documented
0xDC16122C7A20C933 - WEAPONint
GET_MAX_AMMO_IN_CLIP
``` p2 is mostly 1 in the scripts. ```
0xA38DCFFCEA8962FA - WEAPONfloat
_GET_MAX_LOCKON_DISTANCE_OF_CURRENT_PED_WEAPON
Description not yet documented
0x79B1A6E780266DB0 - WEAPONint
_GET_NUM_PEDS_RESTRAINED_FROM_WEAPON_BOLAS
returns the amount of peds that were restrained with the weapon thrown bolas
0x46D42883E873C1D7 - 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_BACKUP_WEAPON
Description not yet documented
0xC71FE230A513C30F - WEAPONBOOL
_GET_PED_CAN_SWITCH_WEAPON
Returns whether the ped is currently allowed to switch weapons (weapon switching not locked by internal code/state). Script evidence: used as an additional gate in NPLOI__CAN_GUN_SPIN_PREVIEW; when it returns false scripts log "Prevented by Code" even if twirl-capable weapons exist in hand/holsters. Example video: https://imgur.com/a/hawFMhN
0xBC9444F2FF94A9C0 - WEAPONHash
_GET_PED_CURRENT_HELD_WEAPON
Returns eCurrentHeldWeapon _GET_R* - _GET_T*
0x8425C5F057012DAB - WEAPONHash
_GET_PED_GUN_SPINNING_EQUIPPED_KIT_EMOTE_TWIRL
Returns emote Hash
0x2C4FEC3D0EFA9FC0 - WEAPONHash
_GET_PED_GUN_SPINNING_HASH_FROM_WEAPON_EMOTE_VARIATION
Returns iSpinHash / iVariationSpin
0xF3B1620B920D1708 - WEAPONHash
_GET_PED_HOGTIE_WEAPON
Description not yet documented
0x90EB1CB189923587 - 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
A living reference. Documentation coverage varies by native and source.