counting admin time
#2

pawn Код:
new minuteTimer[MAX_PLAYERS];
new minutes[MAX_PLAYERS] = {0, ...};

public OnPlayerConnect(playerid)
{
    minuteTimer[playerid] = SetTimerEx("UpdateMinutes", 60 * 1000, true, "i", playerid);
    return 1;
}

forward UpdateMinutes(playerid);
public UpdateMinutes(playerid)
{
    minutes[playerid]++;
    return 1;
}

public OnPlayerDisconnect(playerid, reason)
{
    KillTimer(minuteTimer[playerid]);
    return 1;
}
Make sure you save the information in a file, so the value doesn't get reset every time.
Reply


Messages In This Thread
counting admin time - by Luca12 - 06.08.2013, 15:33
Re: counting admin time - by [XST]O_x - 06.08.2013, 15:44
Re: counting admin time - by Luca12 - 06.08.2013, 16:00
Re: counting admin time - by Vince - 06.08.2013, 16:08
Re: counting admin time - by Konstantinos - 06.08.2013, 16:13
Re: counting admin time - by Luca12 - 06.08.2013, 16:16
Re: counting admin time - by Konstantinos - 06.08.2013, 16:19
Re: counting admin time - by Luca12 - 06.08.2013, 16:32
Re: counting admin time - by Tanush123 - 06.08.2013, 16:34
Re: counting admin time - by Luca12 - 06.08.2013, 17:02
Re: counting admin time - by Konstantinos - 06.08.2013, 22:30
Re: counting admin time - by Luca12 - 06.08.2013, 22:52
Re: counting admin time - by Konstantinos - 07.08.2013, 09:42

Forum Jump:


Users browsing this thread: 2 Guest(s)