Textdraw timer..
#1

hello.. i have created an textdraw timer .. timer works fine .. but textdraw timer on screen does not respond ..
i want to show it like
"in 10 seconds"
"in 9 seconds"
"in 8 seconds"

etc..

here are codes

pawn Код:
new Time;
new TimeM;
new TimeS;


// filterscript int,,

Textdraw15 = TextDrawCreate(308.000000, 347.000000, "~n~~y~this box will close automatically in~n~~p~10 seconds.");
TextDrawAlignment(Textdraw15, 2);
TextDrawBackgroundColor(Textdraw15, 255);
TextDrawFont(Textdraw15, 2);
TextDrawLetterSize(Textdraw15, 0.500000, 1.000000);
TextDrawColor(Textdraw15, -1);
TextDrawSetOutline(Textdraw15, 0);
TextDrawSetProportional(Textdraw15, 1);
TextDrawSetShadow(Textdraw15, 1);
TextDrawUseBox(Textdraw15, 1);
TextDrawBoxColor(Textdraw15, 999999);
TextDrawTextSize(Textdraw15, 14.000000, 388.000000);
TextDrawSetSelectable(Textdraw15, 0);
TimeM = 0;
TimeS = 10;

// in command ..
Time = SetTimerEx("CREDITS_TIMER", 10*1000, false, "i", playerid);
//

forward CREDITS_TIMER(playerid);

public CREDITS_TIMER(playerid)
{
TextDrawHideForPlayer(playerid, Textdraw15);

new Str[34];
TimeS --;
if(TimeM == 0 && TimeS == 0)
{
KillTimer(Time);
}

TimeS = 10;

format(Str, sizeof(Str), "~n~~y~this box will close automatically in~n~~p~%02d seconds.",  TimeS);
TextDrawSetString(Textdraw15, Str);
return 1;
}
any help?
Reply


Messages In This Thread
Textdraw timer.. - by Anak - 24.03.2013, 05:19
Re: Textdraw timer.. - by Anak - 24.03.2013, 07:54
Re: Textdraw timer.. - by vitorvlv - 24.03.2013, 08:07
Re: Textdraw timer.. - by por12802 - 24.03.2013, 08:32
Re: Textdraw timer.. - by vitorvlv - 24.03.2013, 08:36
Re: Textdraw timer.. - by Anak - 24.03.2013, 14:23

Forum Jump:


Users browsing this thread: 2 Guest(s)