NetworkClient1 output

networkGetKillerOfPlayer

NETWORK_GET_KILLER_OF_PLAYER0x2DA41ED6E1FCD7A5

The GTA V native NETWORK_GET_KILLER_OF_PLAYER of the NETWORK namespace, as LS:MP client scripts call it: the global function networkGetKillerOfPlayer, in JavaScript and in Lua.

SignatureJavaScript
networkGetKillerOfPlayer(player: Player): [result: Player, weaponHash: Hash]
SignatureLua
networkGetKillerOfPlayer(player: Player): Player, Hash

Usage

JavaScript
const [result, weaponHash] = networkGetKillerOfPlayer(player);
Lua
local result, weaponHash = networkGetKillerOfPlayer(player)

Parameters

ParameterTypeJavaScriptLua
playerPlayernumberinteger

Returns

2 values, in this order: an array in JavaScript, multiple return values in Lua.

#ValueTypeJavaScriptLuaDescription
1resultPlayernumberintegerThe native’s own return value.
2weaponHashHashnumberintegeroutput

Reference

Namespace
Network NETWORK
In the game
Player NETWORK_GET_KILLER_OF_PLAYER(Player player, Hash* weaponHash)
Hash
0x2DA41ED6E1FCD7A5
Introduced
Game build 463 legacy numbering
Formerly
_NETWORK_GET_PLAYER_KILLER_OF_PLAYER

Open in the interactive natives reference