error 001: expected token: ";", but found "public" HELP ME ASAP THANKS
#5

Try:
pawn Код:
#include <a_samp>
new gate;
new bool:gateopen;

public OnFilterScriptInit()
{
    SetTimer("GateCheck", 800, true);
    gate = CreateObject(969,1549.59997559,-1623.00000000,12.60000038,0.0, 0.0, 96.0, 250.0);
    return 1;
}

forward GateCheck();
public GateCheck()
{
    for(new i; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerInRangeOfPoint(i, 15.0, 1549.59997559, -1623.00000000, 12.6000003))
        {
            if(gateopen == false)
            {
                MoveObject(gate, 1549.59997559, -1623.00000000, 9.60000038, 3.5);
                gateopen = true;
                return 1;
            }
            if(gateopen == true)
            {
                MoveObject(gate, 1549.59997559, -1623.00000000, 12.60000038, 3.5);
                gateopen = false;
                return 1;
            }
        }
    }
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)