Auto cmd in days
#1

Hi , could you give me some tips and what i need to make an auto expire vip like i set /givevip 10 which will give a player vip for 10 days.
i'm not asking for a free script just some wiki links how to create it , i mean the timer not the vip system.
Reply
#2

If you are using saving system of users then it will be more easy which saving system you are using for saving player data?
Reply
#3

I would suggest saving a players last day of connecting (and update it everytime he connects) and compare it to the current server date using getdate().
Hope I helped.
Reply
#4

I would do it like this:
pawn Код:
new VIPExpire[MAX_PLAYERS];

// under command for giving a vip status
VIPExpire[playerid] = gettime() + days * 86400; // 86400 seconds = one day
This would use unix timestamps to get the given date (search the forums if you don't know what those are) and you could check if gettime() is greater than the date under OnPlayerConnect or some timer with fixed interval like few minutes or something.
Reply
#5

Use timestamps.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)