03.11.2017, 19:15
PHP код:
CMD:hp(playerid, params[])
{
new Float:hp;
if(!IsPlayerAdmin(playerid)) return SendClientMessage(playerid, -1, "not authorized");
if(sscanf(params, "%i%f", strval(params), hp)) return SendClientMessage(playerid, -1, "Usage /hp [id] [amount]");
if(!IsPlayerConnected(strval(params) || IsPlayerNPC(strval(params)))) return SendClientMessage(playerid, -1, "Invalid player id");
else
{
SetPlayerHealth(strval(params), hp);
SendClientMessage(playerid, -1, "Health set");
}
return 1;
}