Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock DisplayInMinutes(Seconds)
- {
- new String[150];
- new Minutes,Hours,Days;
- if(Seconds > 59)
- {
- Minutes = Seconds / 60;
- Seconds = Seconds - (Minutes * 60);
- }
- if(Minutes > 59)
- {
- Hours = Minutes / 60;
- Minutes = Minutes - (Hours * 60);
- }
- if(Hours > 23)
- {
- Days = Hours / 24;
- Hours = Hours - (Days * 24);
- }
- format(String,150,"%d days, %d hours, %d minutes, %d seconds",Days,Hours,Minutes,Seconds);
- return String;
- }
- stock CMDAbuse(playerid)
- {
- new currenttime = gettime();
- new cooldownCount = Cooldown[playerid]-gettime();
- new string[128];
- format(string,sizeof(string),"You have to wait %i to use this command again",DisplayInMinutes(cooldownCount));
- if(currenttime < Cooldown[playerid]) return SCM(playerid,red,string);
- Cooldown[playerid] = gettime()+90;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement