Some gate-script error
#1

Hi giys im making some toll in my mapp but get some errors on this piece:
It have to check the wantedlevel, if its higher then 4, keep the gate closed.

If not, then open gate and get -50$ (this is not working too ingame, it take the money, and gives it back)

The problems are [b]

Here the piece of code you need:
pawn Код:
public OnPlayerCommandText(playerid, cmdtext[])
{
    if(!strcmp(cmdtext, "/toll", true)){
        if GetPlayerWantedLevel((playerid, => 4)){
            new wantedlevel;
            wantedlevel = GetPlayerWantedLevel(playerid);
            new tmp[64];
            format(tmp, sizeof(tmp), "Your current wanted level is: %i you cannot pass the toll!", wantedlevel);
            SendClientMessage(playerid, 0xFF0000FF, tmp);
        }

    else if(IsPlayerInRangeOfPoint(playerid, 15.0, 1806.19921875, 926.7998046875, 8.3000001907349)){
            SetTimerEx("CloseGate", 7000, false, "i", playerid);
            GivePlayerMoney(playerid, -50);
            MoveObject(Gate, 1806.1999511719, 926.79998779297, 8.3000001907349, 3.0, 0.0, 359.25, 0.0);
            return SendClientMessage(playerid, 0x006EFFFF, "You paid toll, you are ready to go!");
        }
    }
    return 0;
}
Thanks!

EDIT: I see[b] is not workin in a [pawn] = [fail]
Reply


Messages In This Thread
Some gate-script error - by jeremy8810 - 19.07.2012, 11:27
Re: Some gate-script error - by EV007 - 19.07.2012, 11:36
Re: Some gate-script error - by jeremy8810 - 19.07.2012, 11:44
Re: Some gate-script error - by NinjaChicken - 19.07.2012, 12:09
Re: Some gate-script error - by jeremy8810 - 19.07.2012, 12:32

Forum Jump:


Users browsing this thread: 1 Guest(s)