OnPedWasted: Difference between revisions

From Multi Theft Auto: Wiki
Jump to navigation Jump to search
(Removed bullshit example)
mNo edit summary
Line 1: Line 1:
__NOTOC__  
__NOTOC__  
{{Server event}}
{{Server event}}
{{Needs Example}}
This event is triggered when a ped is killed or dies. It is not triggered for players.
This event is triggered when a ped is killed or dies. It is not triggered for players.


Line 16: Line 17:
==Source==
==Source==
The [[event system#Event source|source]] of this event is the [[ped]] that died or got killed.
The [[event system#Event source|source]] of this event is the [[ped]] that died or got killed.
==Example==
<syntaxhighlight lang="lua">
--TODO
</syntaxhighlight>


==See Also==
==See Also==
{{Ped_events}}
{{Ped_events}}

Revision as of 23:39, 28 March 2012

Accessories-text-editor.png Script Example Missing Event OnPedWasted needs a script example, help out by writing one.

Before submitting check out Editing Guidelines Script Examples.

This event is triggered when a ped is killed or dies. It is not triggered for players.

Parameters

int totalAmmo, element killer, int killerWeapon, int bodypart [, bool stealth ]
  • totalAmmo: an integer representing the total ammo the victim had when he died.
  • killer: an element representing the player or vehicle who was the killer. If there was no killer this is false.
  • killerWeapon: an integer representing the killer weapon or the death reason.
  • bodypart: an integer representing the bodypart ID the victim was hit on when he died.
  • 3: Torso
  • 4: Ass
  • 5: Left Arm
  • 6: Right Arm
  • 7: Left Leg
  • 8: Right Leg
  • 9: Head
  • stealth: boolean value representing whether or not this was a stealth kill

Source

The source of this event is the ped that died or got killed.

Example

--TODO

See Also