Skip to content

weapon


_get_weapon_unlock

int native.weapon._get_weapon_unlock(int weapon_hash)


_add_ammo_to_ped

void native.weapon._add_ammo_to_ped(int ped, int weapon_hash, int amount, int add_reason)

addReason:
enum eAddItemReason : Hash
{
    ADD_REASON_AWARDS = 0xB784AD1E,
    ADD_REASON_CREATE_CHARACTER = 0xE2C4FF71,
    ADD_REASON_DEBUG = 0x5C05C64D,
    ADD_REASON_DEFAULT = 0x2CD419DC,
    ADD_REASON_GET_INVENTORY = 0xD8188685,
    ADD_REASON_INCENTIVE = 0x8ADC2E95,
    ADD_REASON_LOADOUT = 0xCA3454E6,
    ADD_REASON_LOAD_SAVEGAME = 0x56212906,
    ADD_REASON_LOOTED = 0xCA806A55,
    ADD_REASON_MELEE = 0x7B9BDCE7,
    ADD_REASON_MP_MISSION = 0xEC0E0194,
    ADD_REASON_NOTIFICATION = 0xC56292D2,
    ADD_REASON_PICKUP = 0x1A770E22,
    ADD_REASON_PURCHASED = 0x4A6726C9,
    ADD_REASON_SET_AMOUNT = 0x4504731E,
    ADD_REASON_SYNCING = 0x8D4B4FF4,
    ADD_REASON_USE_FAILED = 0xD385B670
};

_add_ammo_to_ped_by_type

void native.weapon._add_ammo_to_ped_by_type(int ped, int ammo_type, int amount, int add_reason)

addReason: see _ADD_AMMO_TO_PED

_remove_ammo_from_ped

void native.weapon._remove_ammo_from_ped(int ped, int weapon_hash, int amount, int remove_reason)

removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1

removeReason: see REMOVE_WEAPON_FROM_PED

_remove_ammo_from_ped_by_type

void native.weapon._remove_ammo_from_ped_by_type(int ped, int ammo_hash, int amount, int remove_reason)

removeReason must be REMOVE_REASON_USED, REMOVE_REASON_GIVEN, REMOVE_REASON_DROPPED or REMOVE_REASON_DEBUG, unless amount is -1

removeReason: see REMOVE_WEAPON_FROM_PED

_remove_all_ped_ammo

void native.weapon._remove_all_ped_ammo(int ped)


set_ped_ammo

void native.weapon.set_ped_ammo(int ped, int weapon_hash, int ammo)


_0x8a779706da5ca3dd

void native.weapon._0x8a779706da5ca3dd(int ped, bool p1, int p2)

Only used in R* SP Scripts native_son2, native_son3 and smuggler2
Params: p2 = -1

_0x9409c62504a8f9e9

void native.weapon._0x9409c62504a8f9e9(int vehicle, bool p1)

Only used in R* SP Script guama3

_set_vehicle_weapon_heading_limits

void native.weapon._set_vehicle_weapon_heading_limits(int vehicle, int p1, float min_heading, float max_heading)


_set_vehicle_weapon_heading_limits_2

int native.weapon._set_vehicle_weapon_heading_limits_2(int vehicle, int p1, float min_heading, float max_heading)


set_vehicle_weapon_heading

void native.weapon.set_vehicle_weapon_heading(int vehicle, int seat_index, float heading, bool p3)


set_ped_infinite_ammo

void native.weapon.set_ped_infinite_ammo(int ped, bool toggle, int weapon_hash)


_set_ped_infinite_ammo_clip

void native.weapon._set_ped_infinite_ammo_clip(int ped, bool toggle)


get_ammo_in_ped_weapon

int native.weapon.get_ammo_in_ped_weapon(int ped, int weapon_hash)


get_max_ammo_in_clip

int native.weapon.get_max_ammo_in_clip(int ped, int weapon_hash, bool p2)


get_ammo_in_clip

bool native.weapon.get_ammo_in_clip(int ped, ptr int ammo, int weapon_hash)


_get_ammo_in_clip_by_inventory_uid

bool native.weapon._get_ammo_in_clip_by_inventory_uid(int ped, ptr int ammo, ptr int inventory_uid)


set_ammo_in_clip

bool native.weapon.set_ammo_in_clip(int ped, int weapon_hash, int ammo)


_refill_ammo_in_clip

int native.weapon._refill_ammo_in_clip(int ped, ptr int clip_inventory_uid, int p2)


get_max_ammo

bool native.weapon.get_max_ammo(int ped, ptr int ammo, int weapon_hash)


set_ped_ammo_by_type

void native.weapon.set_ped_ammo_by_type(int ped, int ammo_type, int ammo)


get_ped_ammo_by_type

int native.weapon.get_ped_ammo_by_type(int ped, int ammo_type)


set_ped_ammo_to_drop

void native.weapon.set_ped_ammo_to_drop(int ped, int p1, int p2)


_get_ammo_type_for_weapon

int native.weapon._get_ammo_type_for_weapon(int weapon_hash)


get_ped_ammo_type_from_weapon

int native.weapon.get_ped_ammo_type_from_weapon(int ped, int weapon_hash)

Returns the current ammo type of the specified ped's specified weapon.

_get_weapon_type_from_ammo_type

int native.weapon._get_weapon_type_from_ammo_type(int ammo_type)


_get_weapon_component_type_model

int native.weapon._get_weapon_component_type_model(int component_hash)


_get_weapontype_model

int native.weapon._get_weapontype_model(int weapon_hash)

Gets the model hash from the weapon hash.

_get_weapontype_slot

int native.weapon._get_weapontype_slot(int weapon_hash)

Returns hash where WEAPON_ is replaced with SLOT_

get_weapontype_group

int native.weapon.get_weapontype_group(int weapon_hash)


_0xf8204ef17410bf43

int native.weapon._0xf8204ef17410bf43(int weapon_group_hash, float p1, float p2, int p3)

Returns weaponHash

_is_weapon_kit

bool native.weapon._is_weapon_kit(int weapon_hash)

Returns true when the weapon passed is either a lasso, the camera or the binoculars
_IS_WEAPON_M* - _IS_WEAPON_P*

_is_weapon_kit_2

bool native.weapon._is_weapon_kit_2(int weapon_hash)

Returns true when the weapon passed is either the fishingrod, a lasso, the camera or the binoculars
_IS_WEAPON_M* - _IS_WEAPON_P*

is_weapon_bow

bool native.weapon.is_weapon_bow(int weapon_hash)


_is_weapon_lantern

bool native.weapon._is_weapon_lantern(int weapon_hash)


_is_weapon_torch

bool native.weapon._is_weapon_torch(int weapon_hash)


give_weapon_to_ped_with_options

bool native.weapon.give_weapon_to_ped_with_options(int ped, ptr int data, ptr int out_data)


give_weapon_to_ped

int native.weapon.give_weapon_to_ped(int ped, int weapon_hash, int ammo_count, bool b_force_in_hand, bool b_force_in_holster, int attach_point, bool b_allow_multiple_copies, float p7, float p8, int add_reason, bool b_ignore_unlocks, float permanent_degradation, bool p12)

Gives the ped the weapon.
List: https://github.com/femga/rdr3_discoveries/blob/master/weapons/weapons.lua

Params: p7 is 0.5f, and p8 is 1.0f. p11 and p12 are both 0 in R* Scripts
attachPoint: see SET_CURRENT_PED_WEAPON
addReason: see _ADD_AMMO_TO_PED
permanentDegradation: default 0.5, any higher than 0 it will automatically make the weapon worn, you can also adjust the value to change the weapons maximum cleanliness

_set_force_current_weapon_into_cocked_state

void native.weapon._set_force_current_weapon_into_cocked_state(int ped, int attach_point)


_0x9f0e1892c7f228a8

int native.weapon._0x9f0e1892c7f228a8(bool p0)


_holster_ped_weapons

void native.weapon._holster_ped_weapons(int ped, bool p1, bool p2, bool p3, bool immediately)


_hide_ped_weapons

void native.weapon._hide_ped_weapons(int ped, int p0, bool immediately)

Unequip current weapon and set current weapon to WEAPON_UNARMED.
p0 usually 2 in R* scripts. Doesn't seem to have any effect if changed....
immediately: if true it will instantly switch to unarmed

_0x4820a6939d7cef28

void native.weapon._0x4820a6939d7cef28(int p0, int p1)


set_current_ped_weapon

void native.weapon.set_current_ped_weapon(int ped, int weapon_hash, bool equip_now, int attach_point, bool p4, bool p5)

attachPoint:
enum eWeaponAttachPoint
{
    WEAPON_ATTACH_POINT_INVALID = -1,
    WEAPON_ATTACH_POINT_HAND_PRIMARY = 0,
    WEAPON_ATTACH_POINT_HAND_SECONDARY = 1,
    WEAPON_ATTACH_POINT_PISTOL_R = 2,
    MAX_HAND_WEAPON_ATTACH_POINTS = 2,
    WEAPON_ATTACH_POINT_PISTOL_L = 3,
    WEAPON_ATTACH_POINT_KNIFE = 4,
    WEAPON_ATTACH_POINT_LASSO = 5,
    WEAPON_ATTACH_POINT_THROWER = 6,
    WEAPON_ATTACH_POINT_BOW = 7,
    WEAPON_ATTACH_POINT_BOW_ALTERNATE = 8,
    WEAPON_ATTACH_POINT_RIFLE = 9,
    WEAPON_ATTACH_POINT_RIFLE_ALTERNATE = 10,
    WEAPON_ATTACH_POINT_LANTERN = 11,
    WEAPON_ATTACH_POINT_TEMP_LANTERN = 12,
    WEAPON_ATTACH_POINT_MELEE = 13,
    MAX_SYNCED_WEAPON_ATTACH_POINTS = 13,
    WEAPON_ATTACH_POINT_HIP = 14,
    WEAPON_ATTACH_POINT_BOOT = 15,
    WEAPON_ATTACH_POINT_BACK = 16,
    WEAPON_ATTACH_POINT_FRONT = 17,
    WEAPON_ATTACH_POINT_SHOULDERSLING = 18,
    WEAPON_ATTACH_POINT_LEFTBREAST = 19,
    WEAPON_ATTACH_POINT_RIGHTBREAST = 20,
    WEAPON_ATTACH_POINT_LEFTARMPIT = 21,
    WEAPON_ATTACH_POINT_RIGHTARMPIT = 22,
    WEAPON_ATTACH_POINT_LEFTARMPIT_RIFLE = 23,
    WEAPON_ATTACH_POINT_SATCHEL = 24,
    WEAPON_ATTACH_POINT_LEFTARMPIT_BOW = 25,
    WEAPON_ATTACH_POINT_RIGHT_HAND_EXTRA = 26,
    WEAPON_ATTACH_POINT_LEFT_HAND_EXTRA = 27,
    WEAPON_ATTACH_POINT_RIGHT_HAND_AUX = 28,
    MAX_WEAPON_ATTACH_POINTS = 29
};

get_current_ped_weapon

bool native.weapon.get_current_ped_weapon(int ped, ptr int weapon_hash, bool p2, int attach_point, bool p4)

attachPoint: see SET_CURRENT_PED_WEAPON

get_current_ped_weapon_entity_index

int native.weapon.get_current_ped_weapon_entity_index(int ped, int attach_point)

Returns weaponObject, attachPoint: see SET_CURRENT_PED_WEAPON

_enable_weapon_restore

bool native.weapon._enable_weapon_restore(int ped)


get_ped_backup_weapon

int native.weapon.get_ped_backup_weapon(int ped, bool p1)


_0x486c96a0dcd2bc92

int native.weapon._0x486c96a0dcd2bc92(int p0, int p1)


_get_ped_worst_weapon

int native.weapon._get_ped_worst_weapon(int ped, bool p1, bool p2, bool p3)


get_best_ped_weapon

int native.weapon.get_best_ped_weapon(int ped, bool p1, bool p2)


_get_best_ped_weapon_in_inventory

int native.weapon._get_best_ped_weapon_in_inventory(int ped, int p1, ptr int guid_primary)


get_best_ped_shortarm_guid

void native.weapon.get_best_ped_shortarm_guid(int ped, ptr int out_guid, bool p2, bool p3)


get_ped_weapon_guid_at_attach_point

bool native.weapon.get_ped_weapon_guid_at_attach_point(int ped, int attach_point, ptr int weapon_guid)


_get_best_ped_weapon_in_group

int native.weapon._get_best_ped_weapon_in_group(int ped, int weapon_group, bool p2, bool p3)

If near your horse when called, weapons stored on your horse will be considered
Returns weaponHash

_get_default_unarmed_weapon_hash

int native.weapon._get_default_unarmed_weapon_hash(int ped)

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.

_set_ammo_in_turret

void native.weapon._set_ammo_in_turret(int vehicle, int turret_hash, int ammo)

turretHash: WEAPON_TURRET_MAXIUM, WEAPON_TURRET_GATLING, WEAPON_TURRET_CANNON, WEAPON_TURRET_REVOLVING_CANNON

set_current_ped_vehicle_weapon

bool native.weapon.set_current_ped_vehicle_weapon(int ped, int weapon_hash)


get_current_ped_vehicle_weapon

bool native.weapon.get_current_ped_vehicle_weapon(int ped, ptr int weapon_hash)


is_ped_armed

bool native.weapon.is_ped_armed(int ped, int flags)


_0xa2091482ed42ef85

int native.weapon._0xa2091482ed42ef85(int p0, int p1)


_is_weapon_holster_state_changing

bool native.weapon._is_weapon_holster_state_changing(int ped)

Returns true if the ped is currently holstering or unholstering a weapon

is_weapon_valid

bool native.weapon.is_weapon_valid(int weapon_hash)


_is_ammo_valid

bool native.weapon._is_ammo_valid(int ammo_hash)


_0x23bf601a42f329a0

int native.weapon._0x23bf601a42f329a0(int p0)


is_ped_carrying_weapon

bool native.weapon.is_ped_carrying_weapon(int ped, int weapon_hash)


has_ped_got_weapon

bool native.weapon.has_ped_got_weapon(int ped, int weapon_hash, int p2, bool p3)


_0x07e1c35f0078c3f9

bool native.weapon._0x07e1c35f0078c3f9(int ped, int weapon)

Seems to return true if the passed weapon is some sort of non-lethal melee weapon.
Weapon must currently be held/equipped by the ped.

is_ped_weapon_ready_to_shoot

bool native.weapon.is_ped_weapon_ready_to_shoot(int ped)


_get_ped_weapon_in_slot

int native.weapon._get_ped_weapon_in_slot(int ped, int slot_hash)

slotHash is usually just the weaponHash name, but WEAPON_* is replaced with SLOT_*

give_delayed_weapon_to_ped

void native.weapon.give_delayed_weapon_to_ped(int ped, int weapon_hash, int ammo_count, bool p3, int add_reason)

addReason: see _ADD_AMMO_TO_PED

remove_all_ped_weapons

void native.weapon.remove_all_ped_weapons(int ped, bool p1, bool p2)


remove_weapon_from_ped

void native.weapon.remove_weapon_from_ped(int ped, int weapon_hash, bool p2, int remove_reason)

removeReason:
enum eRemoveItemReason : Hash
{
    REMOVE_REASON_CLIENT_PURGED = 0x4A4E94DC,
    REMOVE_REASON_COALESCE = 0x2ABE393E,
    REMOVE_REASON_DEBUG = 0xA07362E6,
    REMOVE_REASON_DEFAULT = 0xF77DE93D,
    REMOVE_REASON_DELETE_CHARACTER = 0x20AFBDE9,
    REMOVE_REASON_DROPPED = 0xEC7FB5D5,
    REMOVE_REASON_DUPLICATE = 0x19047132,
    REMOVE_REASON_GIFTED_INCORRECTLY = 0x9C4E3829,
    REMOVE_REASON_GIVEN = 0xAD5377D4,
    REMOVE_REASON_INSUFFICIENT_INVENTORY = 0x518D1AAE,
    REMOVE_REASON_ITEM_DOES_NOT_EXIST = 0xEAD5D889,
    REMOVE_REASON_LOADOUT = 0x1B94E3BA,
    REMOVE_REASON_SET_AMOUNT = 0x19D5CFA5,
    REMOVE_REASON_SOLD = 0x76C4B482,
    REMOVE_REASON_USED = 0x2188E0A3,
    REMOVE_REASON_USE_FAILED = 0x671F9EAD
};

_remove_weapon_from_ped_by_guid

void native.weapon._remove_weapon_from_ped_by_guid(int ped, ptr int weapon_guid, int remove_reason)


hide_ped_weapon_for_scripted_cutscene

void native.weapon.hide_ped_weapon_for_scripted_cutscene(int ped, bool toggle)

Hides the ped's weapon during a cutscene.

set_ped_current_weapon_visible

void native.weapon.set_ped_current_weapon_visible(int ped, bool visible, bool deselect_weapon, bool p3, bool p4)


_set_ped_weapon_attach_point_visibility

void native.weapon._set_ped_weapon_attach_point_visibility(int ped, int attach_point, bool visible)

attachPoint: see SET_CURRENT_PED_WEAPON

_set_ped_all_weapons_visibility

void native.weapon._set_ped_all_weapons_visibility(int ped, bool visible)


set_ped_drops_weapons_when_dead

void native.weapon.set_ped_drops_weapons_when_dead(int ped, bool toggle)


_0x431240a58484d5d0

void native.weapon._0x431240a58484d5d0(int ped, bool toggle)


_0x45e57fdd531c9477

void native.weapon._0x45e57fdd531c9477(int ped, bool toggle)


_0xf08d8feb455f2c8c

void native.weapon._0xf08d8feb455f2c8c(int ped, bool toggle)


_0x16d9841a85fa627e

void native.weapon._0x16d9841a85fa627e(int ped, bool toggle)


get_ped_last_weapon_impact_coord

bool native.weapon.get_ped_last_weapon_impact_coord(int ped, ref vec3 coords)


_clear_ped_last_weapon_damage

void native.weapon._clear_ped_last_weapon_damage(int ped)


_has_entity_been_damaged_by_weapon

bool native.weapon._has_entity_been_damaged_by_weapon(int entity, int weapon_name, int weapon_type)


set_ped_drops_inventory_weapon

void native.weapon.set_ped_drops_inventory_weapon(int ped, int weapon_hash, float x_offset, float y_offset, float z_offset, int ammo_count)


_0xb0fb9b196a3d13f0

void native.weapon._0xb0fb9b196a3d13f0(int p0, int p1, int p2)


_0x2ebf70e1d8c06683

void native.weapon._0x2ebf70e1d8c06683(int ped, int p1)

_SET_A* - _SET_B*

_0x63b83a526329afbc

void native.weapon._0x63b83a526329afbc(int p0)

Only used in R* Script fme_escaped_convicts, p0 = 0

_make_ped_reload

int native.weapon._make_ped_reload(int ped)


_refill_ammo_in_current_ped_weapon

int native.weapon._refill_ammo_in_current_ped_weapon(int ped)


make_ped_drop_weapon

int native.weapon.make_ped_drop_weapon(int ped, bool p1, int attach_point, bool p3, bool p4)

Old name: _DROP_CURRENT_PED_WEAPON

_get_ped_current_held_weapon

int native.weapon._get_ped_current_held_weapon(int ped)

Returns eCurrentHeldWeapon
_GET_R* - _GET_T*

set_allow_any_weapon_drop

void native.weapon.set_allow_any_weapon_drop(int ped, bool toggle)


_0xa3716a77dcf17424

void native.weapon._0xa3716a77dcf17424(int p0, int p1, int p2)


_0x457b16951ad77c1b

void native.weapon._0x457b16951ad77c1b(int p0)


_0x3799efcc3c8cd5e1

int native.weapon._0x3799efcc3c8cd5e1(int p0)


_get_max_lockon_distance_of_current_ped_weapon

float native.weapon._get_max_lockon_distance_of_current_ped_weapon(int ped)


_remove_weapon_component_from_ped

void native.weapon._remove_weapon_component_from_ped(int ped, int component_hash, int weapon_hash)


_has_ped_got_weapon_component

bool native.weapon._has_ped_got_weapon_component(int ped, int component_hash, int weapon_hash)


_is_ped_current_weapon_holstered

bool native.weapon._is_ped_current_weapon_holstered(int ped)


_0xd2209866b0cb72ea

int native.weapon._0xd2209866b0cb72ea(int p0, int p1)


_request_weapon_asset

void native.weapon._request_weapon_asset(int weapon_hash, int p1, bool p2)


_has_weapon_asset_loaded

bool native.weapon._has_weapon_asset_loaded(int weapon_hash)


_remove_weapon_asset

void native.weapon._remove_weapon_asset(int weapon_hash)


_0xe9b3fec825668291

void native.weapon._0xe9b3fec825668291(int p0, int p1, int p2)


_0x9cca3131e6b53c68

int native.weapon._0x9cca3131e6b53c68(int p0, int p1, int p2)


_get_weapon_name_2

string native.weapon._get_weapon_name_2(int weapon_hash)


_get_weapon_name

string native.weapon._get_weapon_name(int weapon_hash)

Returns "WNS_INVALID" if the weapon is invalid/doesn't exist.

_get_weapon_name_with_permanent_degradation

string native.weapon._get_weapon_name_with_permanent_degradation(int weapon_hash, float permanent_degradation_level)


_0xb832f1a686b9b810

void native.weapon._0xb832f1a686b9b810(int p0, int p1, int p2)


_0x5a695bd328586b44

int native.weapon._0x5a695bd328586b44(int p0, int p1)


_0x641351e9ad103890

void native.weapon._0x641351e9ad103890(int p0, int p1)


set_instantly_equip_weapon_pickups

void native.weapon.set_instantly_equip_weapon_pickups(int ped, bool toggle)


_set_force_auto_equip

void native.weapon._set_force_auto_equip(int ped, bool toggle)


_send_weapon_to_inventory

void native.weapon._send_weapon_to_inventory(int ped, int weapon_hash)

Appears to just send specified weapon to your horse holster without having to be close
However, the weapon is not visible on the horse holster, but you can reach the weapon on the weapon wheel

_0x14ff0c2545527f9b

void native.weapon._0x14ff0c2545527f9b(int horse, int weapon_hash, int ped)

Puts the gun visibly in your horse's holster without having to be close to the horse. Use 0xE9BD19F8121ADE3E before using this native
_A* or _B*

_0xd4c6e24d955ff061

void native.weapon._0xd4c6e24d955ff061(int p0)


_0xaffd0ccf31f469b8

int native.weapon._0xaffd0ccf31f469b8(int p0)


_get_weapon_stat_id

int native.weapon._get_weapon_stat_id(int weapon_hash)


_has_entity_been_damaged_by_weapon_recently

bool native.weapon._has_entity_been_damaged_by_weapon_recently(int entity, int weapon_hash, int ms)


_get_ped_hogtie_weapon

int native.weapon._get_ped_hogtie_weapon(int ped)


_create_weapon_object

int native.weapon._create_weapon_object(int weapon_hash, int ammo_count, float x, float y, float z, bool show_world_model, float scale)


remove_weapon_component_from_weapon_object

void native.weapon.remove_weapon_component_from_weapon_object(int weapon_object, int component)


has_weapon_got_weapon_component

bool native.weapon.has_weapon_got_weapon_component(int weapon, int addon_hash)


_give_weapon_component_to_weapon_object

void native.weapon._give_weapon_component_to_weapon_object(ptr int weapon_object, int ped, int component_hash, bool p3)


_get_weapon_object_from_ped

int native.weapon._get_weapon_object_from_ped(int ped, bool p1)

Detaches the weapon from the ped and actually removes the ped's weapon

_get_ped_weapon_object

int native.weapon._get_ped_weapon_object(int ped, bool p1)

_GET_M* - _GET_PED_A*

_give_weapon_component_to_entity

void native.weapon._give_weapon_component_to_entity(int entity, int component_hash, int weapon_hash, bool p3)

entity can be a ped or weapon object.

_0x74c9080fdd1bb48e

void native.weapon._0x74c9080fdd1bb48e(int p0, int p1)


_0x74c9080fdd1bb48f

void native.weapon._0x74c9080fdd1bb48f(int p0, int p1)


_0x74c2365fdd1bb48f

void native.weapon._0x74c2365fdd1bb48f(int p0, int p1)


_0x74c90aaacc1dd48f

void native.weapon._0x74c90aaacc1dd48f(int p0)


_0x74c8000fdd1bb111

int native.weapon._0x74c8000fdd1bb111(int p0, int p1)


_0x74c8000fdd1bb222

int native.weapon._0x74c8000fdd1bb222(int p0, int p1)


_get_weapon_gun_spinning_weapon_emote_trick_type_hash

int native.weapon._get_weapon_gun_spinning_weapon_emote_trick_type_hash(int emote, int weapon_emote_trick_type)

Returns iSpinHash

_set_active_gun_spinning_equip_kit_emote_twirl

void native.weapon._set_active_gun_spinning_equip_kit_emote_twirl(int ped, int emote)

emote hashes: KIT_EMOTE_TWIRL_GUN, KIT_EMOTE_TWIRL_GUN_LEFT_HOLSTER, KIT_EMOTE_TWIRL_GUN_DUAL, 0 (to unequip)

_get_ped_gun_spinning_equipped_kit_emote_twirl

int native.weapon._get_ped_gun_spinning_equipped_kit_emote_twirl(int ped)

Returns emote Hash

_set_active_gun_spinning_kit_emote_twirl

void native.weapon._set_active_gun_spinning_kit_emote_twirl(int ped, int weapon_emote_trick_type, int spin)

spinHash can be -1, 0 to disable

_get_ped_gun_spinning_hash_from_weapon_emote_variation

int native.weapon._get_ped_gun_spinning_hash_from_weapon_emote_variation(int ped, int weapon_emote_variation)

Returns iSpinHash / iVariationSpin

_get_weapon_emote_variation

int native.weapon._get_weapon_emote_variation(int ped, int variation)

Returns weaponEmoteVariation

WEAPON_EMOTE_VARIATION_INVALID = -2,
WEAPON_EMOTE_VARIATION_BASE,
WEAPON_EMOTE_VARIATION_A,
WEAPON_EMOTE_VARIATION_B,
WEAPON_EMOTE_VARIATION_C,
WEAPON_EMOTE_VARIATION_D,
WEAPON_EMOTE_VARIATION_PREVIEW,
WEAPON_EMOTE_NUM_VARIATIONS

_set_gun_spinning_inventory_slot_id_activate

void native.weapon._set_gun_spinning_inventory_slot_id_activate(int ped, int emote_type)

_STOP_* - _TEST_*

_get_can_twirl_weapon

bool native.weapon._get_can_twirl_weapon(int weapon_hash)


_get_correct_kit_emote_twirl_gun

bool native.weapon._get_correct_kit_emote_twirl_gun(int ped, ptr int weapon_guid)

_GET_BEST_* - _GET_CLOSEST_*

_0xbc9444f2ff94a9c0

int native.weapon._0xbc9444f2ff94a9c0(int p0)


_get_default_ped_weapon_collection

int native.weapon._get_default_ped_weapon_collection(int ped_model)

Returns weaponCollection Hash
Example: RE_POLICECHASE_MALES_01: Carbine Repeater + Knife, LO_AGRO_PED

_give_weapon_collection_to_ped

void native.weapon._give_weapon_collection_to_ped(int ped, int weapon_collection)


_0xf252a85b8f3f8c58

bool native.weapon._0xf252a85b8f3f8c58(int weapon_collection, int dualwield_variant)


_0x9eefd670f10656d7

int native.weapon._0x9eefd670f10656d7(int weapon_collection, int weapon_group)

Returns weaponHash

_0xf2f585411e748b9c

int native.weapon._0xf2f585411e748b9c(int p0, int p1)


get_weapon_clip_size

int native.weapon.get_weapon_clip_size(int weapon_hash)


_0xa769d753922b031b

void native.weapon._0xa769d753922b031b(int p0, int p1, int p2)


_0xc5899c4cd2e2495d

void native.weapon._0xc5899c4cd2e2495d(int p0)


get_allow_dual_wield

bool native.weapon.get_allow_dual_wield(int ped)


_set_allow_dual_wield

void native.weapon._set_allow_dual_wield(int ped, bool allow)


_0x44c8f4908f1b2622

bool native.weapon._0x44c8f4908f1b2622(int ped, int ammo_hash)


_is_weapon_knife

bool native.weapon._is_weapon_knife(int weapon_hash)


is_weapon_revolver

bool native.weapon.is_weapon_revolver(int weapon_hash)


is_weapon_pistol

bool native.weapon.is_weapon_pistol(int weapon_hash)


is_weapon_repeater

bool native.weapon.is_weapon_repeater(int weapon_hash)


is_weapon_rifle

bool native.weapon.is_weapon_rifle(int weapon_hash)


is_weapon_shotgun

bool native.weapon.is_weapon_shotgun(int weapon_hash)


_is_weapon_sniper

bool native.weapon._is_weapon_sniper(int weapon_hash)


is_weapon_melee_weapon

bool native.weapon.is_weapon_melee_weapon(int weapon_hash)


_is_weapon_throwable

bool native.weapon._is_weapon_throwable(int weapon_hash)


_is_weapon_lasso

bool native.weapon._is_weapon_lasso(int weapon_hash)


_is_weapon_binoculars

bool native.weapon._is_weapon_binoculars(int weapon_hash)


is_weapon_a_gun

bool native.weapon.is_weapon_a_gun(int weapon_hash)

Returns true if CWeaponInfoFlags::Flags::Gun is set.

_is_weapon_two_handed

bool native.weapon._is_weapon_two_handed(int weapon_hash)


_is_weapon_one_handed

bool native.weapon._is_weapon_one_handed(int weapon_hash)


_is_weapon_silent

bool native.weapon._is_weapon_silent(int weapon_hash)


_0xea522f991e120d45

int native.weapon._0xea522f991e120d45(int p0)


_is_ammo_silent

bool native.weapon._is_ammo_silent(int ammo_hash)


_is_ammo_silent_2

bool native.weapon._is_ammo_silent_2(int ammo_hash)


should_weapon_be_discarded_when_swapped

bool native.weapon.should_weapon_be_discarded_when_swapped(int weapon_hash)


_0x5b235f24472f2c3b

int native.weapon._0x5b235f24472f2c3b(int p0, int p1)


_0xbfca7afabf9d7967

int native.weapon._0xbfca7afabf9d7967(int p0, int p1)


_0x495a04caec263af8

int native.weapon._0x495a04caec263af8(int p0, int p1)


_0x95ca12e2c68043e5

int native.weapon._0x95ca12e2c68043e5(int p0, int p1)


_0xabc18a28bad4b46f

int native.weapon._0xabc18a28bad4b46f(int p0, int p1)


_0x80bb243789008a82

int native.weapon._0x80bb243789008a82(int p0, int p1)


_get_weapon_damage

float native.weapon._get_weapon_damage(int weapon_object)

Related to weapon visual damage, not actual damage.

_set_weapon_damage

void native.weapon._set_weapon_damage(int weapon_object, float level, bool p2)

Related to weapon visual damage, not actual damage.

_get_weapon_dirt

float native.weapon._get_weapon_dirt(int weapon_object)


_set_weapon_dirt

void native.weapon._set_weapon_dirt(int weapon_object, float level, bool p2)


_get_weapon_soot

float native.weapon._get_weapon_soot(int weapon_object)


_set_weapon_soot

void native.weapon._set_weapon_soot(int weapon_object, float level, bool p2)


_set_weapon_level_threshold

void native.weapon._set_weapon_level_threshold(int weapon_object, float threshold)

every other level will have the max value of (brokeLevel - threshold)

get_weapon_degradation

float native.weapon.get_weapon_degradation(int weapon_object)

0.0: good condition, 1.0: poor condition

get_weapon_permanent_degradation

float native.weapon.get_weapon_permanent_degradation(int weapon_object)

Related to rust of weapons

_set_weapon_degradation

void native.weapon._set_weapon_degradation(int weapon_object, float level)


_listen_projectile_hit_events

void native.weapon._listen_projectile_hit_events(bool listen)


_get_weapon_scale

float native.weapon._get_weapon_scale(int weapon_object)


_set_weapon_scale

void native.weapon._set_weapon_scale(int weapon_object, float scale)


_0x58425fca3d3a2d15

int native.weapon._0x58425fca3d3a2d15(int p0)


_0xec97101a8f311282

int native.weapon._0xec97101a8f311282(int p0)


_get_current_ped_weapon_ammo_type

int native.weapon._get_current_ped_weapon_ammo_type(int ped, int weapon_object)

Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)

_get_current_ammo_type_from_guid

int native.weapon._get_current_ammo_type_from_guid(int ped, ptr int weapon_guid)

Returns ammoHash

_is_ammo_type_valid_for_weapon

bool native.weapon._is_ammo_type_valid_for_weapon(int weapon_hash, int ammo_hash)


_set_ammo_type_for_ped_weapon

void native.weapon._set_ammo_type_for_ped_weapon(int ped, int weapon_hash, int ammo_hash)


_0x183ce355115b6e75

void native.weapon._0x183ce355115b6e75(int p0, int p1)


_set_ammo_type_for_ped_weapon_inventory

void native.weapon._set_ammo_type_for_ped_weapon_inventory(int ped, ptr int weapon_inventory_uid, int ammo_hash)


_disable_ammo_type_for_ped_weapon

void native.weapon._disable_ammo_type_for_ped_weapon(int ped, int weapon_hash, int ammo_hash)


_disable_ammo_type_for_ped

void native.weapon._disable_ammo_type_for_ped(int ped, int ammo_hash)


_0xd63b4ba3a02a99e0

void native.weapon._0xd63b4ba3a02a99e0(int p0, int p1)


_enable_ammo_type_for_ped_weapon

void native.weapon._enable_ammo_type_for_ped_weapon(int ped, int weapon_hash, int ammo_hash)


_enable_ammo_type_for_ped

void native.weapon._enable_ammo_type_for_ped(int ped, int weapon_hash)


_0x404514d231db27a0

void native.weapon._0x404514d231db27a0(int p0, int p1)


_0xd53846b9c931c181

void native.weapon._0xd53846b9c931c181(int p0, int p1, int p2)


_0x000fa7a4a8443af7

void native.weapon._0x000fa7a4a8443af7(int p0)


_0xecbb26529a737ef6

void native.weapon._0xecbb26529a737ef6(int p0)


_get_weapon_attach_point

int native.weapon._get_weapon_attach_point(int ped, int attach_point)

Returns WeaponAttachPoint

_0x4823f13a21f51964

int native.weapon._0x4823f13a21f51964(int p0, int p1)


set_current_ped_weapon_by_guid

void native.weapon.set_current_ped_weapon_by_guid(int ped, ptr int weapon_uid, bool p2, bool p3, bool p4, bool p5)

Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED

set_player_ped_quick_swap_weapon_by_guid

void native.weapon.set_player_ped_quick_swap_weapon_by_guid(int ped, ptr int guid_primary, ptr int guid_secondary)


_get_player_ped_quick_swap_weapon_by_guid

void native.weapon._get_player_ped_quick_swap_weapon_by_guid(int ped, ptr int guid_primary, ptr int guid_secondary)

Outputs cached guids

_0x0de0944eccb3df5d

bool native.weapon._0x0de0944eccb3df5d(int ped)

_GET_D* - _GET_L*

_0x46d42883e873c1d7

int native.weapon._0x46d42883e873c1d7(int ped)

_GET_NUM_*

_is_target_ped_constrained_by_ped_using_bolas

bool native.weapon._is_target_ped_constrained_by_ped_using_bolas(int ped, int target_ped)


_0x65dc4ac5b96614cb

int native.weapon._0x65dc4ac5b96614cb(int weapon_hash)

Returns attachPoint