killPed | Multi Theft Auto: Wiki Skip to content

killPed

Client-side
Server-side
Shared

This page is incomplete! Help wanted!

Please finish this page using the corresponding Old Wiki article.
Go to Contribution guidelines for more information.


This function kills the specified ped.

Syntax

killPed ( )

Code Examples

server

Example 1:This simple example adds akillcommand to commit suicide.

function commitSuicide ( sourcePlayer )
-- kill the player and make him responsible for it
killPed ( sourcePlayer, sourcePlayer )
end
-- attach our handler to the "kill" command
addCommandHandler ( "kill", commitSuicide )

See Also