13.03.2015, 06:22
Look at your code, very poorly established.
Why isn't there any id's connection check. It will probabily slow down the speed.
Just a tip, you can do
to reduce the value by any amount.
After the fuel limit is smaller than 1 (< 1), why havent you set isrefuelling[i] to false? This can cause problem.
Just use this to stop the engine when the vehicle start refueling.
Refer to the link provided by CalvinC.
The string size, I think 18 is enough.
For future, use foreach for making loops life easy. And please use PlayerTextDraws for these kind of purposes.
Why isn't there any id's connection check. It will probabily slow down the speed.
pawn Код:
for(new i; i < MAX_PLAYERS; i++)
{
if(IsPlayerConnected(i))
{
}
}
pawn Код:
fuel[vid] -= 1;
After the fuel limit is smaller than 1 (< 1), why havent you set isrefuelling[i] to false? This can cause problem.
pawn Код:
isrefuelling[i] = false;
pawn Код:
SetVehicleParamsEx(vid, 0, 0, 0, 0, 0, 0, 0);
The string size, I think 18 is enough.
pawn Код:
new string[18];