Guest User

Untitled

a guest
Feb 24th, 2018
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.04 KB | None | 0 0
  1. InGameTD[ 10 ] = TextDrawCreate(130.500000, 434.000000, "18:25");
  2. TextDrawLetterSize(InGameTD[ 10 ], 0.310999, 1.074999);
  3. TextDrawAlignment(InGameTD[ 10 ], 1);
  4. TextDrawColor(InGameTD[ 10 ], -1);
  5. TextDrawSetShadow(InGameTD[ 10 ], 0);
  6. TextDrawSetOutline(InGameTD[ 10 ], 1);
  7. TextDrawBackgroundColor(InGameTD[ 10 ], 51);
  8. TextDrawFont(InGameTD[ 10 ], 1);
  9. TextDrawSetProportional(InGameTD[ 10 ], 1);
  10.  
  11.  
  12.  
  13.  
  14. task SyncTime[60000]()
  15. {
  16. new tmphour,
  17. tmpminute,
  18. tmpsecond,
  19. year,
  20. month,
  21. day,
  22. stringicc[ 15 ];
  23.  
  24. getdate( year, month, day );
  25. gettimeEx( tmphour, tmpminute, tmpsecond );
  26. FixHour( tmphour );
  27. tmphour = shifthour;
  28.  
  29. format( stringicc, sizeof( stringicc ), "(%s%d:%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond);
  30. TextDrawSetString( InGameTD[ 10 ], stringicc );
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45.  
  46.  
  47. task GlobalTimer[1000]()
  48. {
  49. new id = -1;
  50.  
  51. new tmphour,
  52. tmpminute,
  53. tmpsecond,
  54. year,
  55. month,
  56. day,
  57. stringicc[ 15 ];
  58.  
  59. getdate( year, month, day );
  60. gettimeEx( tmphour, tmpminute, tmpsecond );
  61. FixHour( tmphour );
  62. tmphour = shifthour;
  63.  
  64. format( stringicc, sizeof( stringicc ), "%s%d:%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond);
  65. TextDrawSetString( InGameTD[ 10 ], stringicc );
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87. if( realtime ) {
  88. new tmphour,
  89. tmpminute,
  90. tmpsecond,
  91. stringicc[ 15 ];
  92.  
  93. gettimeEx( tmphour, tmpminute, tmpsecond );
  94. FixHour( tmphour );
  95. tmphour = shifthour;
  96. SetWorldTime( tmphour );
  97. ServerInfo[ VremeInGame ] = tmphour;
  98.  
  99. format( stringicc, sizeof( stringicc ), "%s%d:%s%d", (tmphour < 10) ? ("0") : (""), tmphour, (tmpminute < 10) ? ("0") : (""), tmpminute, (tmpsecond < 10) ? ("0") : (""), tmpsecond);
  100. TextDrawSetString( InGameTD[ 10 ], stringicc );
  101. }
  102. return true;
Advertisement
Add Comment
Please, Sign In to add comment