False filter script - org update. -
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 s1, s2;
//new p1;
new v1, v2, v3, v4, v5, v6, v7, v8;
new gtimer;
forward org_gatesF();
public OnFilterScriptInit()
{
gateids[0][0] = CreateObject(2927, 215.941, 1874.571, 13.903, 0.0, 0.0, 0.0); // army
gateids[0][1] = army;
gateids[1][0] = CreateObject(2929, 211.842, 1874.571, 13.903, 0.0, 0.0, 0.0); // army
gateids[1][1] = army;
gateids[2][0] = CreateObject(19313, 134.912, 1941.522, 21.775, 0.0, 0.0, 0.0); // army
gateids[2][1] = army;
gateids[3][0] = CreateObject(19313, 285.990, 1822.312, 20.095, 0.0, 0.0, 270.0); // army
gateids[3][1] = army;
gateids[4][0] = CreateObject(2951, 268.66, 1864.059, 7.5, 0.0, 0.0, 0.0); // army
gateids[4][1] = army;
gateids[5][0] = CreateObject(3055, 2293.83, 2498.804, 4.4414, 0.0, 0.0, 90.0); // sapd
gateids[5][1] = sapd;
gateids[6][0] = CreateObject(3055, 2335.178, 2443.621, 6.9743, 0.0, 0.0, 59.9993); // sapd
gateids[6][1] = sapd;
gateids[7][0] = CreateObject(985, 2497.4063, 2777.0703, 11.5313, 0.0, 0.0, 90.0); // agency
gateids[7][1] = agency;
gateids[8][0] = CreateObject(986, 2497.4063, 2769.1094, 11.5313, 0.0, 0.0, 90.0); // agency
gateids[8][1] = agency;
gateids[9][0] = CreateObject(3055, 1588.503, -1637.872, 14.5641, 0.0, 0.0, 0.0); // sapd
gateids[9][1] = sapd;
new string[64];
for (new i = 1, d = dini_Int("orgfiles/o/orgstats.ini", "max_org"); i <= d; i++) {
format(string, 64, "orgfiles/O/ORG%d.ini", i);
if (!dini_Exists(string)) continue;
gatetype[i-1] = dini_Int(string, "gatetype");
}
s1 = CreateObject(1500, 2293.817, 2494.451, 2.360, 0.0, 0.0, 270.0); // sapd
s2 = CreateObject(1500, 1584.140, -1637.850, 12.483, 0.0, 0.0, 180.0); // sapd
// p1 = CreatePickup(356, 19, 2545.418, -1300.735, 1031.421, 255-orgid); // orgid
v1 = CreateVehicle2(435, 1062.8109, 1298.1058, 11.4588, 270.0000, 400);
v2 = CreateVehicle2(435, 1062.8109, 1288.1058, 11.4403, 270.0000, 400);
v3 = CreateVehicle2(435, 1062.8109, 1278.1058, 11.9663, 270.0000, 400);
v4 = CreateVehicle2(435, 1062.8109, 1268.1058, 11.9642, 270.0000, 400);
v5 = CreateVehicle2(435, 1062.8109, 1258.1058, 11.4588, 270.0000, 400);
v6 = CreateVehicle2(435, 1062.8109, 1248.1058, 11.4403, 270.0000, 400);
v7 = CreateVehicle2(435, 1062.8109, 1238.1058, 11.9663, 270.0000, 400);
v8 = CreateVehicle2(435, 1062.8109, 1228.1058, 11.9642, 270.0000, 400);
gtimer = SetTimer("org_gatesF", 500, 1);
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 tvar, Float:z;
for (new g = 0; g < gates; g++) {
tvar = 0;
if (g == 1 || g == 8 || gatetype[gateids[g][1]-1] != 1) continue;
for (new i = 0; i < PLAYERS; i++) {
if (IsPlayerConnected(i)) {
if (GetPlayerState(i) == PLAYER_STATE_SPECTATING || GetPVarInt(i, "playerorg") != gateids[g][1]) continue;
GetPlayerPos(i, z, z, z);
if (g == 0)
{
if (IsPlayerInAreaEx(i, 207.994, 1891.140, 219.605, 1891.136, 217.563, 1875.891, 217.563, 1865.891, 210.236, 1865.954, 210.236, 1875.954) && (z >= 12.141 && z <= 16.641))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
StopObject(gateids[1][0]);
MoveObject(gateids[g][0], 219.941, 1874.571, 13.903, 1.0);
MoveObject(gateids[1][0], 207.842, 1874.571, 13.903, 1.0);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 2)
{
if (IsPlayerInAreaEx(i, 141.889, 1925.978, 141.889, 1955.978, 128.329, 1955.978, 128.329, 1925.978) && (z >= 18.312 && z <= 23.312))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 123.412, 1941.522, 21.775, 1.7);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 3)
{
if (IsPlayerInAreaEx(i, 270.275, 1827.311, 300.275, 1827.311, 300.275, 1815.416, 270.275, 1815.416) && (z >= 16.648 && z <= 21.648))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 285.990, 1832.248, 20.095, 1.7);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 4)
{
if (IsPlayerInAreaEx(i, 267.321, 1868.394, 270.033, 1868.394, 270.033, 1858.394, 267.321, 1858.394) && (z >= 7.757 && z <= 11.257))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 268.66, 1864.059, 10.5, 0.6);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 5)
{
if (IsPlayerInAreaEx(i, 2306.976, 2492.599, 2279.976, 2492.599, 2279.976, 2502.404, 2306.976, 2502.404) && (z >= 2.273 && z <= 9.613))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 2293.83, 2498.804, 8.4414, 1.0);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 6)
{
if (IsPlayerInAreaEx(i, 2351.216, 2432.937, 2340.626, 2429.053, 2319.332, 2440.480, 2319.314, 2452.331, 2346.757, 2455.847) && (z >= 2.273 && z <= 11.266))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 2335.178, 2443.621, 10.9743, 1.0);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 7)
{
if (IsPlayerInAreaEx(i, 2482.921, 2780.974, 2512.921, 2780.974, 2512.921, 2765.149, 2482.921, 2765.149) && (z >= 9.820 && z <= 14.820))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
StopObject(gateids[8][0]);
MoveObject(gateids[g][0], 2497.4063, 2782.5703, 11.5313, 1.2);
MoveObject(gateids[8][0], 2497.4063, 2763.6094, 11.5313, 1.2);
gateopen[g] = 1;
}
tvar ++;
}
}
else if (g == 9)
{
if (IsPlayerInAreaEx(i, 1584.627, -1623.722, 1592.439, -1623.722, 1592.439, -1653.722, 1584.627, -1653.722) && (z >= 7.294 && z <= 17.382))
{
if (gateopen[g] == 0)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 1595.503, -1637.872, 14.5641, 1.0);
gateopen[g] = 1;
}
tvar ++;
}
}
}
}
if (tvar == 0)
{
if (gateopen[g] == 1)
{
if (g == 0)
{
StopObject(gateids[g][0]);
StopObject(gateids[1][0]);
MoveObject(gateids[g][0], 215.941, 1874.571, 13.903, 1.0);
MoveObject(gateids[1][0], 211.842, 1874.571, 13.903, 1.0);
}
else if (g == 2)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 134.912, 1941.522, 21.775, 1.7);
}
else if (g == 3)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 285.990, 1822.312, 20.095, 1.7);
}
else if (g == 4)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 268.66, 1864.059, 7.5, 0.6);
}
else if (g == 5)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 2293.83, 2498.804, 4.4414, 1.0);
}
else if (g == 6)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 2335.178, 2443.621, 6.9743, 1.0);
}
else if (g == 7)
{
StopObject(gateids[g][0]);
StopObject(gateids[8][0]);
MoveObject(gateids[g][0], 2497.4063, 2777.0703, 11.5313, 1.2);
MoveObject(gateids[8][0], 2497.4063, 2769.1094, 11.5313, 1.2);
}
else if (g == 9)
{
StopObject(gateids[g][0]);
MoveObject(gateids[g][0], 1588.503, -1637.872, 14.5641, 1.0);
}
gateopen[g] = 0;
}
}
}
}
public OnPlayerCommandText(playerid, cmdtext[])
{
new string[64], temp1, temp2;
if (strcmp(cmdtext, "/gatemode", true, 9) == 0)
{
if (strlen(cmdtext[10]) == 0)
{
SendClientMessage(playerid, 0xFFFF00FF, "Usage: /gatemode 0 = commands, 1 = automatic");
return 1;
}
temp1 = strval(cmdtext[10]);
if (temp1 != 0 && temp1 != 1)
{
SendClientMessage(playerid, 0xFFFF00FF, "Usage: /gatemode 0 = commands, 1 = automatic");
return 1;
}
GetPlayerName(playerid, string, 24);
format(string, 64, "userfiles/%c/%s.ini", string[0] != '.' ? string[0] : '#', string);
if (dini_Int(string, "orgleader") == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "Error: You aren't the (co)leader of an organization.");
return 1;
}
temp2 = GetPVarInt(playerid, "playerorg");
if (temp2 != sapd && temp2 != army && temp2 != agency)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organization doesn't have a gate.");
return 1;
}
gatetype[temp2-1] = temp1;
format(string, 64, "orgfiles/O/ORG%d.ini", temp2);
dini_IntSet(string, "gatetype", temp1);
if (temp1 == 0)
{
SendClientMessage(playerid, 0xFFFFFFFF, "You have changed your organizations gate mode to commands.");
}
else
{
SendClientMessage(playerid, 0xFFFFFFFF, "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(playerid, 0xFFFFFFFF, "SERVER: You must spawn to use this command!");
return 1;
}
temp1 = GetPVarInt(playerid, "playerorg");
new Float:z;
GetPlayerPos(playerid, z, z, z);
if (temp1 == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "Error: You aren't in an organization!");
}
if (temp1 == army)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 207.994, 1891.140, 219.605, 1891.136, 217.563, 1875.891, 217.563, 1865.891, 210.236, 1865.954, 210.236, 1875.954) && (z >= 12.141 && z <= 16.641))
{
if (gateopen[0] == 0)
{
StopObject(gateids[0][0]);
StopObject(gateids[1][0]);
MoveObject(gateids[0][0], 219.941, 1874.571, 13.903, 1.0);
MoveObject(gateids[1][0], 207.842, 1874.571, 13.903, 1.0);
gateopen[0] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else if (IsPlayerInAreaEx(playerid, 141.889, 1925.978, 141.889, 1955.978, 128.329, 1955.978, 128.329, 1925.978) && (z >= 18.312 && z <= 23.312))
{
if (gateopen[2] == 0)
{
StopObject(gateids[2][0]);
MoveObject(gateids[2][0], 123.412, 1941.522, 21.775, 1.7);
gateopen[2] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else if (IsPlayerInAreaEx(playerid, 270.275, 1827.311, 300.275, 1827.311, 300.275, 1815.416, 270.275, 1815.416) && (z >= 16.648 && z <= 21.648))
{
if (gateopen[3] == 0)
{
StopObject(gateids[3][0]);
MoveObject(gateids[3][0], 285.990, 1832.248, 20.095, 1.7);
gateopen[3] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else if (IsPlayerInAreaEx(playerid, 267.321, 1868.394, 270.033, 1868.394, 270.033, 1858.394, 267.321, 1858.394) && (z >= 7.757 && z <= 11.257))
{
if (gateopen[4] == 0)
{
StopObject(gateids[4][0]);
MoveObject(gateids[4][0], 268.66, 1864.059, 10.5, 0.6);
gateopen[4] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to open it.");
}
}
else if (temp1 == sapd)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 2306.976, 2492.599, 2279.976, 2492.599, 2279.976, 2502.404, 2306.976, 2502.404) && (z >= 2.273 && z <= 9.613))
{
if (gateopen[5] == 0)
{
StopObject(gateids[5][0]);
MoveObject(gateids[5][0], 2293.83, 2498.804, 8.4414, 1.0);
gateopen[5] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else if (IsPlayerInAreaEx(playerid, 2351.216, 2432.937, 2340.626, 2429.053, 2319.332, 2440.480, 2319.314, 2452.331, 2346.757, 2455.847) && (z >= 2.273 && z <= 11.266))
{
if (gateopen[6] == 0)
{
StopObject(gateids[6][0]);
MoveObject(gateids[6][0], 2335.178, 2443.621, 10.9743, 1.0);
gateopen[6] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else if (IsPlayerInAreaEx(playerid, 1584.627, -1623.722, 1592.439, -1623.722, 1592.439, -1653.722, 1584.627, -1653.722) && (z >= 7.294 && z <= 17.382))
{
if (gateopen[9] == 0)
{
StopObject(gateids[9][0]);
MoveObject(gateids[9][0], 1595.503, -1637.872, 14.5641, 1.0);
gateopen[9] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to open it.");
}
}
else if (temp1 == agency)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 2482.921, 2780.974, 2512.921, 2780.974, 2512.921, 2765.149, 2482.921, 2765.149) && (z >= 9.820 && z <= 14.820))
{
if (gateopen[7] == 0)
{
StopObject(gateids[7][0]);
StopObject(gateids[8][0]);
MoveObject(gateids[7][0], 2497.4063, 2782.5703, 11.5313, 1.2);
MoveObject(gateids[8][0], 2497.4063, 2763.6094, 11.5313, 1.2);
gateopen[7] = 1;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate open.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already open.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to open it.");
}
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "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(playerid, 0xFFFFFFFF, "SERVER: You must spawn to use this command!");
return 1;
}
temp1 = GetPVarInt(playerid, "playerorg");
new Float:z;
GetPlayerPos(playerid, z, z, z);
if (temp1 == 0)
{
SendClientMessage(playerid, 0xFF0000FF, "Error: You aren't in an organization!");
}
if (temp1 == army)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 207.994, 1891.140, 219.605, 1891.136, 217.563, 1875.891, 217.563, 1865.891, 210.236, 1865.954, 210.236, 1875.954) && (z >= 12.141 && z <= 16.641))
{
if (gateopen[0] == 1)
{
StopObject(gateids[0][0]);
StopObject(gateids[1][0]);
MoveObject(gateids[0][0], 215.941, 1874.571, 13.903, 1.0);
MoveObject(gateids[1][0], 211.842, 1874.571, 13.903, 1.0);
gateopen[0] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else if (IsPlayerInAreaEx(playerid, 141.889, 1925.978, 141.889, 1955.978, 128.329, 1955.978, 128.329, 1925.978) && (z >= 18.312 && z <= 23.312))
{
if (gateopen[2] == 1)
{
StopObject(gateids[2][0]);
MoveObject(gateids[2][0], 134.912, 1941.522, 21.775, 1.7);
gateopen[2] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else if (IsPlayerInAreaEx(playerid, 270.275, 1827.311, 300.275, 1827.311, 300.275, 1815.416, 270.275, 1815.416) && (z >= 16.648 && z <= 21.648))
{
if (gateopen[3] == 1)
{
StopObject(gateids[3][0]);
MoveObject(gateids[3][0], 285.990, 1822.312, 20.095, 1.7);
gateopen[3] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else if (IsPlayerInAreaEx(playerid, 267.321, 1868.394, 270.033, 1868.394, 270.033, 1858.394, 267.321, 1858.394) && (z >= 7.757 && z <= 11.257))
{
if (gateopen[4] == 1)
{
StopObject(gateids[4][0]);
MoveObject(gateids[4][0], 268.66, 1864.059, 7.5, 0.6);
gateopen[4] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to close it.");
}
}
else if (temp1 == sapd)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 2306.976, 2492.599, 2279.976, 2492.599, 2279.976, 2502.404, 2306.976, 2502.404) && (z >= 2.273 && z <= 9.613))
{
if (gateopen[5] == 1)
{
StopObject(gateids[5][0]);
MoveObject(gateids[5][0], 2293.83, 2498.804, 4.4414, 1.0);
gateopen[5] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else if (IsPlayerInAreaEx(playerid, 2351.216, 2432.937, 2340.626, 2429.053, 2319.332, 2440.480, 2319.314, 2452.331, 2346.757, 2455.847) && (z >= 2.273 && z <= 11.266))
{
if (gateopen[6] == 1)
{
StopObject(gateids[6][0]);
MoveObject(gateids[6][0], 2335.178, 2443.621, 6.9743, 1.0);
gateopen[6] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else if (IsPlayerInAreaEx(playerid, 1584.627, -1623.722, 1592.439, -1623.722, 1592.439, -1653.722, 1584.627, -1653.722) && (z >= 7.294 && z <= 17.382))
{
if (gateopen[9] == 1)
{
StopObject(gateids[9][0]);
MoveObject(gateids[9][0], 1588.503, -1637.872, 14.5641, 1.0);
gateopen[9] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to close it.");
}
}
else if (temp1 == agency)
{
if (gatetype[temp1-1] == 1)
{
SendClientMessage(playerid, 0xFF0000FF, "Your organizations gate mode is set as automatic.");
return 1;
}
if (IsPlayerInAreaEx(playerid, 2482.921, 2780.974, 2512.921, 2780.974, 2512.921, 2765.149, 2482.921, 2765.149) && (z >= 9.820 && z <= 14.820))
{
if (gateopen[7] == 1)
{
StopObject(gateids[7][0]);
StopObject(gateids[8][0]);
MoveObject(gateids[7][0], 2497.4063, 2777.0703, 11.5313, 1.2);
MoveObject(gateids[8][0], 2497.4063, 2769.1094, 11.5313, 1.2);
gateopen[7] = 0;
SendClientMessage(playerid, 0xFFFFFFFF, "Gate closed.");
}
else {
SendClientMessage(playerid, 0xFF0000FF, "This gate is already closed.");
}
}
else {
SendClientMessage(playerid, 0xFF0000FF, "You must be at a gate to close it.");
}
}
else
{
SendClientMessage(playerid, 0xFF0000FF, "Your organization doesn't have a gate.");
}
return 1;
}
return 0;
}
Re: False filter script - org update. -