SA-MP Forums Archive
TEMP system - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: TEMP system (/showthread.php?tid=365807)



TEMP system - CrazyChoco - 04.08.2012

Hai, i made a temp ban system and i wanted to do it like, when a player which is joined, and is temp banned for 2 weeks 1 day and 2 hours,
i want it to show like that? got any ideas?, i can only get it to seconds

My Script:

http://pastebin.com/7j3EaqZK


Re: TEMP system - CrazyChoco - 04.08.2012

Anyone?


Re: TEMP system - Misiur - 04.08.2012

I don't quite get what do you mean, but you already have
pawn Код:
if(iDump-gettime() < 0) {
So if you add else, you can send message to player whose ban hasn't expired yet.


Re: TEMP system - CrazyChoco - 04.08.2012

yea but i need it in like days
instead of seconds


Re: TEMP system - DeathOnaStick - 04.08.2012

Quote:
Originally Posted by CrazyChoco
Посмотреть сообщение
yea but i need it in like days
instead of seconds
1 day = 60*24 seconds

Oups, edit: 60*60*24


Re: TEMP system - DeathOnaStick - 04.08.2012

I think I know your problem now:

pawn Код:
new days,hours,minutes,seconds;

initSeconds(secs){
seconds = secs%60;
secs -= seconds;
minutes = (secs%3600)/60;
secs -= minutes;
hours = (secs%216000)/3600;
secs -= hours;
days = (secs%5184000)/216000;
secs -= days;
}
This will probably convert correctly, but idk. Just try it, lol. Scripted it here just like that.