Timeban
#1

Hi guys. I have a /ban <playerid> <reason>.
What is the fastest way to modify it into /ban <playerid> <time> <reason>?
Basically, i am asking how to make time based ban, so that i for example can ban a player for one hour and then he is automatically unbanned after one hour.

Thank you.
Reply
#2

So nobody knows how to make a time based ban system?
I already have the /ban <playerid> <reason>.
Only thing that needs to be added is the <time>.
I know the GetTime and GetDate functions, and those could do the job.
But if there is an easier way, please tell me. Thanks.
Reply
#3

I have a file with a number in that is increased every minute. When you ban players you set their 'unbantime', which will be the value in the file when the ban should expire. If you wanted the <time> parameter to be hours

unban_time = value_in_file += hours*60
Reply
#4

Thank you both.
MP2; I already thourght about that idea, and you just confirmed it for me. Thank you.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)