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
|