Advertisement
Guest User

code

a guest
Jan 27th, 2020
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. new count;
  4. new timer;
  5.  
  6. main(){}
  7.  
  8. public OnGameModeInit()
  9. {
  10. SetGameModeText("TIMER");
  11. AddPlayerClass(0, 1958.3783, 1343.1572, 15.3746, 269.1425, 0, 0, 0, 0, 0, 0);
  12.  
  13. count = (gettime() + 36000);
  14.  
  15. //
  16.  
  17. timer = SetTimer("UpdateTimer", 1000, true);
  18. return 1;
  19. }
  20.  
  21. forward UpdateTimer();
  22. public UpdateTimer()
  23. {
  24. if(!--count)
  25. {
  26. KillTimer(timer);
  27. }
  28. new hh, mm, ss;
  29.  
  30. Convert(count - gettime(), hh, mm, ss);
  31. printf("TIMER: %d:%d:%d", hh, mm, ss);
  32. return 1;
  33. }
  34.  
  35. Convert(seconds, &hh = 0, &mm = 0, &ss = 0)
  36. {
  37. hh = seconds / (60 * 60);
  38. mm = (seconds % (60 * 60)) / 60;
  39. ss = (seconds % (60 * 60)) % 60;
  40. return 1;
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement