NETWORK_GET_ENTITY_KILLER_OF_PLAYER
Returns the entity that killed the player and writes the weapon used to weaponHash.
Signature
Entity NETWORK_GET_ENTITY_KILLER_OF_PLAYER(Player player, Hash* weaponHash); // 0x42B2DAA6B596F5F8 b1207Parameters
| # | Name | Type |
|---|---|---|
| 1 | player | Player |
| 2 | weaponHash | Hash* (out pointer) |
Facts
| 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.
local entity, weaponHash = Citizen.InvokeNative(0x42B2DAA6B596F5F8, -- NETWORK_GET_ENTITY_KILLER_OF_PLAYER
PlayerId(), -- Player player
Citizen.PointerValueInt(), -- Hash* weaponHash
Citizen.ResultAsInteger()
)
print(entity, weaponHash)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)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>();Related NETWORK natives
- NETWORK_GET_ENTITY_FROM_NETWORK_ID
- NETWORK_GET_ASSISTED_DAMAGE_OF_ENTITY
- NETWORK_GET_DESTROYER_OF_NETWORK_ID
- NETWORK_GET_NETWORK_ID_FROM_ENTITY
- NETWORK_GET_ENTITY_IS_NETWORKED
- _NETWORK_GET_PLAYER_OWNER_OF_NETWORK_ID
- NETWORK_GET_HOST_OF_SCRIPT
- NETWORK_GET_HOST_OF_THIS_SCRIPT
- NETWORK_GET_HOST_OF_THREAD
- NETWORK_GET_INSTANCE_ID_OF_THIS_SCRIPT
- NETWORK_GET_NETWORK_ID_FROM_ROPE_ID
- NETWORK_GET_PLAYER_FROM_GAMER_HANDLE
Facts compiled from community research (alloc8or/rdr3-nativedb-data, femga/rdr3_discoveries); descriptions and examples by The Lab.