17.03.2015, 17:40
Hello I have a fuel system where I set the fuel depend of type vehicle trucks are 100 L buses are 80 and bikes like nrg freeway are 15.0L and I sit in truck and it should set 100 L but it's set to 40 L
I defined Fuel as
so under ongamemodeinit I have
then stocks
I defined Fuel as
pawn Код:
new Float:Fuel[MAX_VEHICLES];
pawn Код:
for(new o = 0; o < MAX_VEHICLES; o++)
{
if(IsATruck(GetVehicleModel(o))) Fuel[o] = 100.00;
else if(IsABus(GetVehicleModel(o))) Fuel[o] = 80.00;
else if(IsABike(GetVehicleModel(o))) Fuel[o] = 15.00;
else Fuel[o] = 40.00;
}
pawn Код:
stock IsATruck(vehicleid)
{
switch(GetVehicleModel(vehicleid))
{
case 403,406,407,408,414,427,428,443,455,456,498,514,515,524,544,573,578,609: return 1;
}
return 0;
}
stock IsABus(id)
{
if(id == 431 || id == 437) return 1;
return 0;
}
stock IsABike(id)
{
if(id == 448 || id == 461 || id == 462 || id == 463 || id == 468 || id == 471 || id == 521 || id == 522 || id == 581 || id == 586) return 1;
return 0;
}