Please help me for /sethealth
#2

pawn Код:
CMD:fullhealth(playerid, params[])
{
    if (IsPlayerAdmin(playerid) == 1)
    {
        new command[56];
       
        if (sscanf(params, "d", command)) return SendClientMessage(playerid, RED, "USAGE: /fullhealth [ID]");
       
        else if (!strcmp(command, "d", true))
        {
            new playername[256];
            new adminname[256];
            new string[256];
           
            SetPlayerHealth(command, 100);
           
            GetPlayerName(command, playername, sizeof(playername));
            format(string, sizeof(string), "*** Health has been set to 100", playername);
            SendClientMessage(playerid, ORANGE, string);
           
            GetPlayerName(playerid, adminname, sizeof(adminname));
            format(string, sizeof(string), "*** 100% health set..", adminname);
            SendClientMessage(command, ORANGE, string);
        }
    }
    else
    {
        SendClientMessage(playerid, RED, "SERVER: Your health has been set by an admin");
    }
    return 1;
}
This script can only set the player health to 100.
Reply


Messages In This Thread
Please help me for /sethealth - by rashidkhoso37 - 21.09.2014, 06:23
Re: Please help me for /sethealth - by Ricagor - 21.09.2014, 06:28
Re: Please help me for /sethealth - by rashidkhoso37 - 21.09.2014, 06:34
Re: Please help me for /sethealth - by durd2001 - 21.09.2014, 06:52
Re: Please help me for /sethealth - by DobbysGamertag - 21.09.2014, 07:03
Re: Please help me for /sethealth - by Ricagor - 21.09.2014, 07:15
Re: Please help me for /sethealth - by mirza1221 - 21.09.2014, 07:15
Re: Please help me for /sethealth - by Ricagor - 21.09.2014, 07:18
Re: Please help me for /sethealth - by Ox1gEN - 21.09.2014, 07:34
Re: Please help me for /sethealth - by M0HAMMAD - 21.09.2014, 07:35

Forum Jump:


Users browsing this thread: 3 Guest(s)