RedM Natives

GET_CURRENT_PED_VEHICLE_WEAPON

Hash0x1017582BCD3832DC
Runtime nameGetCurrentPedVehicleWeapon
NamespaceWEAPON
SideClient
NameOfficial
Docs
Since build1207
GTA V hash0x1017582BCD3832DC

Signature

BOOL GET_CURRENT_PED_VEHICLE_WEAPON(Ped ped, Hash* weaponHash);

Parameters

NameTypeDescription
pedPed—
weaponHashHash*—

Returns BOOL

Usage

Lua
local retval, weaponHash = GetCurrentPedVehicleWeapon(ped, weaponHash)

-- always works, by hash
local retval, weaponHash = Citizen.InvokeNative(0x1017582BCD3832DC, ped, Citizen.PointerValueIntInitialized(weaponHash), Citizen.ReturnResultAnyway())
JavaScript and C#
JavaScript
const [retval, weaponHash] = GetCurrentPedVehicleWeapon(ped, weaponHash);

// by hash
const [retval, weaponHash] = Citizen.invokeNative('0x1017582BCD3832DC', ped, Citizen.pointerValueIntInitialized(weaponHash), Citizen.returnResultAnyway());
C#
var weaponHash = new OutputArgument();
bool retval = Function.Call<bool>((Hash)0x1017582BCD3832DC, ped, weaponHash);
// weaponHash.GetResult<int>()
  • The last argument is an in/out pointer: pass its initial value, and the updated value is returned after the result.

See also

Sources

alloc8or RDR3 NativeDB

Something wrong or missing? Contribute a verified note — corrections ship through pull requests.