The Lab
WEAPON native

GET_CURRENT_PED_VEHICLE_WEAPON

returns BOOL2 paramsbuild 1207

Writes the hash of the ped's current vehicle weapon to weaponHash. Returns true if the ped has one.

Signature

C
BOOL GET_CURRENT_PED_VEHICLE_WEAPON(Ped ped, Hash* weaponHash); // 0x1017582BCD3832DC b1207

Parameters

#NameType
1pedPed
2weaponHashHash* (out pointer)

Facts

Facts about GET_CURRENT_PED_VEHICLE_WEAPON
Name
GET_CURRENT_PED_VEHICLE_WEAPON
Hash
0x1017582BCD3832DC
Namespace
Returns
BOOL
Game build
1207

Examples

Calls by hash work in every RedM runtime. Replace the placeholder arguments with your own values.

Lua
local result, weaponHash = Citizen.InvokeNative(0x1017582BCD3832DC, -- GET_CURRENT_PED_VEHICLE_WEAPON
  PlayerPedId(), -- Ped ped
  Citizen.PointerValueInt(), -- Hash* weaponHash
  Citizen.ReturnResultAnyway()
)
if result then
  -- ...
end
JavaScript
const [result, weaponHash] = Citizen.invokeNative("0x1017582BCD3832DC", // GET_CURRENT_PED_VEHICLE_WEAPON
  PlayerPedId(), // Ped ped
  Citizen.pointerValueInt(), // Hash* weaponHash
  Citizen.returnResultAnyway()
);
if (result) {
  // ...
}
C#
var weaponHashArg = new OutputArgument();
bool result = Function.Call<bool>((Hash)0x1017582BCD3832DC, // GET_CURRENT_PED_VEHICLE_WEAPON
  API.PlayerPedId(), // Ped ped
  weaponHashArg // Hash* weaponHash
);
int weaponHash = weaponHashArg.GetResult<int>();
All WEAPON natives

Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.