weapon

Methods

_get_weapon_unlock

function native.weapon._get_weapon_unlock(weapon_hash: int): int

_add_ammo_to_ped

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 };

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

_add_ammo_to_ped_by_type

addReason: see _ADD_AMMO_TO_PED

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

_remove_ammo_from_ped

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

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

_remove_ammo_from_ped_by_type

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

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

_remove_all_ped_ammo

function native.weapon._remove_all_ped_ammo(ped: int): void

set_ped_ammo

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

_0x8a779706da5ca3dd

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

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

_0x9409c62504a8f9e9

Only used in R* SP Script guama3

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

_set_vehicle_weapon_heading_limits

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

_set_vehicle_weapon_heading_limits_2

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

set_vehicle_weapon_heading

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

set_ped_infinite_ammo

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

_set_ped_infinite_ammo_clip

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

get_ammo_in_ped_weapon

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

get_max_ammo_in_clip

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

get_ammo_in_clip

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

_get_ammo_in_clip_by_inventory_uid

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

set_ammo_in_clip

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

_refill_ammo_in_clip

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

get_max_ammo

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

set_ped_ammo_by_type

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

get_ped_ammo_by_type

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

set_ped_ammo_to_drop

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

_get_ammo_type_for_weapon

function native.weapon._get_ammo_type_for_weapon(weapon_hash: int): int

get_ped_ammo_type_from_weapon

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

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

_get_weapon_type_from_ammo_type

function native.weapon._get_weapon_type_from_ammo_type(ammo_type: int): int

_get_weapon_component_type_model

function native.weapon._get_weapon_component_type_model(component_hash: int): int

_get_weapontype_model

Gets the model hash from the weapon hash.

function native.weapon._get_weapontype_model(weapon_hash: int): int

_get_weapontype_slot

Returns hash where WEAPON_ is replaced with SLOT_

function native.weapon._get_weapontype_slot(weapon_hash: int): int

get_weapontype_group

function native.weapon.get_weapontype_group(weapon_hash: int): int

_0xf8204ef17410bf43

Returns weaponHash

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

_is_weapon_kit

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

function native.weapon._is_weapon_kit(weapon_hash: int): bool

_is_weapon_kit_2

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

function native.weapon._is_weapon_kit_2(weapon_hash: int): bool

is_weapon_bow

function native.weapon.is_weapon_bow(weapon_hash: int): bool

_is_weapon_lantern

function native.weapon._is_weapon_lantern(weapon_hash: int): bool

_is_weapon_torch

function native.weapon._is_weapon_torch(weapon_hash: int): bool

give_weapon_to_ped_with_options

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

give_weapon_to_ped

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

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

_set_force_current_weapon_into_cocked_state

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

_0x9f0e1892c7f228a8

function native.weapon._0x9f0e1892c7f228a8(p0: bool): int

_holster_ped_weapons

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

_hide_ped_weapons

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

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

_0x4820a6939d7cef28

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

set_current_ped_weapon

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 };

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

get_current_ped_weapon

attachPoint: see SET_CURRENT_PED_WEAPON

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

get_current_ped_weapon_entity_index

Returns weaponObject, attachPoint: see SET_CURRENT_PED_WEAPON

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

_enable_weapon_restore

function native.weapon._enable_weapon_restore(ped: int): bool

get_ped_backup_weapon

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

_0x486c96a0dcd2bc92

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

_get_ped_worst_weapon

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

get_best_ped_weapon

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

_get_best_ped_weapon_in_inventory

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

get_best_ped_shortarm_guid

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

get_ped_weapon_guid_at_attach_point

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

_get_best_ped_weapon_in_group

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

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

_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.

function native.weapon._get_default_unarmed_weapon_hash(ped: int): int

_set_ammo_in_turret

turretHash: WEAPON_TURRET_MAXIUM, WEAPON_TURRET_GATLING, WEAPON_TURRET_CANNON, WEAPON_TURRET_REVOLVING_CANNON

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

set_current_ped_vehicle_weapon

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

get_current_ped_vehicle_weapon

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

is_ped_armed

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

_0xa2091482ed42ef85

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

_is_weapon_holster_state_changing

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

function native.weapon._is_weapon_holster_state_changing(ped: int): bool

is_weapon_valid

function native.weapon.is_weapon_valid(weapon_hash: int): bool

_is_ammo_valid

function native.weapon._is_ammo_valid(ammo_hash: int): bool

_0x23bf601a42f329a0

function native.weapon._0x23bf601a42f329a0(p0: int): int

is_ped_carrying_weapon

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

has_ped_got_weapon

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

_0x07e1c35f0078c3f9

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.

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

is_ped_weapon_ready_to_shoot

function native.weapon.is_ped_weapon_ready_to_shoot(ped: int): bool

_get_ped_weapon_in_slot

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

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

give_delayed_weapon_to_ped

addReason: see _ADD_AMMO_TO_PED

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

remove_all_ped_weapons

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

remove_weapon_from_ped

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 };

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

_remove_weapon_from_ped_by_guid

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

hide_ped_weapon_for_scripted_cutscene

Hides the ped's weapon during a cutscene.

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

set_ped_current_weapon_visible

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

_set_ped_weapon_attach_point_visibility

attachPoint: see SET_CURRENT_PED_WEAPON

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

_set_ped_all_weapons_visibility

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

set_ped_drops_weapons_when_dead

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

_0x431240a58484d5d0

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

_0x45e57fdd531c9477

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

_0xf08d8feb455f2c8c

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

_0x16d9841a85fa627e

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

get_ped_last_weapon_impact_coord

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

_clear_ped_last_weapon_damage

function native.weapon._clear_ped_last_weapon_damage(ped: int): void

_has_entity_been_damaged_by_weapon

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

set_ped_drops_inventory_weapon

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

_0xb0fb9b196a3d13f0

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

_0x2ebf70e1d8c06683

_SET_A* - _SET_B*

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

_0x63b83a526329afbc

Only used in R* Script fme_escaped_convicts, p0 = 0

function native.weapon._0x63b83a526329afbc(p0: int): void

_make_ped_reload

function native.weapon._make_ped_reload(ped: int): int

_refill_ammo_in_current_ped_weapon

function native.weapon._refill_ammo_in_current_ped_weapon(ped: int): int

make_ped_drop_weapon

Old name: _DROP_CURRENT_PED_WEAPON

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

_get_ped_current_held_weapon

Returns eCurrentHeldWeapon _GET_R* - _GET_T*

function native.weapon._get_ped_current_held_weapon(ped: int): int

set_allow_any_weapon_drop

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

_0xa3716a77dcf17424

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

_0x457b16951ad77c1b

function native.weapon._0x457b16951ad77c1b(p0: int): void

_0x3799efcc3c8cd5e1

function native.weapon._0x3799efcc3c8cd5e1(p0: int): int

_get_max_lockon_distance_of_current_ped_weapon

function native.weapon._get_max_lockon_distance_of_current_ped_weapon(ped: int): float

_remove_weapon_component_from_ped

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

_has_ped_got_weapon_component

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

_is_ped_current_weapon_holstered

function native.weapon._is_ped_current_weapon_holstered(ped: int): bool

_0xd2209866b0cb72ea

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

_request_weapon_asset

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

_has_weapon_asset_loaded

function native.weapon._has_weapon_asset_loaded(weapon_hash: int): bool

_remove_weapon_asset

function native.weapon._remove_weapon_asset(weapon_hash: int): void

_0xe9b3fec825668291

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

_0x9cca3131e6b53c68

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

_get_weapon_name_2

function native.weapon._get_weapon_name_2(weapon_hash: int): string

_get_weapon_name

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

function native.weapon._get_weapon_name(weapon_hash: int): string

_get_weapon_name_with_permanent_degradation

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

_0xb832f1a686b9b810

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

_0x5a695bd328586b44

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

_0x641351e9ad103890

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

set_instantly_equip_weapon_pickups

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

_set_force_auto_equip

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

_send_weapon_to_inventory

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

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

_0x14ff0c2545527f9b

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*

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

_0xd4c6e24d955ff061

function native.weapon._0xd4c6e24d955ff061(p0: int): void

_0xaffd0ccf31f469b8

function native.weapon._0xaffd0ccf31f469b8(p0: int): int

_get_weapon_stat_id

function native.weapon._get_weapon_stat_id(weapon_hash: int): int

_has_entity_been_damaged_by_weapon_recently

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

_get_ped_hogtie_weapon

function native.weapon._get_ped_hogtie_weapon(ped: int): int

_create_weapon_object

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

remove_weapon_component_from_weapon_object

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

has_weapon_got_weapon_component

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

_give_weapon_component_to_weapon_object

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

_get_weapon_object_from_ped

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

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

_get_ped_weapon_object

_GET_M* - _GET_PED_A*

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

_give_weapon_component_to_entity

entity can be a ped or weapon object.

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

_0x74c9080fdd1bb48e

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

_0x74c9080fdd1bb48f

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

_0x74c2365fdd1bb48f

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

_0x74c90aaacc1dd48f

function native.weapon._0x74c90aaacc1dd48f(p0: int): void

_0x74c8000fdd1bb111

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

_0x74c8000fdd1bb222

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

_get_weapon_gun_spinning_weapon_emote_trick_type_hash

Returns iSpinHash

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

_set_active_gun_spinning_equip_kit_emote_twirl

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

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

_get_ped_gun_spinning_equipped_kit_emote_twirl

Returns emote Hash

function native.weapon._get_ped_gun_spinning_equipped_kit_emote_twirl(ped: int): int

_set_active_gun_spinning_kit_emote_twirl

spinHash can be -1, 0 to disable

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

_get_ped_gun_spinning_hash_from_weapon_emote_variation

Returns iSpinHash / iVariationSpin

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

_get_weapon_emote_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

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

_set_gun_spinning_inventory_slot_id_activate

STOP* - TEST*

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

_get_can_twirl_weapon

function native.weapon._get_can_twirl_weapon(weapon_hash: int): bool

_get_correct_kit_emote_twirl_gun

GET_BEST* - GET_CLOSEST*

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

_0xbc9444f2ff94a9c0

function native.weapon._0xbc9444f2ff94a9c0(p0: int): int

_get_default_ped_weapon_collection

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

function native.weapon._get_default_ped_weapon_collection(ped_model: int): int

_give_weapon_collection_to_ped

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

_0xf252a85b8f3f8c58

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

_0x9eefd670f10656d7

Returns weaponHash

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

_0xf2f585411e748b9c

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

get_weapon_clip_size

function native.weapon.get_weapon_clip_size(weapon_hash: int): int

_0xa769d753922b031b

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

_0xc5899c4cd2e2495d

function native.weapon._0xc5899c4cd2e2495d(p0: int): void

get_allow_dual_wield

function native.weapon.get_allow_dual_wield(ped: int): bool

_set_allow_dual_wield

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

_0x44c8f4908f1b2622

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

_is_weapon_knife

function native.weapon._is_weapon_knife(weapon_hash: int): bool

is_weapon_revolver

function native.weapon.is_weapon_revolver(weapon_hash: int): bool

is_weapon_pistol

function native.weapon.is_weapon_pistol(weapon_hash: int): bool

is_weapon_repeater

function native.weapon.is_weapon_repeater(weapon_hash: int): bool

is_weapon_rifle

function native.weapon.is_weapon_rifle(weapon_hash: int): bool

is_weapon_shotgun

function native.weapon.is_weapon_shotgun(weapon_hash: int): bool

_is_weapon_sniper

function native.weapon._is_weapon_sniper(weapon_hash: int): bool

is_weapon_melee_weapon

function native.weapon.is_weapon_melee_weapon(weapon_hash: int): bool

_is_weapon_throwable

function native.weapon._is_weapon_throwable(weapon_hash: int): bool

_is_weapon_lasso

function native.weapon._is_weapon_lasso(weapon_hash: int): bool

_is_weapon_binoculars

function native.weapon._is_weapon_binoculars(weapon_hash: int): bool

is_weapon_a_gun

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

function native.weapon.is_weapon_a_gun(weapon_hash: int): bool

_is_weapon_two_handed

function native.weapon._is_weapon_two_handed(weapon_hash: int): bool

_is_weapon_one_handed

function native.weapon._is_weapon_one_handed(weapon_hash: int): bool

_is_weapon_silent

function native.weapon._is_weapon_silent(weapon_hash: int): bool

_0xea522f991e120d45

function native.weapon._0xea522f991e120d45(p0: int): int

_is_ammo_silent

function native.weapon._is_ammo_silent(ammo_hash: int): bool

_is_ammo_silent_2

function native.weapon._is_ammo_silent_2(ammo_hash: int): bool

should_weapon_be_discarded_when_swapped

function native.weapon.should_weapon_be_discarded_when_swapped(weapon_hash: int): bool

_0x5b235f24472f2c3b

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

_0xbfca7afabf9d7967

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

_0x495a04caec263af8

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

_0x95ca12e2c68043e5

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

_0xabc18a28bad4b46f

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

_0x80bb243789008a82

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

_get_weapon_damage

Related to weapon visual damage, not actual damage.

function native.weapon._get_weapon_damage(weapon_object: int): float

_set_weapon_damage

Related to weapon visual damage, not actual damage.

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

_get_weapon_dirt

function native.weapon._get_weapon_dirt(weapon_object: int): float

_set_weapon_dirt

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

_get_weapon_soot

function native.weapon._get_weapon_soot(weapon_object: int): float

_set_weapon_soot

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

_set_weapon_level_threshold

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

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

get_weapon_degradation

0.0: good condition, 1.0: poor condition

function native.weapon.get_weapon_degradation(weapon_object: int): float

get_weapon_permanent_degradation

Related to rust of weapons

function native.weapon.get_weapon_permanent_degradation(weapon_object: int): float

_set_weapon_degradation

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

_listen_projectile_hit_events

function native.weapon._listen_projectile_hit_events(listen: bool): void

_get_weapon_scale

function native.weapon._get_weapon_scale(weapon_object: int): float

_set_weapon_scale

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

_0x58425fca3d3a2d15

function native.weapon._0x58425fca3d3a2d15(p0: int): int

_0xec97101a8f311282

function native.weapon._0xec97101a8f311282(p0: int): int

_get_current_ped_weapon_ammo_type

Returns ammoHash from weaponObject (Returned by 0x6CA484C9A7377E4F)

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

_get_current_ammo_type_from_guid

Returns ammoHash

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

_is_ammo_type_valid_for_weapon

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

_set_ammo_type_for_ped_weapon

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

_0x183ce355115b6e75

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

_set_ammo_type_for_ped_weapon_inventory

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

_disable_ammo_type_for_ped_weapon

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

_disable_ammo_type_for_ped

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

_0xd63b4ba3a02a99e0

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

_enable_ammo_type_for_ped_weapon

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

_enable_ammo_type_for_ped

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

_0x404514d231db27a0

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

_0xd53846b9c931c181

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

_0x000fa7a4a8443af7

function native.weapon._0x000fa7a4a8443af7(p0: int): void

_0xecbb26529a737ef6

function native.weapon._0xecbb26529a737ef6(p0: int): void

_get_weapon_attach_point

Returns WeaponAttachPoint

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

_0x4823f13a21f51964

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

set_current_ped_weapon_by_guid

Equips a weapon from a weaponItem, similar to GIVE_WEAPON_TO_PED

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

set_player_ped_quick_swap_weapon_by_guid

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

_get_player_ped_quick_swap_weapon_by_guid

Outputs cached guids

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

_0x0de0944eccb3df5d

_GET_D* - _GET_L*

function native.weapon._0x0de0944eccb3df5d(ped: int): bool

_0x46d42883e873c1d7

GET_NUM*

function native.weapon._0x46d42883e873c1d7(ped: int): int

_is_target_ped_constrained_by_ped_using_bolas

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

_0x65dc4ac5b96614cb

Returns attachPoint

function native.weapon._0x65dc4ac5b96614cb(weapon_hash: int): int