Advertisement
DanGT

iUtils

Nov 28th, 2013
349
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. /*
  2. * --- iUtils ---
  3. * Por DanDRT(Danilo Galvão)
  4. * Agradecimentos: Willian.
  5. * [iPs]TeaM - ipsbr.net
  6. */
  7.  
  8. #define Now iGetTimeStamp
  9. #define TimeStamp iGetTimeStamp
  10.  
  11. stock IsNumeric(const string[])
  12. return !!strval(string);
  13.  
  14. stock iGetTimeStamp()
  15. {
  16. new time[6], february, finaltime;
  17. gettime(time[0], time[1], time[2]);
  18. getdate(time[3], time[4], time[5]);
  19.  
  20. february = (!((time[3] % 4) ^ 2) ? 29 : 28);
  21.  
  22. if(!(february ^ 28))
  23. finaltime = 86400;
  24.  
  25. finaltime += 27053635+(time[2] + (time[1] * 60) + (time[0] * 3600))+(((31*7)+(30*4)+february)+(time[5] * 86400) + (31536000 * (time[3]-1970)));
  26.  
  27. return finaltime;
  28. }
  29.  
  30. stock GetIP(playerid)
  31. {
  32. new Ip[16];
  33. GetPlayerIp(playerid, Ip, sizeof(Ip));
  34. return Ip;
  35. }
  36.  
  37. stock GetPlayerNameEx(playerid)
  38. {
  39. new name[MAX_PLAYER_NAME];
  40. GetPlayerName(playerid, name, sizeof(name));
  41. return name;
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement