04.08.2010, 21:36
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;
}