SHARE
TWEET

MFTimes v1.1

a guest Oct 18th, 2014 308 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <a_samp>
  2. /*
  3.          =-=-=-=-=-=-=-MFTimes =-=-=-=-=-=-=-
  4.         Include MFTimes criada por Mandrack_FreeZe.
  5.         Não retire os créditos.
  6.         Funções abaixo:
  7.  
  8. native MFT_Seconds(funcname[], interval, repeating);
  9. native MFT_Minutes(funcname[], interval, repeating);
  10. native MFT_Hours(funcname[], interval);
  11. native MFT_SecondsEx(funcname[], interval, repeating, const format[], {Float,_}:...);
  12. native MFT_MinutesEx(funcname[], interval, repeating, const format[], {Float,_}:...);
  13. native MFT_HoursEx(funcname[], interval, repeating, const format[], {Float,_}:...);
  14. native MFT_Kill(timerid);
  15.  
  16. native MFT_GetYear();
  17. native MFT_GetMonth();
  18. native MFT_GetDay();
  19. native MFT_GetSecond();
  20. native MFT_GetMinute();
  21. native MFT_GetHour();
  22. */
  23.  
  24. #define MFT_Seconds(%0,%1,%2) SetTimer(%0, %1*1000, %2)
  25. #define MFT_Minutes(%0,%1,%2) SetTimer(%0, %1*60000, %2)
  26. #define MFT_Hours(%0,%1,%2) SetTimer(%0, %1*3600000, %2)
  27. #define MFT_SecondsEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*1000, %2, %3, %4)
  28. #define MFT_MinutesEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*60000, %2, %3, %4)
  29. #define MFT_HoursEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*3600000, %2, %3, %4)
  30. #define MFT_Kill(%0) KillTimer(%0)
  31.  
  32. stock MFT_GetYear()
  33. {
  34.         new data[3];
  35.         getdate(data[0], data[1], data[2]);
  36.         return data[0];
  37. }
  38.  
  39. stock MFT_GetMonth()
  40. {
  41.         new data[3];
  42.         getdate(data[0], data[1], data[2]);
  43.         return data[1];
  44. }
  45.  
  46. stock MFT_GetDay()
  47. {
  48.         new data[3];
  49.         getdate(data[0], data[1], data[2]);
  50.         return data[2];
  51. }
  52.  
  53. stock MFT_GetSecond()
  54. {
  55.         new tempo[3];
  56.         gettime(tempo[0], tempo[1], tempo[2]);
  57.         return tempo[2];
  58. }
  59.  
  60. stock MFT_GetMinute()
  61. {
  62.         new tempo[3];
  63.         gettime(tempo[0], tempo[1], tempo[2]);
  64.         return tempo[1];
  65. }
  66.  
  67. stock MFT_GetHour()
  68. {
  69.         new tempo[3];
  70.         gettime(tempo[0], tempo[1], tempo[2]);
  71.         return tempo[0];
  72. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top