Player Infomation!!!
#4

like this:
Код:
CMD:sethp(playerid, params[])
{
    new string[128], playa, health;
    if(sscanf(params, "ud", playa, health))
	{
        SendClientMessage(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.", GetPlayerName(playa), health);
                SendClientMessage(playerid, COLOR_WHITE, string);
            }
        }
        else SendClientMessage(playerid, COLOR_GRAD1, "Invalid player specified.");
    }
    else {
        SendClientMessage(playerid, COLOR_GRAD1, "You are not authorized to use that command!");
    }
    return 1;
}
But I Have Error:
Код:
C:\Users\Admin\Desktop\Example\gamemodes\Gany.pwn(1518) : warning 202: number of arguments does not match definition
C:\Users\Admin\Desktop\Example\gamemodes\Gany.pwn(1518) : warning 202: number of arguments does not match definition
Reply


Messages In This Thread
Player Infomation!!! - by xganyx - 24.06.2013, 12:15
Re: Player Infomation!!! - by ReVo_ - 24.06.2013, 12:16
Re: Player Infomation!!! - by dEcooR - 24.06.2013, 12:35
Re: Player Infomation!!! - by xganyx - 24.06.2013, 12:37
Re: Player Infomation!!! - by xganyx - 24.06.2013, 13:10

Forum Jump:


Users browsing this thread: 2 Guest(s)