Guest User

Untitled

a guest
Feb 20th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.20 KB | None | 0 0
  1. ////////////////FIXHOUR/////////////////////
  2. public FixHour(hour)
  3. {
  4. hour = timeshift+hour;
  5. if (hour < 0)
  6. {
  7. hour = hour+24;
  8. }
  9. else if (hour > 23)
  10. {
  11. hour = hour-24;
  12. }
  13. shifthour = hour;
  14. return 1;
  15. }
  16.  
  17. /////////////////BEFEHL UM ZU SEHEN WIE SPÄT ES IST///////////////////////////////
  18.  
  19. CMD:time(playerid, params[])
  20. {
  21. if(IsPlayerConnected(playerid))
  22. {
  23. new mtext[20];
  24. new string[128];
  25. new year, month,day;
  26. getdate(year, month, day);
  27. if(month == 1) { mtext = "Jänner"; }
  28. else if(month == 2) { mtext = "Februar"; }
  29. else if(month == 3) { mtext = "März"; }
  30. else if(month == 4) { mtext = "April"; }
  31. else if(month == 5) { mtext = "Mai"; }
  32. else if(month == 6) { mtext = "Juni"; }
  33. else if(month == 7) { mtext = "Juli"; }
  34. else if(month == 8) { mtext = "August"; }
  35. else if(month == 9) { mtext = "September"; }
  36. else if(month == 10) { mtext = "Oktober"; }
  37. else if(month == 11) { mtext = "November"; }
  38. else if(month == 12) { mtext = "Dezember"; }
  39. new hour,minuite,second;
  40. gettime(hour,minuite,second);
  41. FixHour(hour);
  42. hour = shifthour;
  43. if (minuite < 10)
  44. {
  45. if (PlayerInfo[playerid][pJailTime] > 0)
  46. {
  47. format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:0%d~g~|~n~~w~Knastzeit: %d Sekunden", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
  48. }
  49. else
  50. {
  51. format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:0%d~g~|", day, mtext, hour, minuite);
  52. }
  53. }
  54. else
  55. {
  56. if (PlayerInfo[playerid][pJailTime] > 0)
  57. {
  58. format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:%d~g~|~n~~w~Knastzeit: %d Sekunden", day, mtext, hour, minuite, PlayerInfo[playerid][pJailTime]-10);
  59. }
  60. else
  61. {
  62. format(string, sizeof(string), "~r~%d %s~n~~g~|~w~%d:%d~g~|", day, mtext, hour, minuite);
  63. }
  64. }
  65. new sendername[MAX_PLAYER_NAME];
  66. GameTextForPlayer(playerid, string, 5000, 1);
  67. format(string, sizeof(string), "* %s schaut auf seine Uhr.", sendername);
  68. ProxDetector(30.0, playerid, string, COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE,COLOR_PURPLE);
  69. ApplyAnimation(playerid,"COP_AMBIENT","Coplook_watch",4.1,0,0,0,0,0);
  70. }
  71. return 1;
  72. }
Add Comment
Please, Sign In to add comment