GET_CURRENT_PED_VEHICLE_WEAPON
Writes the hash of the ped's current vehicle weapon to weaponHash. Returns true if the ped has one.
Signature
BOOL GET_CURRENT_PED_VEHICLE_WEAPON(Ped ped, Hash* weaponHash); // 0x1017582BCD3832DC b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | ped | Ped |
| 2 | weaponHash | Hash* (out pointer) |
Facts
| 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.
local result, weaponHash = Citizen.InvokeNative(0x1017582BCD3832DC, -- GET_CURRENT_PED_VEHICLE_WEAPON
PlayerPedId(), -- Ped ped
Citizen.PointerValueInt(), -- Hash* weaponHash
Citizen.ReturnResultAnyway()
)
if result then
-- ...
endconst [result, weaponHash] = Citizen.invokeNative("0x1017582BCD3832DC", // GET_CURRENT_PED_VEHICLE_WEAPON
PlayerPedId(), // Ped ped
Citizen.pointerValueInt(), // Hash* weaponHash
Citizen.returnResultAnyway()
);
if (result) {
// ...
}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>();Related WEAPON natives
- GET_CURRENT_PED_WEAPON
- GET_CURRENT_PED_WEAPON_ENTITY_INDEX
- _GET_CURRENT_PED_WEAPON_AMMO_TYPE
- _GET_MAX_LOCKON_DISTANCE_OF_CURRENT_PED_WEAPON
- _GET_PED_CURRENT_HELD_WEAPON
- _GET_WEAPON_FROM_DEFAULT_PED_WEAPON_COLLECTION
- SET_CURRENT_PED_VEHICLE_WEAPON
- GET_AMMO_IN_PED_WEAPON
- GET_BEST_PED_WEAPON
- GET_PED_AMMO_TYPE_FROM_WEAPON
- GET_PED_BACKUP_WEAPON
- GET_PED_LAST_WEAPON_IMPACT_COORD
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.