public IsAtGasStation(){
new s[64];
new tanke1 = dini_Int("tankestellen.ini","tanke1");
new tanke2 = dini_Int("tankestellen.ini","tanke2");
new tanke3 = dini_Int("tankestellen.ini","tanke3");
new tanke4 = dini_Int("tankestellen.ini","tanke4");
new tanke5 = dini_Int("tankestellen.ini","tanke5");
new tanke6 = dini_Int("tankestellen.ini","tanke6");
new tanke7 = dini_Int("tankestellen.ini","tanke7");
new tanke8 = dini_Int("tankestellen.ini","tanke8");
new tanke9 = dini_Int("tankestellen.ini","tanke9");
new tanke10 = dini_Int("tankestellen.ini","tanke10");
new tanke11 = dini_Int("tankestellen.ini","tanke11");
new tanke12 = dini_Int("tankestellen.ini","tanke12");
new tanke13 = dini_Int("tankestellen.ini","tanke13");
new tanke14 = dini_Int("tankestellen.ini","tanke14");
new tanke15 = dini_Int("tankestellen.ini","tanke15");
for (new i = 0; i < MAX_PLAYERS; i++) {
if (IsPlayerConnectet(i)){
if(PlayerToPoint(6.0,i,1004.0070,-939.3102,42.1797) || PlayerToPoint(6.0,i,1944.3260,-1772.9254,13.3906))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke1); SendClientMessage(i, Gelb, s);}
tanke[i] = 1;
return 1;
}
if(PlayerToPoint(6.0,i,-90.5515,-1169.4578,2.4079) || PlayerToPoint(6.0,i,-1609.7958,-2718.2048,48.5391))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke2); SendClientMessage(i, Gelb, s);}
tanke[i] = 2;
return 1;
}
if(PlayerToPoint(6.0,i,-2029.4968,156.4366,28.9498) || PlayerToPoint(8.0,i,-2408.7590,976.0934,45.4175))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke3); SendClientMessage(i, Gelb, s);}
tanke[i] = 3;
return 1;
}
if(PlayerToPoint(5.0,i,-2243.9629,-2560.6477,31.8841) || PlayerToPoint(8.0,i,-1676.6323,414.0262,6.9484))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke4); SendClientMessage(i, Gelb, s);}
tanke[i] = 4;
return 1;
}
if(PlayerToPoint(6.0,i,2202.2349,2474.3494,10.5258) || PlayerToPoint(10.0,i,614.9333,1689.7418,6.6968))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke5); SendClientMessage(i, Gelb, s);}
tanke[i] = 5;
return 1;
}
if(PlayerToPoint(8.0,i,-1328.8250,2677.2173,49.7665) || PlayerToPoint(6.0,i,70.3882,1218.6783,18.5165))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke6); SendClientMessage(i, Gelb, s);}
tanke[i] = 6;
return 1;
}
if(PlayerToPoint(8.0,i,2113.7390,920.1079,10.5255) || PlayerToPoint(6.0,i,-1327.7218,2678.8723,50.0625))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke7); SendClientMessage(i, Gelb, s);}
tanke[i] = 7;
return 1;
}
if(PlayerToPoint(4.0,i,1384.1835,458.6567,20.3452) || PlayerToPoint(4.0,i,1379.8971,460.5700,20.3452))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke8); SendClientMessage(i, Gelb, s);}
tanke[i] = 8;
return 1;
}
if(PlayerToPoint(6.0,i,-1471.3179,1860.1477,32.6398) || PlayerToPoint(6.0,i,-1471.7250,1867.6514,32.6328))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke9); SendClientMessage(i, Gelb, s);}
tanke[i] = 9;
return 1;
}
if(PlayerToPoint(6.0,i,-2639.2373,1335.9701,7.3967) || PlayerToPoint(6.0,i,-2633.6821,1336.2372,7.3967))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke10); SendClientMessage(i, Gelb, s);}
tanke[i] = 10;
return 1;
}
if(PlayerToPoint(6.0,i,-2639.2373,1335.9701,7.3967) || PlayerToPoint(6.0,i,-2633.6821,1336.2372,7.3967))
{
IsAtGas[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke11); SendClientMessage(i, Gelb, s);}
tanke[i] = 11;
return 1;
}
if(PlayerToPoint(25.0,i,1334.8014,1295.2693,11.5436))
{//LS Air
IsAtAir[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke12); SendClientMessage(i, Gelb, s);}
tanke[i] = 12;
return 1;
}
if(PlayerToPoint(25.0,i,1956.8160,-2321.1079,14.2726))
{//VM Air
IsAtAir[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke13); SendClientMessage(i, Gelb, s);}
tanke[i] = 13;
return 1;
}
if(PlayerToPoint(25.0,i,365.3143,2537.6646,17.5755))
{//LV Air
IsAtAir[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke14); SendClientMessage(i, Gelb, s);}
tanke[i] = 14;
return 1;
}
if(PlayerToPoint(25.0,i,-1174.7327,-162.0967,14.6064))
{//SF Air
IsAtAir[i] = true; if (send[i]){ send[i] = false;format(s,sizeof(s),"In der Tankstelle sind noch %d Lieter Treibstoff!",tanke15); SendClientMessage(i, Gelb, s);}
tanke[i] = 15;
return 1;
}
IsAtAir[i] = false;
IsAtGas[i] = false;
send[i] = true;
tanke[i] = 0;
}}
return 1;
}
dcmd_betanken(playerid,params[]){
#pragma unused params
new s[128];
new kosten;
if(IsAtGas[playerid]){
if (IsPlayerInAnyVehicle(playerid)){
new id = GetPlayerVehicleID(playerid);
format(s,sizeof(s),"tanke%d",tanke[playerid]);
kosten = 1000-(dini_Int("tankestellen.ini",s));
new trailer = GetVehicleTrailer(id);
if (benzin[trailer] >= 1000-dini_Int("tankestellen.ini",s)){
benzin[trailer] = benzin[trailer] - (1000-dini_Int("tankestellen.ini",s));
dini_IntSet("tankestellen.ini",s, 1000);
kosten = kosten*2;
GivePlayerEuro(playerid, kosten);
format(s,sizeof(s),"Du hast %d$ für das Betanken bekommen!",kosten);
SendClientMessage(playerid, Gelb, s);
}}}
if(IsAtAir[playerid]){
if (IsPlayerInAnyVehicle(playerid)){
new id = GetPlayerVehicleID(playerid);
format(s,sizeof(s),"tanke%d",tanke[playerid]);
kosten = 10000-(dini_Int("tankestellen.ini",s));
new trailer = GetVehicleTrailer(id);
if (benzin[trailer] >= 10000-dini_Int("tankestellen.ini",s)){
benzin[trailer] = benzin[trailer] - (10000-dini_Int("tankestellen.ini",s));
dini_IntSet("tankestellen.ini",s, 10000);
kosten = kosten*1;
GivePlayerEuro(playerid, kosten);
format(s,sizeof(s),"Du hast %d$ für das Betanken bekommen!",kosten);
SendClientMessage(playerid, Gelb, s);
}}}
return 1;
}
Ich bin ständig der einzige der die Tankstellen betanken kann bei den Anderen passiert einfach Nix!
Würde mcih über hilfe freuen ich weiß nicht mehr was ich tun kann xD