03.03.2010, 20:25
this is the script and i dont get why only the first gate works. it is in my gamemode i just took this out. please help. thanks, roney
top of script
gamemodeinit
and bottom of script
top of script
Код:
new BrandonGate1; new BrandonGate2; new BrandonGate3; new BrandonGate4; new PDgate1; new PDgate2; new PDgate3; new Taxigate1; new Towinggate1; new Towinggate2; new TJGate1; new TJGate2;
Код:
SetTimer("GateCheck", 10000, true);
BrandonGate1 = CreateObject(976, 1531.7248535156, 96.339019775391, 28.631565093994, 0, 0, 25.804992675781);
BrandonGate2 = CreateObject(976, 1523.5676269531, 91.944145202637, 28.678056716919, 0, 0, 208.42144775391);
BrandonGate3 = CreateObject(976, 1252.5788574219, -130.70222473145, 37.836006164551, 0, 0, 39.695556640625);
BrandonGate4 = CreateObject(976, 1237.8081054688, -141.1130065918, 38.342315673828, 0, 0, 215.08483886719);
PDgate1 = CreateObject(976, 2263.0876464844, 2032.1735839844, 9.8203134536743, 0, 0, 178.65002441406);
PDgate2 = CreateObject(976, 2237.6069335938, 2441.4313964844, 9.8203125, 0, 0, 89.324340820313);
PDgate3 = CreateObject(976, 2294.130859375, 2485.90234375, 2.2734375, 0, 0, 90.038452148438);
Taxigate1 = CreateObject(976, 2337.1928710938, 2447.3522949219, 4.7659778594971, 0, 0, 240.5849609375);
Towinggate1 = CreateObject(976, 1652.2125244141, 2183.2678222656, 9.8203125, 0, 0, 180.63500976563);
Towinggate2 = CreateObject(976, 1673.3143310547, 2183.1923828125, 9.8203125, 0, 0, 178.64672851563);
TJGate1 = CreateObject(980, -857.79827880859, 2718.4362792969, 47.378620147705, 0, 0, 0);
TJGate2 = CreateObject(980, -777.48095703125, 2719.4252929688, 47.077548980713, 0.000000, 0.000000, 358.01501464844);
Код:
public GateCheck()
//=====
{
new P1;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P1=1;
if(P1)MoveObject(BrandonGate1,1531.7248535156, 96.339019775391, 28.631565093994, 10);
else MoveObject(BrandonGate1, 1539.6807861328, 100.17198181152, 28.559942245483, 10);
//=====
new P2;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P2=1;
if(P2)MoveObject(BrandonGate2,1531.466796875, 96.212890625, 28.633253097534, 10);
else MoveObject(BrandonGate2, 1523.5676269531, 91.944145202637, 28.678056716919, 10);
//=====
new P3;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P3=1;
if(P3)MoveObject(BrandonGate3, 1252.5788574219, -130.70222473145, 37.836006164551, 10);
else MoveObject(BrandonGate3, 1245.2705078125, -135.91334533691, 38.092147827148, 10);
//=====
new P4;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P4=1;
if(P4)MoveObject(BrandonGate4, 1237.8081054688, -141.1130065918, 38.342315673828, 10);
else MoveObject(BrandonGate4, 1245.0528564453, -136.07391357422, 38.099903106689, 10);
//=====
new P5;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P5=1;
if(P5)MoveObject(PDgate1, 2254.3012695313, 2032.2301025391, 9.8203125, 10);
else MoveObject(PDgate1, 2263.0876464844, 2032.1735839844, 9.8203134536743, 10);
//=====
new P6;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P6=1;
if(P6)MoveObject(PDgate2, 2237.6069335938, 2441.4313964844, 9.8203125, 10);
else MoveObject(PDgate2, 2237.6408691406, 2449.15234375, 9.7435493469238, 10);
//=====
new P7;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P7=1;
if(P7)MoveObject(PDgate3, 2294.130859375, 2485.90234375, 2.2734375, 10);
else MoveObject(PDgate3, 2294.1235351563, 2494.9609375, 2.2734375, 10);
//=====
new P8;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P8=1;
if(P8)MoveObject(Taxigate1, 2333.3591308594, 2440.4978027344, 4.7659778594971, 10);
else MoveObject(Taxigate1, 2337.1928710938, 2447.3522949219, 4.7659778594971, 10);
//=====
new P9;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P9=1;
if(P9)MoveObject(Towinggate1, 1643.3939208984, 2183.2575683594, 9.8203125, 10);
else MoveObject(Towinggate1, 1652.2125244141, 2183.2678222656, 9.8203125, 10);
//=====
new P10;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P10=1;
if(P10)MoveObject(Towinggate2, 1664.4056396484, 2183.4091796875, 9.8203125, 10);
else MoveObject(Towinggate2, 1673.3143310547, 2183.1923828125, 9.8203125, 10);
//=====
new P11;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P11=1;
if(P11)MoveObject(TJGate1, -857.79827880859, 2718.4362792969, 47.378620147705, 10);
else MoveObject(TJGate1, -847.72131347656, 2718.333984375, 47.378620147705, 10);
//=====
new P12;
for(new i = 0; i < MAX_PLAYERS; i ++)
if(IsPlayerInRangeOfPoint(i, 4, 1530.947265625, 96.14453125, 28.636119842529)) P12=1;
if(P12)MoveObject(TJGate2, -768.89404296875, 2719.1362304688, 47.077548980713, 10);
else MoveObject(TJGate2, -777.48095703125, 2719.4252929688, 47.077548980713, 10);
}

