31.08.2018, 01:52
I got this code from an old help thread. Credits to @Jeffry
At top of your script.
OnFilterScriptInit/OnGameModeInit (The textdraw used here is just a example)
OnPlayerConnect
On Bottom of your script
Good Luck. Hope you understand.
At top of your script.
Код:
new Time, TimeM, TimeS; new Text:Textdraw0;
Код:
Textdraw0 = TextDrawCreate(17.000000, 429.000000, "20:00"); TextDrawBackgroundColor(Textdraw0, 65535); TextDrawFont(Textdraw0, 1); TextDrawLetterSize(Textdraw0, 0.500000, 1.000000); TextDrawColor(Textdraw0, 16777215); TextDrawSetOutline(Textdraw0, 1); TextDrawSetProportional(Textdraw0, 1); TimeM = 20; TimeS = 0; Time = SetTimer("UpdateTime", 1000, true);
Код:
TextDrawShowForPlayer(playerid, Textdraw0);
Код:
forward UpdateTime(); public UpdateTime() { new Str[34]; TimeS --; if(TimeM == 0 && TimeS == 0) { KillTimer(Time); } if(TimeS == -1) { TimeM--; TimeS = 59; } format(Str, sizeof(Str), "%02d:%02d", TimeM, TimeS); TextDrawSetString(Textdraw0, Str); return 1; }