Need Help with setting the constant Player Health
#3

pawn Код:
CMD:heal(playerid, params[])
{
    new id;
    new hp;
    new string[150];
    if(sscanf(params,"ui",id, hp)) return SendClientMessage(playerid, COLOR_RED1, "[ ! ] USAGE: /heal <playerid> <amount>");
    if(!IsPlayerConnected(id))return SendClientMessage (playerid, COLOR_WHITE, "ERROR: Invalid Player Id");
    if(IsPlayerAdmin(playerid)) return SendClientMessage (playerid, COLOR_RED1, "[ ! ] You need to be an admin!");
    format(string, sizeof(string), "[ ! ] Admin has sets your health to %d!", hp);
    SendClientMessage(id, -1, string);
    SetPlayerHealth(id, hp);
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)