[Help]Why the progressbar does not restart? - 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: [Help]Why the progressbar does not restart? (
/showthread.php?tid=576107)
[Help]Why the progressbar does not restart? -
Okrs - 01.06.2015
Hi all i have a problem progressbar does not restart
check video
https://www.youtube.com/watch?v=Ni217yuXDPE
thanks
Re: [Help]Why the progressbar does not restart? -
Gammix - 01.06.2015
Whenever you stop the flashing the zone (
GangZoneStopFlashForAll), use
SetProgressBarValue and set it to 0.0.
And if you are using a var for setting the progress bar's value, set it as well to 30 or the number of seconds you require (only if you are using an inverse time scheme).
Respuesta: Re: [Help]Why the progressbar does not restart? -
Okrs - 01.06.2015
Quote:
Originally Posted by Gammix
Whenever you stop the flashing the zone (GangZoneStopFlashForAll), use SetProgressBarValue and set it to 0.0.
And if you are using a var for setting the progress bar's value, set it as well to 30 or the number of seconds you require (only if you are using an inverse time scheme).
|
thanks for answering, but I already did not work
Re: [Help]Why the progressbar does not restart? -
Pottus - 01.06.2015
You didn't even post any code at all how are we to even begin to figure out the problem?
Respuesta: Re: [Help]Why the progressbar does not restart? -
Okrs - 01.06.2015
Quote:
Originally Posted by Pottus
You didn't even post any code at all how are we to even begin to figure out the problem?
|
stock LeavingSnakeFarm(playerid)
{
Captured[playerid][SNAKE] = 1;
UnderAttack[SNAKE] = 0;
KillTimer(timer[playerid][SNAKE]);
TextDrawHideForPlayer(playerid, CountText[playerid]);
HideProgressBarForPlayer(playerid,captureprogress[playerid]);
CountVar[playerid][SNAKE] = 25;
GangZoneStopFlashForAll(Zone[SNAKE]);
SetProgressBarValue(captureprogress[playerid],0);
for(new i = 0; i < MAX_PLAYERS; i++)
{
IsPlayerCapturing[i][SNAKE] = 0;
}
SendClientMessage(playerid, red,"*You have been failed to capture this zone!");
return 1;
}