Advertisement
Guest User

Untitled

a guest
May 26th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. stock DisplayInMinutes(Seconds)
  2. {
  3. new String[150];
  4. new Minutes,Hours,Days;
  5. if(Seconds > 59)
  6. {
  7. Minutes = Seconds / 60;
  8. Seconds = Seconds - (Minutes * 60);
  9. }
  10. if(Minutes > 59)
  11. {
  12. Hours = Minutes / 60;
  13. Minutes = Minutes - (Hours * 60);
  14. }
  15. if(Hours > 23)
  16. {
  17. Days = Hours / 24;
  18. Hours = Hours - (Days * 24);
  19. }
  20. format(String,150,"%d days, %d hours, %d minutes, %d seconds",Days,Hours,Minutes,Seconds);
  21. return String;
  22. }
  23.  
  24. stock CMDAbuse(playerid)
  25. {
  26. new currenttime = gettime();
  27. new cooldownCount = Cooldown[playerid]-gettime();
  28. new string[128];
  29. format(string,sizeof(string),"You have to wait %i to use this command again",DisplayInMinutes(cooldownCount));
  30. if(currenttime < Cooldown[playerid]) return SCM(playerid,red,string);
  31. Cooldown[playerid] = gettime()+90;
  32. return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement