29.12.2010, 05:21
As the title says, I'm in the process of making a fuel system but fuel for some of the cars is being set to 0 on startup, and some are being set to -1. I think I have done everything correctly (code below) and I cant figure out whats wrong.
Like I said, the first car I get into after restarting the server says fuel is 0. It was a late-night addition to the script, so if I'm being a dunce and missing something let me know (kindly please )
pawn Код:
new Fuel[MAX_VEHICLES];
//GamemodeInit
for(new i=0;i<MAX_VEHICLES;i++)
{
Fuel[i] = 100;
}
//OnPlayerEnterVehicle
format(infostr, sizeof(infostr), "[Owner: %s]-[VIN: LVDMV-%i]-[Fuel: %i]", CarInfo[vehicleid][cOwner], vehicleid, CarInfo[vehicleid][cHouseid],Fuel[vehicleid]);
SendClientMessage(playerid, COLOR_LIGHTBLUE, infostr);