23.02.2012, 19:14
pawn Код:
COMMAND:sethp(playerid, params[])
{
new user, amount;
if(sscanf(params, "ui", user, amount)) return SendClientMessage(playerid, 0x924161FF, "USAGE: /sethp <player id/name> <amount>");
new string[180], name[MAX_PLAYER_NAME], Float:health;
SetPlayerHealth(user, amount);
GetPlayerName(playerid, name, sizeof(name));
format(string, sizeof(string), "Your health has been set to %f from %s", health, name);
SendClientMessage(user, 0x924161FF, string);
return 1;
}
I can't get player's health at line:
pawn Код:
format(string, sizeof(string), "Your health has been set to %f from %s", health, name);