30.04.2011, 13:10
How can I make a simple command that kills the player of the id I put in? Something like, I type /kill 1, and player with id 1 gets killed.... example anyone??
Thanks!
Thanks!
CMD:kill(playerid,params[])
{
new id;
if(sscanf(params, "u", id)) SendClientMessage(playerid,comandos,"USAGE: /kill [ID/NAME]");
else if (id == INVALID_PLAYER_ID) SendClientMessage(playerid,comandos, "Player not found");
else
{
if(!IsPlayerAdmin(playerid)) return 1;
SetPlayerHealth(id,0.0);
SendClienMessage(playerid,green, "You have been teleported");
}
return 1;
}