Scripting/Server/Events/onNPCKillPlayer
(0.5.4+) An NPC killed the player. The victim's own game names the killer, so it fires for shots, hits and running the player over with a car the NPC drives. onPlayerDeath(player, weapon) still follows, as before.
Syntax
onNPCKillPlayer(npc, player, weapon, bodypart)Arguments
- any npc
- Player player
- int weapon
- int bodypart
Example
function onNPCKillPlayer( npc, player, weapon, bodypart )
{
print( "onNPCKillPlayer fired" );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: NPC events
Categories: Server events | NPC events