Gate command
#10

There was a missing bracket and a missing equals sign. This compiled just fine.

pawn Код:
#include <a_samp>
new maingate;
new GateStat;

public OnGameModeInit()
{
    maingate = CreateObject(987,2894.78100586,2114.12182617,10.81382370,0.00000000,0.00000000,268.98352051);
    return 1;
}

public OnPlayerCommandText(playerid, cmdtext[])
{
    if(strcmp("/main", cmdtext) == 0)
    {
        if(GateStat == 0) //If gate is closed
        {
            GateStat = 1; //Gate = Open
            MoveObject(maingate, 2894.61962891,2106.19311523,10.81382370, 2.500000); //To open
        }
        else
        {
            GateStat = 0; //Gate = Closed
            MoveObject(maingate, 2894.78100586,2114.12182617,10.81382370, 2.500000); //To closed
        }
        return 1;
    }//Missing this
    return 0;
}
Reply


Messages In This Thread
Gate command - by Hobod - 04.08.2010, 01:09
Re: Gate command - by cofy1 - 04.08.2010, 01:25
Re: Gate command - by Hobod - 04.08.2010, 01:31
Re: Gate command - by Daren_Jacobson - 04.08.2010, 01:37
Re: Gate command - by Hobod - 04.08.2010, 12:44
Re: Gate command - by Ash. - 04.08.2010, 13:02
Re: Gate command - by Hobod - 04.08.2010, 17:37
Re: Gate command - by Daren_Jacobson - 04.08.2010, 18:00
Re: Gate command - by Hobod - 04.08.2010, 20:41
Re: Gate command - by JaTochNietDan - 04.08.2010, 21:36

Forum Jump:


Users browsing this thread: 3 Guest(s)