False filter script - org update.
#1

Hello,can anybody take a look in this code and tell me what could be wrong? My sever is not loading this script,so I can't save organizations.

PHP код:
#include <a_samp>
#include <Dini>
#include <utils>
#include <vehicles>
#define gates 10
#define sapd 1
#define agency 2
#define army 8
new gateids[gates][2];
new 
gateopen[gates];
new 
gatetype[18];
new 
s1s2;
//new p1;
new v1v2v3v4v5v6v7v8;
new 
gtimer;
forward org_gatesF();
public 
OnFilterScriptInit()
{
    
gateids[0][0] = CreateObject(2927215.9411874.57113.9030.00.00.0); // army
    
gateids[0][1] = army;
    
gateids[1][0] = CreateObject(2929211.8421874.57113.9030.00.00.0); // army
    
gateids[1][1] = army;
    
gateids[2][0] = CreateObject(19313134.9121941.52221.7750.00.00.0); // army
    
gateids[2][1] = army;
    
gateids[3][0] = CreateObject(19313285.9901822.31220.0950.00.0270.0); // army
    
gateids[3][1] = army;
    
gateids[4][0] = CreateObject(2951268.661864.0597.50.00.00.0); // army
    
gateids[4][1] = army;
    
gateids[5][0] = CreateObject(30552293.832498.8044.44140.00.090.0); // sapd
    
gateids[5][1] = sapd;
    
gateids[6][0] = CreateObject(30552335.1782443.6216.97430.00.059.9993); // sapd
    
gateids[6][1] = sapd;
    
gateids[7][0] = CreateObject(9852497.40632777.070311.53130.00.090.0); // agency
    
gateids[7][1] = agency;
    
gateids[8][0] = CreateObject(9862497.40632769.109411.53130.00.090.0); // agency
    
gateids[8][1] = agency;
    
gateids[9][0] = CreateObject(30551588.503, -1637.87214.56410.00.00.0); // sapd
    
gateids[9][1] = sapd;
    new 
string[64];
    for (new 
1dini_Int("orgfiles/o/orgstats.ini""max_org"); <= di++) {
        
format(string64"orgfiles/O/ORG%d.ini"i);
        if (!
dini_Exists(string)) continue;
        
gatetype[i-1] = dini_Int(string"gatetype");
    }
    
s1 CreateObject(15002293.8172494.4512.3600.00.0270.0); // sapd
    
s2 CreateObject(15001584.140, -1637.85012.4830.00.0180.0); // sapd
//    p1 = CreatePickup(356, 19, 2545.418, -1300.735, 1031.421, 255-orgid); // orgid
    
v1 CreateVehicle2(4351062.81091298.105811.4588270.0000400);
    
v2 CreateVehicle2(4351062.81091288.105811.4403270.0000400);
    
v3 CreateVehicle2(4351062.81091278.105811.9663270.0000400);
    
v4 CreateVehicle2(4351062.81091268.105811.9642270.0000400);
    
v5 CreateVehicle2(4351062.81091258.105811.4588270.0000400);
    
v6 CreateVehicle2(4351062.81091248.105811.4403270.0000400);
    
v7 CreateVehicle2(4351062.81091238.105811.9663270.0000400);
    
v8 CreateVehicle2(4351062.81091228.105811.9642270.0000400);
    
gtimer SetTimer("org_gatesF"5001);
    return 
1;
}
public 
OnFilterScriptExit()
{
    
DestroyObject(gateids[0][0]);
    
DestroyObject(gateids[1][0]);
    
DestroyObject(gateids[2][0]);
    
DestroyObject(gateids[3][0]);
    
DestroyObject(gateids[4][0]);
    
DestroyObject(gateids[5][0]);
    
DestroyObject(gateids[6][0]);
    
DestroyObject(gateids[7][0]);
    
DestroyObject(gateids[8][0]);
    
DestroyObject(gateids[9][0]);
    
DestroyObject(s1);
    
DestroyObject(s2);
//    DestroyPickup(p1);
    
DestroyVehicle2(v1);
    
DestroyVehicle2(v2);
    
DestroyVehicle2(v3);
    
DestroyVehicle2(v4);
    
DestroyVehicle2(v5);
    
DestroyVehicle2(v6);
    
DestroyVehicle2(v7);
    
DestroyVehicle2(v8);
    
KillTimer(gtimer);
    return 
1;
}
/*
new weapslots2[] = {0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 10, 10, 10, 10, 10, 10, 8, 8, 8, 0, 0, 0, 2, 2, 2, 3, 3, 3, 4, 4, 5, 5, 4, 6, 6, 7, 7, 7, 7, 8, 12, 9, 9, 9, 11, 11, 11};
GivePlayerWeapon3(playerid, weaponid, ammo)
{
    new w, a;
    GetPlayerWeaponData(playerid, weapslots2[weaponid], w, a);
    GivePlayerWeapon(playerid, weaponid, a + ammo > 9999 && ((weapslots2[weaponid] != 2 && weapslots2[weaponid] != 6 && weapslots2[weaponid] != 7 && weapslots2[weaponid] != 8 && weapslots2[weaponid] != 9) || weaponid == w) ? 9999 - a : ammo);
}
public OnPlayerPickUpPickup(playerid, pickupid)
{
    if (pickupid == p1)
    {
        GivePlayerWeapon3(playerid, 31, 500);
    }
    return 1;
}
*/
public org_gatesF()
{
    new 
tvarFloat:z;
    for (new 
0gatesg++) {
        
tvar 0;
        
        if (
== || == || gatetype[gateids[g][1]-1] != 1) continue;
        for (new 
0PLAYERSi++) {
            if (
IsPlayerConnected(i)) {
                if (
GetPlayerState(i) == PLAYER_STATE_SPECTATING || GetPVarInt(i"playerorg") != gateids[g][1]) continue;
                
GetPlayerPos(izzz);
                if (
== 0)
                {
                    if (
IsPlayerInAreaEx(i207.9941891.140219.6051891.136217.5631875.891217.5631865.891210.2361865.954210.2361875.954) && (>= 12.141 && <= 16.641))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
StopObject(gateids[1][0]);
                            
MoveObject(gateids[g][0], 219.9411874.57113.9031.0);
                            
MoveObject(gateids[1][0], 207.8421874.57113.9031.0);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 2)
                {
                    if (
IsPlayerInAreaEx(i141.8891925.978141.8891955.978128.3291955.978128.3291925.978) && (>= 18.312 && <= 23.312))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 123.4121941.52221.7751.7);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 3)
                {
                    if (
IsPlayerInAreaEx(i270.2751827.311300.2751827.311300.2751815.416270.2751815.416) && (>= 16.648 && <= 21.648))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 285.9901832.24820.0951.7);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 4)
                {
                    if (
IsPlayerInAreaEx(i267.3211868.394270.0331868.394270.0331858.394267.3211858.394) && (>= 7.757 && <= 11.257))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 268.661864.05910.50.6);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 5)
                {
                    if (
IsPlayerInAreaEx(i2306.9762492.5992279.9762492.5992279.9762502.4042306.9762502.404) && (>= 2.273 && <= 9.613))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 2293.832498.8048.44141.0);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 6)
                {
                    if (
IsPlayerInAreaEx(i2351.2162432.9372340.6262429.0532319.3322440.4802319.3142452.3312346.7572455.847) && (>= 2.273 && <= 11.266))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 2335.1782443.62110.97431.0);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 7)
                {
                    if (
IsPlayerInAreaEx(i2482.9212780.9742512.9212780.9742512.9212765.1492482.9212765.149) && (>= 9.820 && <= 14.820))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
StopObject(gateids[8][0]);
                            
MoveObject(gateids[g][0], 2497.40632782.570311.53131.2);
                            
MoveObject(gateids[8][0], 2497.40632763.609411.53131.2);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
                else if (
== 9)
                {
                    if (
IsPlayerInAreaEx(i1584.627, -1623.7221592.439, -1623.7221592.439, -1653.7221584.627, -1653.722) && (>= 7.294 && <= 17.382))
                    {
                        if (
gateopen[g] == 0)
                        {
                            
StopObject(gateids[g][0]);
                            
MoveObject(gateids[g][0], 1595.503, -1637.87214.56411.0);
                            
gateopen[g] = 1;
                        }
                        
tvar ++;
                    }
                }
            }
        }
        if (
tvar == 0)
        {
            if (
gateopen[g] == 1)
            {
                if (
== 0)
                {
                    
StopObject(gateids[g][0]);
                    
StopObject(gateids[1][0]);
                    
MoveObject(gateids[g][0], 215.9411874.57113.9031.0);
                    
MoveObject(gateids[1][0], 211.8421874.57113.9031.0);
                }
                else if (
== 2)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 134.9121941.52221.7751.7);
                }
                else if (
== 3)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 285.9901822.31220.0951.7);
                }
                else if (
== 4)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 268.661864.0597.50.6);
                }
                else if (
== 5)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 2293.832498.8044.44141.0);
                }
                else if (
== 6)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 2335.1782443.6216.97431.0);
                }
                else if (
== 7)
                {
                    
StopObject(gateids[g][0]);
                    
StopObject(gateids[8][0]);
                    
MoveObject(gateids[g][0], 2497.40632777.070311.53131.2);
                    
MoveObject(gateids[8][0], 2497.40632769.109411.53131.2);
                }
                else if (
== 9)
                {
                    
StopObject(gateids[g][0]);
                    
MoveObject(gateids[g][0], 1588.503, -1637.87214.56411.0);
                }
                
gateopen[g] = 0;
            }
        }
    }
}
public 
OnPlayerCommandText(playeridcmdtext[])
{
    new 
string[64], temp1temp2;
    if (
strcmp(cmdtext"/gatemode"true9) == 0)
    {
        if (
strlen(cmdtext[10]) == 0)
        {
            
SendClientMessage(playerid0xFFFF00FF"Usage: /gatemode 0 = commands, 1 = automatic");
            return 
1;
        }
        
temp1 strval(cmdtext[10]);
        if (
temp1 != && temp1 != 1)
        {
            
SendClientMessage(playerid0xFFFF00FF"Usage: /gatemode 0 = commands, 1 = automatic");
            return 
1;
        }
        
GetPlayerName(playeridstring24);
        
format(string64"userfiles/%c/%s.ini"string[0] != '.' string[0] : '#'string);
        if (
dini_Int(string"orgleader") == 0)
        {
            
SendClientMessage(playerid0xFF0000FF"Error: You aren't the (co)leader of an organization.");
            return 
1;
        }
        
temp2 GetPVarInt(playerid"playerorg");
        if (
temp2 != sapd && temp2 != army && temp2 != agency)
        {
            
SendClientMessage(playerid0xFF0000FF"Your organization doesn't have a gate.");
            return 
1;
        }
        
gatetype[temp2-1] = temp1;
        
format(string64"orgfiles/O/ORG%d.ini"temp2);
        
dini_IntSet(string"gatetype"temp1);
        if (
temp1 == 0)
        {
            
SendClientMessage(playerid0xFFFFFFFF"You have changed your organizations gate mode to commands.");
        }
        else
        {
            
SendClientMessage(playerid0xFFFFFFFF"You have changed your organizations gate mode to automatic.");
        }
        return 
1;
    }
    if (
strcmp(cmdtext"/open"true) == 0)
    {
        if (
GetPlayerState(playerid) == PLAYER_STATE_NONE || GetPlayerState(playerid) == PLAYER_STATE_WASTED || GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        {
            
SendClientMessage(playerid0xFFFFFFFF"SERVER: You must spawn to use this command!");
            return 
1;
        }
        
temp1 GetPVarInt(playerid"playerorg");
        new 
Float:z;
        
GetPlayerPos(playeridzzz);
        if (
temp1 == 0)
        {
            
SendClientMessage(playerid0xFF0000FF"Error: You aren't in an organization!");
        }
        if (
temp1 == army)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid207.9941891.140219.6051891.136217.5631875.891217.5631865.891210.2361865.954210.2361875.954) && (>= 12.141 && <= 16.641))
            {
                if (
gateopen[0] == 0)
                {
                    
StopObject(gateids[0][0]);
                    
StopObject(gateids[1][0]);
                    
MoveObject(gateids[0][0], 219.9411874.57113.9031.0);
                    
MoveObject(gateids[1][0], 207.8421874.57113.9031.0);
                    
gateopen[0] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid141.8891925.978141.8891955.978128.3291955.978128.3291925.978) && (>= 18.312 && <= 23.312))
            {
                if (
gateopen[2] == 0)
                {
                    
StopObject(gateids[2][0]);
                    
MoveObject(gateids[2][0], 123.4121941.52221.7751.7);
                    
gateopen[2] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid270.2751827.311300.2751827.311300.2751815.416270.2751815.416) && (>= 16.648 && <= 21.648))
            {
                if (
gateopen[3] == 0)
                {
                    
StopObject(gateids[3][0]);
                    
MoveObject(gateids[3][0], 285.9901832.24820.0951.7);
                    
gateopen[3] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid267.3211868.394270.0331868.394270.0331858.394267.3211858.394) && (>= 7.757 && <= 11.257))
            {
                if (
gateopen[4] == 0)
                {
                    
StopObject(gateids[4][0]);
                    
MoveObject(gateids[4][0], 268.661864.05910.50.6);
                    
gateopen[4] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to open it.");
            }
        }
        else if (
temp1 == sapd)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid2306.9762492.5992279.9762492.5992279.9762502.4042306.9762502.404) && (>= 2.273 && <= 9.613))
            {
                if (
gateopen[5] == 0)
                {
                    
StopObject(gateids[5][0]);
                    
MoveObject(gateids[5][0], 2293.832498.8048.44141.0);
                    
gateopen[5] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid2351.2162432.9372340.6262429.0532319.3322440.4802319.3142452.3312346.7572455.847) && (>= 2.273 && <= 11.266))
            {
                if (
gateopen[6] == 0)
                {
                    
StopObject(gateids[6][0]);
                    
MoveObject(gateids[6][0], 2335.1782443.62110.97431.0);
                    
gateopen[6] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid1584.627, -1623.7221592.439, -1623.7221592.439, -1653.7221584.627, -1653.722) && (>= 7.294 && <= 17.382))
            {
                if (
gateopen[9] == 0)
                {
                    
StopObject(gateids[9][0]);
                    
MoveObject(gateids[9][0], 1595.503, -1637.87214.56411.0);
                    
gateopen[9] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to open it.");
            }
        }
        else if (
temp1 == agency)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid2482.9212780.9742512.9212780.9742512.9212765.1492482.9212765.149) && (>= 9.820 && <= 14.820))
            {
                if (
gateopen[7] == 0)
                {
                    
StopObject(gateids[7][0]);
                    
StopObject(gateids[8][0]);
                    
MoveObject(gateids[7][0], 2497.40632782.570311.53131.2);
                    
MoveObject(gateids[8][0], 2497.40632763.609411.53131.2);
                    
gateopen[7] = 1;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate open.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already open.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to open it.");
            }
        }
        else
        {
            
SendClientMessage(playerid0xFF0000FF"Your organization doesn't have a gate.");
        }
        return 
1;
    }
    if (
strcmp(cmdtext"/close"true) == 0)
    {
        if (
GetPlayerState(playerid) == PLAYER_STATE_NONE || GetPlayerState(playerid) == PLAYER_STATE_WASTED || GetPlayerState(playerid) == PLAYER_STATE_SPECTATING)
        {
            
SendClientMessage(playerid0xFFFFFFFF"SERVER: You must spawn to use this command!");
            return 
1;
        }
        
temp1 GetPVarInt(playerid"playerorg");
        new 
Float:z;
        
GetPlayerPos(playeridzzz);
        if (
temp1 == 0)
        {
            
SendClientMessage(playerid0xFF0000FF"Error: You aren't in an organization!");
        }
        if (
temp1 == army)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid207.9941891.140219.6051891.136217.5631875.891217.5631865.891210.2361865.954210.2361875.954) && (>= 12.141 && <= 16.641))
            {
                if (
gateopen[0] == 1)
                {
                    
StopObject(gateids[0][0]);
                    
StopObject(gateids[1][0]);
                    
MoveObject(gateids[0][0], 215.9411874.57113.9031.0);
                    
MoveObject(gateids[1][0], 211.8421874.57113.9031.0);
                    
gateopen[0] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid141.8891925.978141.8891955.978128.3291955.978128.3291925.978) && (>= 18.312 && <= 23.312))
            {
                if (
gateopen[2] == 1)
                {
                    
StopObject(gateids[2][0]);
                    
MoveObject(gateids[2][0], 134.9121941.52221.7751.7);
                    
gateopen[2] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid270.2751827.311300.2751827.311300.2751815.416270.2751815.416) && (>= 16.648 && <= 21.648))
            {
                if (
gateopen[3] == 1)
                {
                    
StopObject(gateids[3][0]);
                    
MoveObject(gateids[3][0], 285.9901822.31220.0951.7);
                    
gateopen[3] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid267.3211868.394270.0331868.394270.0331858.394267.3211858.394) && (>= 7.757 && <= 11.257))
            {
                if (
gateopen[4] == 1)
                {
                    
StopObject(gateids[4][0]);
                    
MoveObject(gateids[4][0], 268.661864.0597.50.6);
                    
gateopen[4] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to close it.");
            }
        }
        else if (
temp1 == sapd)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid2306.9762492.5992279.9762492.5992279.9762502.4042306.9762502.404) && (>= 2.273 && <= 9.613))
            {
                if (
gateopen[5] == 1)
                {
                    
StopObject(gateids[5][0]);
                    
MoveObject(gateids[5][0], 2293.832498.8044.44141.0);
                    
gateopen[5] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid2351.2162432.9372340.6262429.0532319.3322440.4802319.3142452.3312346.7572455.847) && (>= 2.273 && <= 11.266))
            {
                if (
gateopen[6] == 1)
                {
                    
StopObject(gateids[6][0]);
                    
MoveObject(gateids[6][0], 2335.1782443.6216.97431.0);
                    
gateopen[6] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else if (
IsPlayerInAreaEx(playerid1584.627, -1623.7221592.439, -1623.7221592.439, -1653.7221584.627, -1653.722) && (>= 7.294 && <= 17.382))
            {
                if (
gateopen[9] == 1)
                {
                    
StopObject(gateids[9][0]);
                    
MoveObject(gateids[9][0], 1588.503, -1637.87214.56411.0);
                    
gateopen[9] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to close it.");
            }
        }
        else if (
temp1 == agency)
        {
            if (
gatetype[temp1-1] == 1)
            {
                
SendClientMessage(playerid0xFF0000FF"Your organizations gate mode is set as automatic.");
                return 
1;
            }
            if (
IsPlayerInAreaEx(playerid2482.9212780.9742512.9212780.9742512.9212765.1492482.9212765.149) && (>= 9.820 && <= 14.820))
            {
                if (
gateopen[7] == 1)
                {
                    
StopObject(gateids[7][0]);
                    
StopObject(gateids[8][0]);
                    
MoveObject(gateids[7][0], 2497.40632777.070311.53131.2);
                    
MoveObject(gateids[8][0], 2497.40632769.109411.53131.2);
                    
gateopen[7] = 0;
                    
SendClientMessage(playerid0xFFFFFFFF"Gate closed.");
                }
                else {
                    
SendClientMessage(playerid0xFF0000FF"This gate is already closed.");
                }
            }
            else {
                
SendClientMessage(playerid0xFF0000FF"You must be at a gate to close it.");
            }
        }
        else
        {
            
SendClientMessage(playerid0xFF0000FF"Your organization doesn't have a gate.");
        }
        return 
1;
    }
    return 
0;

Reply
#2

#define FILTERSCRIPT
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)