How can ?
#2

Hello,
Timmers are useless here, because they will deduct value of your var only when player is online.

If player stats saves in *.ini, you can do sth like this.

When player buys licence, do something like this:
pawn Код:
...
new Date[3];
GetDate(Date[2], Date[1], Date[0]);
..
Date[2] - Year
Date[1] - Month
Date[0] - Day

Okay, so now you know, when player bought this licence.
For eg, 2012.06.21

Good. If you have enum, add there variable:
pawn Код:
enum something
{
...
eDateD,
eDateM,
eDateY
..
}
Player[MAX_PLAYERS][something];
And
pawn Код:
Player[playerid][eDateD] = Date[0];
Player[playerid][eDateM] = Date[1];
Player[playerid][eDateY] = Date[2];
So variables from enumelator will assign values of Month, Year and Day when player bought licence.
All you need to do now, is to somehow save these values, and make scrpit which will calculate an exact
date which will be after 21 days. You need to think a bit, cuz if you simply add this 21 days to current day,
server will have such info:
Код:
Server: Ohh, damn, I've to remove his licence in 42.06.2012?? Oh ma god.. -,-
Such day doesnt exists, does it?

I had script which calculates such things on my old PC (cuz I did same thing like you on my own, W/O any support ^^).

If you do this script, you can make in same way as eDate's xDate's, which will be assigned with values of date, when server must remove player license.

Understand anything? xD

Good luck!
Greetz,
Lets

Reply


Messages In This Thread
How can ? - by zyghy - 16.06.2012, 19:19
Re: How can ? - by LetsOWN[PL] - 16.06.2012, 19:30
Re: How can ? - by zyghy - 16.06.2012, 20:08
Re: How can ? - by LetsOWN[PL] - 16.06.2012, 20:09
Re: How can ? - by zyghy - 16.06.2012, 20:12
Re: How can ? - by zyghy - 17.06.2012, 21:10
Re: How can ? - by zyghy - 03.07.2012, 15:30

Forum Jump:


Users browsing this thread: 1 Guest(s)