progress bar help?
#1

can someone please help me out and give me an example of a progress bar updating every second for 5 seconds, then destroys it self?
thanks
Reply
#2

You create a player progress bar when they connect and it will automatically destroy when they disconnect. You don't want to destroy anything rather Show/Hide. I can't find the link to the player version so here is a pastebin of the version I have currently http://pastebin.com/wajn4its not sure why it's not on the original thread (Or maybe I missed it?).

Original Thread:

https://sampforum.blast.hk/showthread.php?tid=113443
Reply
#3

no... create it when a player enters a checkpoint, waits 5 seconds while it updates until it reaches 0 then destroy it..
wouldn't it look something like this?
public onplayerentercheckpoint
{
{
ShowProgressBarForPlayer(barid, playerid);
SetProgressBarMaxValue(barid, 700);
UpdateProgessBar(barid, playerid=INVALID_PLAYER_ID);
SetTimerEx(SetTimerEx("Progbar", 5000, false, "i", playerid);
HideProgressBarForPlayer(barid, playerid);
return 1;
}
return 0;
}

just a quick example, but yes?
Reply
#4

That makes no sense did you not listen? You only need to create it once and it will automatically destroy when a player quits you only need to show/hide. Create/destroy each time is counter intuitive and makes absolutely no sense at all.

@Edit - Check the pastebin link your using the wrong include.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)