Decrease the health
#3

Quote:
Originally Posted by Jankingston
Посмотреть сообщение
pawn Код:
CMD:sethp(playerid, params[])
{
    new string[128], playa, health;
    if(sscanf(params, "ud", playa, health))
    {
        SendClientMessageEx(playerid, COLOR_GRAD2, "USAGE: /sethp [playerid] [health]");
        return 1;
    }
    if (PlayerInfo[playerid][pAdmin] >= 4) {
        if(IsPlayerConnected(playa)) {
            if(playa != INVALID_PLAYER_ID)
            {
                SetPlayerHealth(playa, health);
                format(string, sizeof(string), "You have set %s's health to %d.", GetPlayerNameEx(playa), health);
                SendClientMessageEx(playerid, COLOR_WHITE, string);
            }
        }
        else SendClientMessageEx(playerid, COLOR_GRAD1, "Invalid player specified.");
    }
    else {
        SendClientMessageEx(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
Try it
Quote:
Originally Posted by AnonScripter
Посмотреть сообщение
makes the playerid's health automatically decreases 5% per 10 seconds
I really like how you do not read and post a command you got from somewhere.
Reply


Messages In This Thread
Decrease the health - by AnonScripter - 04.10.2013, 15:08
Re: Decrease the health - by Jankingston - 04.10.2013, 15:54
Re: Decrease the health - by Konstantinos - 04.10.2013, 15:58
Re: Decrease the health - by DanishHaq - 04.10.2013, 16:11
Re: Decrease the health - by AnonScripter - 04.10.2013, 16:13
Re: Decrease the health - by AnonScripter - 04.10.2013, 16:16
Re: Decrease the health - by [XST]O_x - 04.10.2013, 16:16
Re: Decrease the health - by AnonScripter - 04.10.2013, 16:18
Re: Decrease the health - by [XST]O_x - 04.10.2013, 16:20

Forum Jump:


Users browsing this thread: 1 Guest(s)