Textdraw hiding and showing
#1

When i try to put other textdraw in my gamemode, this textdraw that shows the actual PENo1 in the server hide or start flashing the other textdraws i've made in the gamemode, it also moves the posotion of the other textdraws

some pics: http://imgur.com/a/68raK you can see when countdown starts, the timer stop working

even if i leave timeconvert function it does the same, please help me im getting mad at it...

Timer gets started on SetPlayerCriminal
Код:
Tempo = 360;
TimerDC = SetTimerEx("TextDrawT", 999, 1,"i",playerid);
Timer gets killed onplayerdeath or in other funcs
Код:
KillTimer(TimerDC);
TextDrawDestroy(Time);
TD Code:
Код:
TimeConvert(seconds) {
       new tmp[256];
       new minutes = floatround(seconds/60);
       seconds -= minutes*60;
       format(tmp, sizeof(tmp), "%d:%02d", minutes, seconds);
       return tmp;
}


public TextDrawT(playerid)
{
   Tempo --;
   new tmp[256], name[MAX_PLAYER_NAME];
   TextDrawDestroy(Text:Time);
   GetPlayerName(playerid, name, MAX_PLAYER_NAME);
   format(tmp, sizeof tmp, "~g~~h~PENo1: ~r~%s~n~~w~for %s minutes",name, TimeConvert(Tempo));

       Time = TextDrawCreate(86.000000, 315.000000, tmp);
       TextDrawAlignment(Text:Time, 2);
       TextDrawLetterSize(Text:Time, 0.200000, 1.000000);
       TextDrawBackgroundColor(Text:Time, 85);
       TextDrawSetOutline(Text:Time, 1);
       TextDrawFont(Text:Time, 1);
       TextDrawColor(Text:Time, -1);
       TextDrawShowForAll(Text:Time);
       TextDrawSetProportional(Text:Time, 1);

   if (Tempo == 0)
   {
   TextDrawDestroy(Time);
   KillTimer(TimerDC);
   }
   return 1;
}
Reply
#2

up, help please
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)