29.10.2011, 18:01
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
if(!strcmp("/kill",cmdtext,true))
{
SetPlayerHealth(playerid, -10);
return 1;
}
if(!strcmp("/heal", cmdtext, true))
{
if(!IsPlayerAdmin(playerid)) return 0;
{
SetPlayerHealth(playerid, 100);
return 1;
}
}
return 0;
}
Remember: To kill a player, always set health lower than 0, because it would just stand there with no health left, unable to do anything.