Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*
- =-=-=-=-=-=-=-MFTimes =-=-=-=-=-=-=-
- Include MFTimes criada por Mandrack_FreeZe.
- Não retire os créditos.
- Funções abaixo:
- native MFT_Seconds(funcname[], interval, repeating);
- native MFT_Minutes(funcname[], interval, repeating);
- native MFT_Hours(funcname[], interval);
- native MFT_SecondsEx(funcname[], interval, repeating, const format[], {Float,_}:...);
- native MFT_MinutesEx(funcname[], interval, repeating, const format[], {Float,_}:...);
- native MFT_HoursEx(funcname[], interval, repeating, const format[], {Float,_}:...);
- native MFT_Kill(timerid);
- native MFT_GetYear();
- native MFT_GetMonth();
- native MFT_GetDay();
- native MFT_GetSecond();
- native MFT_GetMinute();
- native MFT_GetHour();
- */
- #define MFT_Seconds(%0,%1,%2) SetTimer(%0, %1*1000, %2)
- #define MFT_Minutes(%0,%1,%2) SetTimer(%0, %1*60000, %2)
- #define MFT_Hours(%0,%1,%2) SetTimer(%0, %1*3600000, %2)
- #define MFT_SecondsEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*1000, %2, %3, %4)
- #define MFT_MinutesEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*60000, %2, %3, %4)
- #define MFT_HoursEx(%0,%1,%2,%3,%4) SetTimerEx(%0, %1*3600000, %2, %3, %4)
- #define MFT_Kill(%0) KillTimer(%0)
- stock MFT_GetYear()
- {
- new data[3];
- getdate(data[0], data[1], data[2]);
- return data[0];
- }
- stock MFT_GetMonth()
- {
- new data[3];
- getdate(data[0], data[1], data[2]);
- return data[1];
- }
- stock MFT_GetDay()
- {
- new data[3];
- getdate(data[0], data[1], data[2]);
- return data[2];
- }
- stock MFT_GetSecond()
- {
- new tempo[3];
- gettime(tempo[0], tempo[1], tempo[2]);
- return tempo[2];
- }
- stock MFT_GetMinute()
- {
- new tempo[3];
- gettime(tempo[0], tempo[1], tempo[2]);
- return tempo[1];
- }
- stock MFT_GetHour()
- {
- new tempo[3];
- gettime(tempo[0], tempo[1], tempo[2]);
- return tempo[0];
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement