07.07.2012, 15:53
*sigh* use this but you need to edit a few stuff;
pawn Код:
CMD:sethp(playerid, params[])
{
new id, health, string[128], string2[128];
if(sscanf(params, "ui")) return SendClientMessage(playerid, COLOR_RED, "|- [Error] /sethp [playerid] [Amount]");
if(health > 100) return SendClientMessage(playerid, COLOR_RED, "Dont' even try it, keep it below 100!");
SetPlayerHealth(id, playerVariables[id][pHealth] = health);
format(string, sizeof(string), "Gamemaster %s has set your health to %i", GetName(playerid), health);
SendClientMessage(id, COLOR_YELLOW, string);
format(string2, sizeof(string2), "You have set %s's health to %i", GetName(id), health);
SendClientMessage(playerid, COLOR_YELLOW, string2);
return 1;
}