24.04.2010, 13:37
Quote:
Originally Posted by Jeffry
http://forum.sa-mp.com/index.php?top...9227#msg949227
And there where KillTimer(Time) stands, just add what you want. ![]() Ask if you have any quiestions. |
And that is, see what it countdowning 1 minutes?
How do i make, it starting if i type /systemupdate.
Is that correct?:
Код:
#include <a_samp> new Time, TimeM, TimeS; new Text:Textdraw0; public OnFilterScriptInit() { print("\n--------------------------------------"); print(" Blank Filterscript by your name here"); print("--------------------------------------\n"); //------------------------------------------------------------------------------ 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); return 1; } public OnFilterScriptExit() { return 1; } public OnPlayerCommandText(playerid, cmdtext[]) { if (strcmp("/systemupdate", cmdtext, true, 10) == 0) { TextDrawShowForAll(Textdraw0); return 1; } return 0; } forward UpdateTime(); public UpdateTime() { new Str[34]; TimeS --; if(TimeM == 0 && TimeS == 0) { KillTimer(Time); } if(TimeS == -1) { TimeM--; TimeS = 59; } if(TimeS<10) { format(Str, sizeof(Str), "%d:0%d", TimeM, TimeS); } if(TimeS>9) { format(Str, sizeof(Str), "%d:%d", TimeM, TimeS); } TextDrawSetString(Textdraw0, Str); return 1; }
