The Lab
WEAPON native

GET_CURRENT_PED_WEAPON_ENTITY_INDEX

returns Entity2 paramsbuild 1207

Returns the entity of the ped's current weapon at the given attach point.

Signature

C
Entity GET_CURRENT_PED_WEAPON_ENTITY_INDEX(Ped ped, int attachPoint); // 0x3B390A939AF0B5FC b1207

Parameters

#NameType
1pedPed
2attachPointint

Facts

Facts about GET_CURRENT_PED_WEAPON_ENTITY_INDEX
Name
GET_CURRENT_PED_WEAPON_ENTITY_INDEX
Hash
0x3B390A939AF0B5FC
Namespace
Returns
Entity
Game build
1207

Examples

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

Lua
local entity = Citizen.InvokeNative(0x3B390A939AF0B5FC, -- GET_CURRENT_PED_WEAPON_ENTITY_INDEX
  PlayerPedId(), -- Ped ped
  0, -- int attachPoint
  Citizen.ResultAsInteger()
)
print(entity)
JavaScript
const entity = Citizen.invokeNative("0x3B390A939AF0B5FC", // GET_CURRENT_PED_WEAPON_ENTITY_INDEX
  PlayerPedId(), // Ped ped
  0, // int attachPoint
  Citizen.resultAsInteger()
);
console.log(entity)
C#
int entity = Function.Call<int>((Hash)0x3B390A939AF0B5FC, // GET_CURRENT_PED_WEAPON_ENTITY_INDEX
  API.PlayerPedId(), // Ped ped
  0 // int attachPoint
);
All WEAPON natives

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