public Timer3()
{
new lstanke=0,lsbank=0,drogendoor=0,drogengate=0;;
for(new i = 0; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
if(IsPlayerInRangeOfPoint(i,2.0,1928.8702,-1775.9166,13.5469)) //LS TANKE NÄHE DISCO öffnen
{
lstanke=1;
}
if(IsPlayerInRangeOfPoint(i,2.0,928.8665,-1535.9529,13.5415)) //BANK LS Türen
{
lsbank=1;
}
if(IsPlayerInRangeOfPoint(i,10.0,-2162.9109,-225.1411,36.5156)) //Mission Drogen Tür
{
drogendoor=1;
}
if(IsPlayerInRangeOfPoint(i,10.0,-2127.0476,-80.1230,35.3136)) //Mission Drogen Tor
{
drogengate=1;
}
}
}
//abfragen ob 1 spieler in der nähe war
if(drogengate==1)
{
if(DrogenTorr == 0)
{
MoveDynamicObject(DrogenTor1, -2127.48657+10, -80.52002, 37.05427, 1);
DrogenTorr = 1;
}
}
else
{
if(DrogenTorr == 1)
{
MoveDynamicObject(DrogenTor1, -2127.48657, -80.52002, 37.05427, 1);
DrogenTorr = 0;
}
}
if(drogendoor==1)
{
if(DrogenTTuerVar == 0)
{
MoveDynamicObject(DrogenTuer1, -2163.69458+1, -225.57455, 35.51548, 1);
DrogenTTuerVar = 1;
}
}
else
{
if(DrogenTTuerVar == 1)
{
MoveDynamicObject(DrogenTuer1, -2163.69458, -225.57455, 35.51548, 1);
DrogenTTuerVar = 0;
}
}
if(lsbank==1)
{
if(BankTuerVar == 0)
{
MoveDynamicObject(Banktuer1, 929.29138, -1534.40234+1, 12.56830, 1);
MoveDynamicObject(Banktuer2, 929.26746, -1535.88208-1, 12.56830, 1);
BankTuerVar = 1;
}
}
else
{
if(BankTuerVar == 1)
{
MoveDynamicObject(Banktuer1, 929.29138, -1534.40234, 12.56830, 1);
MoveDynamicObject(Banktuer2, 929.26746, -1535.88208, 12.56830, 1);
BankTuerVar = 0;
}
}
if(lstanke==1)
{
if(TankTuerVar == 0)
{
MoveDynamicObject(Tanketuer1, 1928.46899, -1777.35461-1, 12.54500, 1);
MoveDynamicObject(Tanketuer2, 1928.47900, -1775.87427+1, 12.54500, 1);
TankTuerVar = 1;
}
}
else
{
if(TankTuerVar == 1)
{
MoveDynamicObject(Tanketuer1, 1928.46899, -1777.35461, 12.54500, 1);
MoveDynamicObject(Tanketuer2, 1928.47900, -1775.87427, 12.54500, 1);
TankTuerVar = 0;
}
}
return 1;
}