Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- [Description]
- Name: Serveri kell, serveriaja järgi
- Scripter: Andrus99, Andruz99 on SA:MP forum.
- MSN: Andrus99@hotmail.com
- Skype: Andrus99
- */
- #include <a_samp>
- // ---------- Defines ---------- //
- new Text:ServerTimeTXT;
- new ServerTime = 12;
- // ---------- Defines ---------- //
- public OnFilterScriptInit()
- {
- SetWorldTime(ServerTime);
- SetTimer("TimeCycle", 60000, true);
- ServerTimeTXT = TextDrawCreate(498.000000, 13.000000, "12:00");
- TextDrawBackgroundColor(ServerTimeTXT, 255);
- TextDrawFont(ServerTimeTXT, 1);
- TextDrawLetterSize(ServerTimeTXT, 0.440000, 1.100000);
- TextDrawColor(ServerTimeTXT, -1);
- TextDrawSetOutline(ServerTimeTXT, 1);
- TextDrawSetProportional(ServerTimeTXT, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- TextDrawDestroy(ServerTimeTXT); //Kustutab ära textdrawi
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- TextDrawShowForPlayer(playerid, ServerTimeTXT);
- return 1;
- }
- forward TimeCycle(playerid);
- public TimeCycle(playerid)
- {
- ServerTime++;
- SetWorldTime(ServerTime);
- new string[48];
- format(string, sizeof(string), "%d:00", ServerTime);
- TextDrawSetString(ServerTimeTXT,string);
- if(ServerTime == 23)//if servetime variable is at 23 it puts it the variable to 0
- {
- ServerTime = 0;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement