Advertisement
Shanidzee

Untitled

Jan 25th, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.08 KB | None | 0 0
  1.  
  2. // ====== New-ში =========//
  3. new Text: DateAndClock[2];
  4.  
  5. // ======= OnPlayerConnect =========//
  6. UpdateTimers(playerid);
  7. SetTimer("UpdateTimers",1000*60,true);
  8. //======== Forward =========//
  9. forward UpdateTimers(playerid);
  10. public UpdateTimers(playerid)
  11. {
  12. new years, month, days, hours, minutes, NMonth[11];
  13. new string[40];
  14. new string2[40];
  15. gettime(hours, minutes);
  16. getdate(years, month, days);
  17. switch(month)
  18. {
  19. case 1: NMonth = "JANUARY";
  20. case 2: NMonth = "FEBRUARY";
  21. case 3: NMonth = "MARCH";
  22. case 4: NMonth = "APRIL";
  23. case 5: NMonth = "MAY";
  24. case 6: NMonth = "JUNE";
  25. case 7: NMonth = "JULY";
  26. case 8: NMonth = "AUGUST";
  27. case 9: NMonth = "SEPTEMBER";
  28. case 10: NMonth = "OCTOBER";
  29. case 11: NMonth = "NOVEMBER";
  30. case 12: NMonth = "DECEMBER";
  31. }
  32. format(string, sizeof(string), "%02d:%02d", hours, minutes);
  33. format(string2, sizeof(string2), "%02dTH %s", days, NMonth);
  34. TextDrawSetString(DateAndClock[0], string);
  35. TextDrawSetString(DateAndClock[1], string2);
  36. TextDrawShowForPlayer(playerid, DateAndClock[0]);
  37. TextDrawShowForPlayer(playerid, DateAndClock[1]);
  38. return true;
  39. }
  40. // ======= OnGameModeInit =====//
  41. DateAndClock[0] = TextDrawCreate(554.6668, 4.5777, "24:00"); TextDrawLetterSize(DateAndClock[0], 0.4239, 2.1309); TextDrawAlignment(DateAndClock[0], 1); TextDrawColor(DateAndClock[0], -253326081); TextDrawSetOutline(DateAndClock[0], 1); TextDrawBackgroundColor(DateAndClock[0], 255); TextDrawFont(DateAndClock[0], 3); TextDrawSetProportional(DateAndClock[0], 1); TextDrawSetShadow(DateAndClock[0], 0); DateAndClock[1] = TextDrawCreate(575.3331, 22.8295, "31TH_FEBRUARY"); TextDrawLetterSize(DateAndClock[1], 0.1983, 1.0980); TextDrawAlignment(DateAndClock[1], 2); TextDrawColor(DateAndClock[1], -253326081); TextDrawSetOutline(DateAndClock[1], 1); TextDrawBackgroundColor(DateAndClock[1], 255); TextDrawFont(DateAndClock[1], 2); TextDrawSetProportional(DateAndClock[1], 1); TextDrawSetShadow(DateAndClock[1], 0);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement