SA-MP Forums Archive
Problems With Timer - 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: Problems With Timer (/showthread.php?tid=537475)



Problems With Timer - FisherMan - 15.09.2014

Hello, Every One
i Have Problems Today Timer Showing only its Stop in 10Sec not 9sec 8sec..... to out from jail please help
Quote:

new PlayerSeconds[MAX_PLAYERS] = 10;

PHP код:
new string[24];
format(string,sizeof(string),"00:%d",PlayerSeconds[playerid]);
TextDrawSetString(JailTimer3,string); 
this for textdraw defnce
Quote:

new Text:JailTimer3;

this textdraw
PHP код:
    JailTimer3 TextDrawCreate(554.000000376.000000"00:00");
    
TextDrawBackgroundColor(JailTimer3255);
    
TextDrawFont(JailTimer31);
    
TextDrawLetterSize(JailTimer30.3200001.000000);
    
TextDrawColor(JailTimer310027263);
    
TextDrawSetOutline(JailTimer30);
    
TextDrawSetProportional(JailTimer31);
    
TextDrawSetShadow(JailTimer31); 
why its Counting Descending !
Please Help +Rep


Re: Problems With Timer - FisherMan - 15.09.2014

this my code
PHP код:
forward Unjail(playerid);
public 
Unjail(playerid)
{
new 
string[24];
format(string,sizeof(string),"00:%d",PlayerSeconds[playerid]);
TextDrawSetString(JailTimer3,string);
SetPlayerPos(playerid,-1753.6743,885.2703,295.8750);
return 
1;

this in command arrest its showing textdraw and timer
its showing textdraw and Timer
Quote:

TextDrawShowForPlayer(playerid, JailTimer0);
TextDrawShowForPlayer(playerid, JailTimer1);
TextDrawShowForPlayer(playerid, JailTimer2);
TextDrawShowForPlayer(playerid, JailTimer3);
TextDrawShowForPlayer(playerid, JailTimer4);
SetTimerEx("Unjail", 60000, 1, "i", playerid);// 1 second = 1000(milliseconds)

Thanks, For Reply


Re: Problems With Timer - FisherMan - 15.09.2014

Help Please


Re: Problems With Timer - MikeEd - 15.09.2014

You need to keep updating the textdraw in order for it to show the countdown, take a look at other countdown scripts and get something from there, instead of asking for help everytime... try using the search function and actually learn something


Re: Problems With Timer - FisherMan - 15.09.2014

Quote:
Originally Posted by MikeEd
Посмотреть сообщение
You need to keep updating the textdraw in order for it to show the countdown, take a look at other countdown scripts and get something from there, instead of asking for help everytime... try using the search function and actually learn something
today i try searching this tut timer showing + timer down
and i search today much cant get somthings new
to i try in script help Here


Re: Problems With Timer - FisherMan - 16.09.2014

Help Please


Re: Problems With Timer - FisherMan - 16.09.2014

Help Please !


Re: Problems With Timer - davve95 - 16.09.2014

You have forgotten to call the function you have to use SetTimerEx or SetTimer somewhere.

https://sampwiki.blast.hk/wiki/SetTimer


Re: Problems With Timer - MikeEd - 16.09.2014

He does have a timer function but he wajts to make the timer visible.


Re: Problems With Timer - davve95 - 16.09.2014

Yeah... Oh I missed that.