Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- #define FILTERSCRIPT
- new Text:Time, Text:Date;
- forward settime(playerid);
- public OnFilterScriptInit()
- {
- print("\n--------------------------------------");
- print(" Updated Version! WORLDCLOCK+DATE By Shadow");
- print("--------------------------------------\n");
- SetTimer("settime",1000,true);
- Date = TextDrawCreate(554.450000, 7.543334, "--");
- TextDrawLetterSize(Date, 0.334374, 1.640833);
- TextDrawAlignment(Date, 1);
- TextDrawColor(Date, -1);
- TextDrawSetShadow(Date, 0);
- TextDrawSetOutline(Date, 1);
- TextDrawBackgroundColor(Date, 255);
- TextDrawFont(Date, 3);
- TextDrawSetProportional(Date, 1);
- Time = TextDrawCreate(546.250000, 20.416614, "--");
- TextDrawLetterSize(Time, 0.518122, 2.387495);
- TextDrawAlignment(Time, 1);
- TextDrawColor(Time, -1);
- TextDrawSetShadow(Time, 0);
- TextDrawSetOutline(Time, 1);
- TextDrawBackgroundColor(Time, 255);
- TextDrawFont(Time, 3);
- TextDrawSetProportional(Time, 1);
- return 1;
- }
- public OnFilterScriptExit()
- {
- print("\n-----------------------------------------------------");
- print(" Update Version! WORLDCLOCK+DATE By Shadow !UNLOADED!");
- print("-----------------------------------------------------/n");
- return 1;
- }
- public OnPlayerSpawn(playerid)
- {
- SendClientMessage(playerid, 0xF97804FF, "");
- TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
- return 1;
- }
- public OnPlayerDisconnect(playerid, reason)
- {
- TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
- return 1;
- }
- public settime(playerid)
- {
- new string[256],year,month,day,hours,minutes,seconds;
- getdate(year, month, day), gettime(hours, minutes, seconds);
- format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
- TextDrawSetString(Date, string);
- format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
- TextDrawSetString(Time, string);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement