SA-MP Forums Archive
[Dr.Lozer] Problem with Vehicle Health Bar - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [Dr.Lozer] Problem with Vehicle Health Bar (/showthread.php?tid=386858)



[Dr.Lozer] Problem with Vehicle Health Bar - dr.lozer - 22.10.2012

Guyz i need help with vehicle health bar,,, it dont increase and decrease

I use ProgressBar.inc

i Use like this:

Код:
public OnGameModeInit()
{
       SetTimer("VehicleHealthBarUpdate",500,true);
       return 1;
}

forward VehicleHealthBarUpdate();
public VehicleHealthBarUpdate()
{
       for(new i=0;i<MAX_PLAYERS;i++) if(IsPlayerConnected(i) && IsPlayerInAnyVehicle(i)) {
               new Float:health; GetVehicleHealth(i,health);
               SetProgressBarValue(Barid1,health); //Value must be Float
               ProgressBarUpdate(Barid1);
       }
}



Re: [Dr.Lozer] Problem with Vehicle Health Bar - dr.lozer - 22.10.2012

anyone?