Textdraw problem
#6

Quote:
Originally Posted by Sawalha
Посмотреть сообщение
why do you keep creating and destroying?
you can use TextDrawSetString:
pawn Код:
public OnGameModeInit()
{
     Textdraw1 = TextDrawCreate(523.000000, 436.000000, " "); // empty for now, cuz the timer will update it once the server started
     TextDrawBackgroundColor(Textdraw1, 255);
     TextDrawFont(Textdraw1, 3);
     TextDrawLetterSize(Textdraw1, 0.290000, 1.100000);
     TextDrawColor(Textdraw1, -1);
     TextDrawSetOutline(Textdraw1, 1);
     TextDrawSetProportional(Textdraw1, 1);
     TextDrawShowForPlayer(playerid, Textdraw1);
     SetTimer("Time", 1000, true); // once the server started, the timer of callback "Time" will start
     return 1;
}
pawn Код:
forward Time();
public Time()
{
    new Year,Month,Day,Hour,Minute,Second;
    getdate(Day,Month,Year);
    gettime(Hour,Minute,Second);
    format(String,sizeof(String),"%i/%i/%i ; %i:%i:%i",Day,Month,Year,Hour,Minute,Second);
    TextDrawSetString(Textdraw1, String);
    return 1;
}
you can do the same for the GP textdraw
:* ty ty ty
Reply


Messages In This Thread
Textdraw problem - by Lirbo - 05.06.2015, 18:32
Re: Textdraw problem - by Azula - 05.06.2015, 18:33
Re: Textdraw problem - by SoFahim - 06.06.2015, 06:40
Re: Textdraw problem - by Lirbo - 06.06.2015, 07:41
Re: Textdraw problem - by Sawalha - 06.06.2015, 08:12
Re: Textdraw problem - by Lirbo - 11.06.2015, 16:10

Forum Jump:


Users browsing this thread: 1 Guest(s)