16.03.2013, 12:06
This is not how GetObjectPos works. Just use a static variable. Under your
add:
then:
pawn Код:
if (PRESSED(KEY_ANALOG_LEFT ))
pawn Код:
static bool:gateOpen;
pawn Код:
if(gateOpen == false) // is closed, open it
{
}
else // is open, close it
{
}
gateStatus = !gateStatus; // invert status; 1 -> 0, 0 -> 1