Advertisement
Guest User

Shadow

a guest
Apr 28th, 2009
11,156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 3.11 KB | None | 0 0
  1. /*
  2.                                                                     dddddddd
  3.    SSSSSSSSSSSSSSS hhhhhhh                                          d::::::d
  4.  SS:::::::::::::::Sh:::::h                                          d::::::d
  5. S:::::SSSSSS::::::Sh:::::h                                          d::::::d
  6. S:::::S     SSSSSSSh:::::h                                          d:::::d
  7. S:::::S             h::::h hhhhh         aaaaaaaaaaaaa      ddddddddd:::::d
  8. S:::::S             h::::hh:::::hhh      a::::::::::::a   dd::::::::::::::d
  9.  S::::SSSS          h::::::::::::::hh    aaaaaaaaa:::::a d::::::::::::::::d
  10.   SS::::::SSSSS     h:::::::hhh::::::h            a::::ad:::::::ddddd:::::d
  11.     SSS::::::::SS   h::::::h   h::::::h    aaaaaaa:::::ad::::::d    d:::::d
  12.        SSSSSS::::S  h:::::h     h:::::h  aa::::::::::::ad:::::d     d:::::d
  13.             S:::::S h:::::h     h:::::h a::::aaaa::::::ad:::::d     d:::::d
  14.             S:::::S h:::::h     h:::::ha::::a    a:::::ad:::::d     d:::::d
  15. SSSSSSS     S:::::S h:::::h     h:::::ha::::a    a:::::ad::::::ddddd::::::dd
  16. S::::::SSSSSS:::::S h:::::h     h:::::ha:::::aaaa::::::a d:::::::::::::::::d
  17. S:::::::::::::::SS  h:::::h     h:::::h a::::::::::aa:::a d:::::::::ddd::::d
  18.  SSSSSSSSSSSSSSS    hhhhhhh     hhhhhhh  aaaaaaaaaa  aaaa  ddddddddd   ddddd
  19. */
  20.  
  21.  
  22. #include <a_samp>
  23. #define FILTERSCRIPT
  24.  
  25. new Text:Time, Text:Date;
  26.  
  27. forward settime(playerid);
  28.  
  29. public OnFilterScriptInit()
  30. {
  31.     print("\n--------------------------------------");
  32.     print(" Updated Version! WORLDCLOCK+DATE By Shadow");
  33.     print("--------------------------------------\n");
  34.  
  35.     SetTimer("settime",1000,true);
  36.  
  37.     Date = TextDrawCreate(547.000000,11.000000,"--");
  38.  
  39.     TextDrawFont(Date,3);
  40.     TextDrawLetterSize(Date,0.399999,1.600000);
  41.     TextDrawColor(Date,0xffffffff);
  42.  
  43.     Time = TextDrawCreate(547.000000,28.000000,"--");
  44.  
  45.     TextDrawFont(Time,3);
  46.     TextDrawLetterSize(Time,0.399999,1.600000);
  47.     TextDrawColor(Time,0xffffffff);
  48.  
  49.  
  50.     SetTimer("settime",1000,true);
  51.     return 1;
  52. }
  53.  
  54. public OnFilterScriptExit()
  55. {
  56.     print("\n-----------------------------------------------------");
  57.     print(" Update Version! WORLDCLOCK+DATE By Shadow !UNLOADED!");
  58.     print("-----------------------------------------------------/n");
  59.     return 1;
  60. }
  61.  
  62. public OnPlayerSpawn(playerid)
  63. {
  64.     SendClientMessage(playerid, 0xF97804FF, "This server is running Shadows Worldclock+Date AddOn!");
  65.     TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
  66.    
  67.  
  68.     return 1;
  69. }
  70.  
  71. public OnPlayerDisconnect(playerid, reason)
  72. {
  73.     TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
  74.     return 1;
  75. }
  76.  
  77. public settime(playerid)
  78. {
  79.     new string[256],year,month,day,hours,minutes,seconds;
  80.     getdate(year, month, day), gettime(hours, minutes, seconds);
  81.     format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  82.     TextDrawSetString(Date, string);
  83.     format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  84.     TextDrawSetString(Time, string);
  85. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement