18.10.2014, 06:36
try that:
pawn Код:
CMD:sethp(playerid,params[])
{
if(IsPlayerAdmin(playerid))
{
new Health;
new PID;
if(sscanf(params, "ud", PID, Health)) return SendClientMessage(playerid, -1, "USAGE: /sethp [playerid] [health]");
if(!IsPlayerConnected(PID)) return SendClientMessage(playerid, -1, "Player is not connected");
SetPlayerHealth(PID, Health);
}
else if(!IsPlayerAdmin(playerid))
{
SendClientMessage(playerid, -1, "You are not authorized to use this command!");
return 0;
}
return 1;
}