/pass
#2

You messed up the {} brackets, recheck them.
Additionally, else have to follow directly after the if-lines, but you got lines between it.

This way it should work:
pawn Код:
if(strcmp(cmd, "/pass", true) == 0)
    { // opening bracket instead of closing it.
        if(IsPlayerConnected(playerid))
        {
            if(!IsPlayerInRangeOfPoint(playerid,5,1450.8146,-1024.9728,2066.6331))
            {
                SetPlayerPos(playerid, 1447.4244,-1023.3749,2054.1021);
                // These lines belong in this code block, so they are only executed when the if condition is true
                SendClientMessage(playerid, COLOR_GRAD1, "   You have been teleported !");
                SetPlayerInterior(playerid,0);
                PlayerInfo[playerid][pInt] = 0;
            } else
            {
                SendClientMessage(playerid, COLOR_GRAD1, "   You are not at the bank vault !");
            }
        }
        return 1;
    } // close bracket, instead of opening it
Reply


Messages In This Thread
/pass - by Karl1195 - 06.07.2011, 12:20
Re: /pass - by Mauzen - 06.07.2011, 12:29
Re: /pass - by SmileyForCheat - 06.07.2011, 12:30
Re: /pass - by Karl1195 - 06.07.2011, 13:02
Re: /pass - by Karl1195 - 06.07.2011, 13:32
Re: /pass - by Laronic - 06.07.2011, 14:32

Forum Jump:


Users browsing this thread: 1 Guest(s)