Ich weiß nicht wieso aber die Cars auf meinem Server haben immer einen leeren Tank so siehts dann aus :
new tank = GetPlayerVehicleTypeForFill(GetPlayerVehicleID(playerid));
new price;
if(listitem == 0) //Diesel
{
if(tank == 1)
{
new Float: tankfuel;
tankfuel = spawncar_maxgas[GetPlayerVehicleID(playerid)]-spawncar_gas[GetPlayerVehicleID(playerid)];
if(SBizzInfo[gas_station][sbEntranceCost]*tankfuel < PlayerMoney[playerid])
{
GettingFuel[playerid] = tankfuel;
GettingType[playerid] = 1;
Refueling[playerid] = 1;
price = floatround(tankfuel, floatround_ceil);
GettingPrice[playerid] = SBizzInfo[gas_station][sbEntranceCost]*price;
GameTextForPlayer(playerid, "~y~Tanken!", 5000, 1);
filling[playerid] = SetTimerEx("FuelCar", price*1000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Kraftstoff nicht tanken.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(listitem == 1) //Benzin
{
if(tank == 2)
{
new Float: tankfuel;
tankfuel = spawncar_maxgas[GetPlayerVehicleID(playerid)]-spawncar_gas[GetPlayerVehicleID(playerid)];
if(SBizzInfo[gas_station][sbEntranceCost]*tankfuel < PlayerMoney[playerid])
{
GettingFuel[playerid] = tankfuel;
GettingType[playerid] = 2;
Refueling[playerid] = 1;
price = floatround(tankfuel, floatround_ceil);
GettingPrice[playerid] = SBizzInfo[gas_station][sbEntranceCost]*price;
GameTextForPlayer(playerid, "~y~Tanken!", 5000, 1);
filling[playerid] = SetTimerEx("FuelCar", price*1000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Kraftstoff nicht tanken.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(listitem == 2) //Super Plus
{
if(tank == 3)
{
new Float: tankfuel;
tankfuel = spawncar_maxgas[GetPlayerVehicleID(playerid)]-spawncar_gas[GetPlayerVehicleID(playerid)];
if(SBizzInfo[gas_station][sbEntranceCost]*tankfuel < PlayerMoney[playerid])
{
GettingFuel[playerid] = tankfuel;
GettingType[playerid] = 3;
Refueling[playerid] = 1;
price = floatround(tankfuel, floatround_ceil);
GettingPrice[playerid] = SBizzInfo[gas_station][sbEntranceCost]*price;
GameTextForPlayer(playerid, "~y~Fahrzeug wird betankt", 5000, 1);
filling[playerid] = SetTimerEx("FuelCar", price*1000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Kraftstoff nicht tanken.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(listitem == 3) //Super Benzin
{
if(tank == 4)
{
new Float: tankfuel;
tankfuel = spawncar_maxgas[GetPlayerVehicleID(playerid)]-spawncar_gas[GetPlayerVehicleID(playerid)];
if(SBizzInfo[gas_station][sbEntranceCost]*tankfuel < PlayerMoney[playerid])
{
GettingFuel[playerid] = tankfuel;
GettingType[playerid] = 4;
Refueling[playerid] = 1;
price = floatround(tankfuel, floatround_ceil);
GettingPrice[playerid] = SBizzInfo[gas_station][sbEntranceCost]*price;
GameTextForPlayer(playerid, "~y~Tanken!", 5000, 1);
filling[playerid] = SetTimerEx("FuelCar", price*1000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Kraftstoff nicht tanken.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
if(listitem == 4) //Kerosin
{
if(tank == 5)
{
new Float: tankfuel;
tankfuel = spawncar_maxgas[GetPlayerVehicleID(playerid)]-spawncar_gas[GetPlayerVehicleID(playerid)];
if(SBizzInfo[gas_station][sbEntranceCost]*tankfuel < PlayerMoney[playerid])
{
GettingFuel[playerid] = tankfuel;
GettingType[playerid] = 5;
Refueling[playerid] = 1;
price = floatround(tankfuel, floatround_ceil);
GettingPrice[playerid] = SBizzInfo[gas_station][sbEntranceCost]*price;
GameTextForPlayer(playerid, "~y~Tanken!", 5000, 1);
filling[playerid] = SetTimerEx("FuelCar", price*1000, false, "i", playerid);
return 1;
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du hast nicht genug Geld.");
TogglePlayerControllable(playerid, 1);
return 1;
}
}
else
{
SendClientMessage(playerid, COLOR_GRAD2, "Du kannst diesen Kraftstoff nicht tanken.");
TogglePlayerControllable(playerid, 1);
return 1;
}
Kann mir jemand helfen ?