Progress Bar problem - 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: Progress Bar problem (
/showthread.php?tid=611664)
Progress Bar problem -
DavidGravelli - 09.07.2016
Hi guys today i add new progress bar and its showed on the server but when i /sethp 0 50 the health still full i try 0 health still full 100.
Im begginer on progress bar
Please guys help me!
+ Rep
pawn Code:
new Bar:health = CreateProgressBar(542.00, 379.00, 55.50, 10.20, -16776961, 100.0);
SetProgressBarValue(health, 50.0);
ShowProgressBarForAll(health);
Re: Progress Bar problem -
DavidGravelli - 09.07.2016
Anyone help me?
PLS!
Re: Progress Bar problem -
Sjn - 09.07.2016
I'm wondering, why do you even need it for player's health when GTA itself has it.
Re: Progress Bar problem -
DavidGravelli - 09.07.2016
I dont like the old one
Can you help me or no?
Re: Progress Bar problem -
Sjn - 09.07.2016
Well, you probably didn't update the prograssbar's value with the player's health.
A timer would be needed to keep updating the bar value depending on player's health.
Example;
Code:
new Float: health;
GetPlayerHealth(playerid, health);
SetProgressBarValue(barid, health);
And btw, try not to create a bar id with "health" name, you may create another variable calling it "health" in the future. It will give you an error.
Re: Progress Bar problem -
DavidGravelli - 09.07.2016
Not work