Scripting/Server/Events/onPedKillPlayer
(0.5.4+) A pedestrian (gang member, cop, street ped) killed the player. ped is the TrafficPed handle with traffic_sync on, otherwise null; pedModel is always the killer's ped model. onPlayerDeath still follows.
Syntax
onPedKillPlayer(ped, player, weapon, bodypart, pedModel)Arguments
- any ped –
pedis the TrafficPed handle withtraffic_sync on, otherwisenull;pedModelis always the killer's ped model. - Player player
- int weapon
- int bodypart
- int pedModel –
pedis the TrafficPed handle withtraffic_sync on, otherwisenull;pedModelis always the killer's ped model.
Example
function onPedKillPlayer( ped, player, weapon, bodypart, pedModel )
{
print( "onPedKillPlayer fired" );
}This sample was generated from the signature – adapt the values to your gamemode.
Related pages
Section: NPC events
Categories: Server events | NPC events