29.03.2011, 22:41
pawn Код:
command(sethp, playerid, params[])
{
new player2, Float:health,string[128],string2[128];
if(sscanf(params, "uf", player2, health)) return SendClientMessage(playerid, COLOR_WHITE, "[USAGE]:/sethp <playerid> <health>");
if(!IsPlayerConnected(player2)) return SendClientMessage(playerid, COLOR_WHITE, "Invalid Player.");
SetPlayerHealth(player2, health);
format(string2,sizeof(string2),"Player's health set to: %d.",health);
SendClientMessage(playerid, COLOR_WHITE, string2);
format(string,sizeof(string),"Your health has been set to: %d.",health);
SendClientMessage(player2, COLOR_WHITE,string);
return 1;
}