Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CMD:kill(playerid, params[])
- {
- #pragma unused params
- //Since we don't need any parameters for kill command, we tag them as unused.
- SendClientMessage(playerid, 0xFF0000FF, "* You are attempting to suicide.");
- //Sending a message.
- ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.1,1,1,1,1,1,1);
- //Apply animation instantly when the command is used.
- SetTimerEx("KillPlayer", 4000, false, "i", playerid);
- //Letting the timer call "KillPlayer" after 4 seconds.
- //And also passing "playerid" as an integer "i" for the KillPlayer callback.
- //Or else, the KillPlayer will target always target id 0.
- }
- forward KillPlayer(playerid);
- public KillPlayer(playerid)
- {
- return SetPlayerHealth(playerid, 0.0);
- }
Advertisement
Add Comment
Please, Sign In to add comment