06.12.2010, 17:22
Note:This is a part of GodFather RPG.
I've been working on a fuel script, editing one of GF. But, for some reason, if the vehicle isn't moving, it will fillup the fuel..
This is the code I use to decrease the fuel:
OnGameModeInit
DecreaseGas:
I don't get it, I've been looking for something to add a value to the gas, but the only thing was if you fillup. I hope you can help me fix this problem. Thank you.
I've been working on a fuel script, editing one of GF. But, for some reason, if the vehicle isn't moving, it will fillup the fuel..
This is the code I use to decrease the fuel:
OnGameModeInit
pawn Код:
SetTimer("DecreaseGas", 20000, 1);
pawn Код:
public DecreaseGas()
{
for(new i = i;i < MAX_PLAYERS; i++)
{
new vehicle = GetPlayerVehicleID(i);
Gas[vehicle]--;
}
return 1;
}