icy-leather-77518
05/09/2023, 6:01 PMc
if(IsPlayerInVehicle(p, i) && GetPlayerState(p) == PLAYER_STATE_DRIVER)
{
SetPlayerProgressBarValue(p, FuelBar[p], VehFuel[i]);
if(VehFuel[i] < 10) {
SetPlayerProgressBarColour(p, FuelBar[p], COLOUR_REALRED);
}
}
This is the code where the progress bar is updating in vehicleUpdate
.
https://cdn.discordapp.com/attachments/1105555128741802114/1105555128951525436/image.png▾
worried-agency-16582
05/11/2023, 11:58 AMicy-leather-77518
05/11/2023, 12:48 PMVehicleUpdate()
which is called in OneSecTimer
(a timer that executes every 60 seconds).flat-egg-44689
05/11/2023, 12:51 PM