Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2015
303
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.02 KB | None | 0 0
  1. #include <a_samp>
  2. #define FILTERSCRIPT
  3.  
  4. new Text:Time, Text:Date;
  5.  
  6. forward settime(playerid);
  7.  
  8. public OnFilterScriptInit()
  9. {
  10. print("\n--------------------------------------");
  11. print(" Updated Version! WORLDCLOCK+DATE By Shadow");
  12. print("--------------------------------------\n");
  13.  
  14. SetTimer("settime",1000,true);
  15.  
  16. Date = TextDrawCreate(554.450000, 7.543334, "--");
  17. TextDrawLetterSize(Date, 0.334374, 1.640833);
  18. TextDrawAlignment(Date, 1);
  19. TextDrawColor(Date, -1);
  20. TextDrawSetShadow(Date, 0);
  21. TextDrawSetOutline(Date, 1);
  22. TextDrawBackgroundColor(Date, 255);
  23. TextDrawFont(Date, 3);
  24. TextDrawSetProportional(Date, 1);
  25.  
  26. Time = TextDrawCreate(546.250000, 20.416614, "--");
  27. TextDrawLetterSize(Time, 0.518122, 2.387495);
  28. TextDrawAlignment(Time, 1);
  29. TextDrawColor(Time, -1);
  30. TextDrawSetShadow(Time, 0);
  31. TextDrawSetOutline(Time, 1);
  32. TextDrawBackgroundColor(Time, 255);
  33. TextDrawFont(Time, 3);
  34. TextDrawSetProportional(Time, 1);
  35. return 1;
  36. }
  37.  
  38. public OnFilterScriptExit()
  39. {
  40. print("\n-----------------------------------------------------");
  41. print(" Update Version! WORLDCLOCK+DATE By Shadow !UNLOADED!");
  42. print("-----------------------------------------------------/n");
  43. return 1;
  44. }
  45.  
  46. public OnPlayerSpawn(playerid)
  47. {
  48. SendClientMessage(playerid, 0xF97804FF, "");
  49. TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
  50.  
  51.  
  52. return 1;
  53. }
  54.  
  55. public OnPlayerDisconnect(playerid, reason)
  56. {
  57. TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
  58. return 1;
  59. }
  60.  
  61. public settime(playerid)
  62. {
  63. new string[256],year,month,day,hours,minutes,seconds;
  64. getdate(year, month, day), gettime(hours, minutes, seconds);
  65. format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  66. TextDrawSetString(Date, string);
  67. format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  68. TextDrawSetString(Time, string);
  69. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement