Leveling System.
#2

Well i don't know how to really use y_INI, but for hours you have to do this.

On top add this
pawn Код:
new OnlineTimer[MAX_PLAYERS],Hours[MAX_PLAYERS],Minutes[MAX_PLAYERS]
Under your login function, add this
pawn Код:
OnlineTimer[playerid] = SetTimerEx("OnlineTimeUpdate", 60000, 1, "i", playerid);
Under OnPlayerDisconnect, add this
pawn Код:
KillTimer(OnlineTimer[playerid]);
Under your script add this
pawn Код:
forward OnlineTimeUpdate(playerid);

public OnlineTimeUpdate(playerid)
{
    Minutes[playerid] ++;
    if(Minutes[playerid] == 60)
    {
        Hours[playerid] ++;
        Minutes[playerid] = 0;
        SetPlayerScore(playerid,GetPlayerScore(playerid)+1);
       
    }
    return 1;
}
Reply


Messages In This Thread
Leveling System. - by Nicholas. - 18.03.2012, 13:57
Re: Leveling System. - by Tanush123 - 18.03.2012, 14:33
Re: Leveling System. - by Nicholas. - 18.03.2012, 14:44
Re: Leveling System. - by Nicholas. - 18.03.2012, 15:56
Re: Leveling System. - by Jonny5 - 18.03.2012, 15:59

Forum Jump:


Users browsing this thread: 1 Guest(s)