Authority
#3

First of all: What the hell?!? Why did you make the indentation so hard to understand??

Here is the code in understandable format, look where I put the question marks and tell me what that's all about?
pawn Код:
CMD:goto(playerid, params[])
{
    if (PlayerInfo[playerid][pAdmin] >= 1) // Wrong way :)
    {
        return SendClientMessage(playerid, 0xFF4646FF, "You are not authorized to use that command !");
    }
    else
    {
        new pID,
            otherId,
            string[256];
        if(!IsPlayerConnected(pID))
            return SendClientMessage(playerid, COLOR_RED, "* Invalid player ID!");
        { // ???????
             if(sscanf(params, "rii", otherId)) // Missing two parimeters (Two integers)
                 return SendClientMessage(playerid, 0xAFAFAFAA, "Usage: /goto [PlayerID/PartOfName]");
              format(string, sizeof(string), "* You have successfully teleported your self",playerid);
              SendClientMessage(playerid, COLOR_LIGHTRED, string);
            new Float:x, Float:y, Float:z;
            GetPlayerPos(otherId, x, y, z);
            SetPlayerPos(playerid, x+1, y, z);
        } // ???????
    }
    return 1;
}
Reply


Messages In This Thread
Authority - by Scriptissue - 07.10.2010, 22:38
Re: Authority - by Calgon - 07.10.2010, 22:40
Re: Authority - by Lenny the Cup - 07.10.2010, 22:42
Re: Authority - by Scenario - 07.10.2010, 22:46
Re: Authority - by Lenny the Cup - 07.10.2010, 22:49

Forum Jump:


Users browsing this thread: 2 Guest(s)