Errors & Problem
#2

Try this.
pawn Код:
COMMAND::sethp(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] <= 1336)
    {
        new
            toplayer, // Player that is recieving HP
            Float:newhp;

        if (sscanf(params, "if", toplayer, newhp))
        {
            if (IsPlayerConnected(toplayer))
            {
                new
                    message[40];
                   
                SetPlayerHealth(toplayer, newhp);
                format(message, sizeof(message), "Your HP has been set to $%f by an admin!", newhp);
                SendClientMessage(toplayer, COLOR_SYSTEM, message);
            }
            else SendClientMessage(playerid, COLOR_SYSTEM, "Invalid ID");
        }
        else SendClientMessage(playerid, COLOR_SYSTEM, "[SYNTAX:] /sethp [id] [hp]");
    }
    else SendClientMessage(playerid, COLOR_SYSTEM, "You're not authorized to use this command.");

    return 1;

}
And for the other warnings, we need to see some code.
Reply


Messages In This Thread
Errors & Problem - by PixeledNinja - 21.09.2010, 00:21
Re: Errors & Problem - by Backwardsman97 - 21.09.2010, 01:47
Re: Errors & Problem - by PixeledNinja - 21.09.2010, 01:53
Re: Errors & Problem - by Toni - 21.09.2010, 02:06

Forum Jump:


Users browsing this thread: 1 Guest(s)