Two problems.
#6

Command:

pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext,"/heal",true,5))
    {
        new pID, health;
        if(PlayerInfo[playerid][pAdmin] <= 0)  return SendClientMessage(playerid, -1, "ERROR: You are not Admin Level 1 or higher.");
        if(!sscanf(cmdtext, "ui", pID, health))
        {
            SetPlayerHealth(pID, health);
            SendClientMessage(playerid, -1, "You have successfully set players health!");
        }
        else return SendClientMessage(playerid, -1, "Usage: /heal [PlayerID][Amount]");
        return 1;
    }
    return 1;
}
Should work then.
Reply


Messages In This Thread
Two problems. - by Kasis - 21.06.2011, 15:11
Re: Two problems. - by Scenario - 21.06.2011, 15:14
Re: Two problems. - by Kasis - 21.06.2011, 15:19
Re: Two problems. - by Kasis - 21.06.2011, 21:21
Re: Two problems. - by Sasino97 - 21.06.2011, 21:45
Re: Two problems. - by Jeffry - 22.06.2011, 10:17
Re: Two problems. - by Kasis - 22.06.2011, 10:48

Forum Jump:


Users browsing this thread: 1 Guest(s)