iPLEOMAX

Untitled

Dec 23rd, 2012
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.72 KB | None | 0 0
  1. CMD:kill(playerid, params[])
  2. {
  3.     #pragma unused params
  4.     //Since we don't need any parameters for kill command, we tag them as unused.
  5.    
  6.     SendClientMessage(playerid, 0xFF0000FF, "* You are attempting to suicide.");
  7.     //Sending a message.
  8.    
  9.     ApplyAnimation(playerid, "CRACK", "crckdeth1", 4.1,1,1,1,1,1,1);
  10.     //Apply animation instantly when the command is used.
  11.    
  12.     SetTimerEx("KillPlayer", 4000, false, "i", playerid);
  13.     //Letting the timer call "KillPlayer" after 4 seconds.
  14.     //And also passing "playerid" as an integer "i" for the KillPlayer callback.
  15.     //Or else, the KillPlayer will target always target id 0.
  16. }
  17.  
  18. forward KillPlayer(playerid);
  19. public KillPlayer(playerid)
  20. {
  21.     return SetPlayerHealth(playerid, 0.0);
  22. }
Advertisement
Add Comment
Please, Sign In to add comment