The Lab
NETWORK native

NETWORK_GET_ENTITY_KILLER_OF_PLAYER

returns Entity2 paramsbuild 1207

Returns the entity that killed the player and writes the weapon used to weaponHash.

Signature

C
Entity NETWORK_GET_ENTITY_KILLER_OF_PLAYER(Player player, Hash* weaponHash); // 0x42B2DAA6B596F5F8 b1207

Parameters

#NameType
1playerPlayer
2weaponHashHash* (out pointer)

Facts

Facts about NETWORK_GET_ENTITY_KILLER_OF_PLAYER
Name
NETWORK_GET_ENTITY_KILLER_OF_PLAYER
Hash
0x42B2DAA6B596F5F8
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, weaponHash = Citizen.InvokeNative(0x42B2DAA6B596F5F8, -- NETWORK_GET_ENTITY_KILLER_OF_PLAYER
  PlayerId(), -- Player player
  Citizen.PointerValueInt(), -- Hash* weaponHash
  Citizen.ResultAsInteger()
)
print(entity, weaponHash)
JavaScript
const [entity, weaponHash] = Citizen.invokeNative("0x42B2DAA6B596F5F8", // NETWORK_GET_ENTITY_KILLER_OF_PLAYER
  PlayerId(), // Player player
  Citizen.pointerValueInt(), // Hash* weaponHash
  Citizen.resultAsInteger()
);
console.log(entity, weaponHash)
C#
var weaponHashArg = new OutputArgument();
int entity = Function.Call<int>((Hash)0x42B2DAA6B596F5F8, // NETWORK_GET_ENTITY_KILLER_OF_PLAYER
  API.PlayerId(), // Player player
  weaponHashArg // Hash* weaponHash
);
int weaponHash = weaponHashArg.GetResult<int>();
All NETWORK natives

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