Advertisement
Guest User

Untitled

a guest
May 22nd, 2013
10,600
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 3.07 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.     return 1;
  49. }
  50.  
  51. public OnFilterScriptExit()
  52. {
  53.     print("\n-----------------------------------------------------");
  54.     print(" Update Version! WORLDCLOCK+DATE By Shadow !UNLOADED!");
  55.     print("-----------------------------------------------------/n");
  56.     return 1;
  57. }
  58.  
  59. public OnPlayerSpawn(playerid)
  60. {
  61.     SendClientMessage(playerid, 0xF97804FF, "This server is running Shadows Worldclock+Date AddOn!");
  62.     TextDrawShowForPlayer(playerid, Time), TextDrawShowForPlayer(playerid, Date);
  63.    
  64.  
  65.     return 1;
  66. }
  67.  
  68. public OnPlayerDisconnect(playerid, reason)
  69. {
  70.     TextDrawHideForPlayer(playerid, Time), TextDrawHideForPlayer(playerid, Date);
  71.     return 1;
  72. }
  73.  
  74. public settime(playerid)
  75. {
  76.     new string[256],year,month,day,hours,minutes,seconds;
  77.     getdate(year, month, day), gettime(hours, minutes, seconds);
  78.     format(string, sizeof string, "%d/%s%d/%s%d", day, ((month < 10) ? ("0") : ("")), month, (year < 10) ? ("0") : (""), year);
  79.     TextDrawSetString(Date, string);
  80.     format(string, sizeof string, "%s%d:%s%d:%s%d", (hours < 10) ? ("0") : (""), hours, (minutes < 10) ? ("0") : (""), minutes, (seconds < 10) ? ("0") : (""), seconds);
  81.     TextDrawSetString(Time, string);
  82. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement