Ich hab keine ahnung wieso, aber Fraktions Fahrzeuge verlieren 4x so schnell tank wie private Fahrzeuge... Kann sich das jemand irgendwie erklären?
Code
Function LoseTank(vid)
{
new owner = GetPlayerIdFromName(GetPlayerCarOwner(vid));
new vehmodel = GetVehicleModel(vid);
for(new x = 0; x < MaxVeh; x++)
{
if(PlayerCar[owner][x][CarId] == vid)
{
PlayerCar[owner][x][Fuel] -= CarInfo[vehmodel-400][ci_CarGasConsume];
return 1;
}
for(new fc = 0; fc<sizeof(FactionCars); fc++)
{
if(vid == FactionCars[fc][fCarid])
{
FactionCars[fc][fFuel] -= CarInfo[vehmodel-400][ci_CarGasConsume];
}
}
}
return 1;
}
Alles anzeigen
//Edit: Fehler gefunden, hab den Code jetz so & scheint so funktionieren:
Code
Function LoseTank(vid)
{
new owner = GetPlayerIdFromName(GetPlayerCarOwner(vid));
new vehmodel = GetVehicleModel(vid);
for(new x = 0; x < MaxVeh; x++)
{
if(PlayerCar[owner][x][CarId] == vid)
{
PlayerCar[owner][x][Fuel] -= CarInfo[vehmodel-400][ci_CarGasConsume];
return 1;
}
}
for(new fc = 0; fc<sizeof(FactionCars); fc++)
{
if(vid == FactionCars[fc][fCarid])
{
FactionCars[fc][fFuel] -= CarInfo[vehmodel-400][ci_CarGasConsume];
}
}
return 1;
}
Alles anzeigen