Leveling system not saving the playing minutes.
#2

Your code is confusing me. Try this.

Код:
forward PlayingTime(playerid);
public PlayingTime(playerid)
{
    PlayerInfo[playerid][PlayingMinutes]++;
    if(PlayerInfo[playerid][PlayingMinutes] >= 60)
    {
        PlayerInfo[playerid][PlayingHours]++;
        PlayerInfo[playerid][RespectPoints]++;
        PlayerInfo[playerid][PlayingMinutes] = 0;
        format(file, sizeof(file), "RRP/users/%s.ini", Name);
        if(fexist(file))
        {
            dini_IntSet(file, "PlayingHours", PlayerInfo[playerid][PlayingHours]);
            dini_IntSet(file, "RespectPoints", PlayerInfo[playerid][RespectPoints]);
            dini_IntSet(file, "PlayingMinutes", PlayerInfo[playerid][PlayingMinutes]);
        }
        return 1;
    }
    new Name[MAX_PLAYER_NAME];
    GetPlayerName(playerid, Name, sizeof(Name));
    format(file, sizeof(file), "RRP/users/%s.ini", Name);
    if(fexist(file))
    {
        dini_IntSet(file, "PlayingMinutes", PlayerInfo[playerid][PlayingMinutes]);
    }
    return 1;
}
I hope you did not forget the SetTimerEx or SetTimer.
Reply


Messages In This Thread
Leveling system not saving the playing minutes. - by ricardo178 - 25.05.2012, 21:39
AW: Leveling system not saving the playing minutes. - by EthanR - 25.05.2012, 22:36
Re: Leveling system not saving the playing minutes. - by ricardo178 - 25.05.2012, 22:43
AW: Leveling system not saving the playing minutes. - by EthanR - 25.05.2012, 22:45
Re: Leveling system not saving the playing minutes. - by IceCube! - 25.05.2012, 23:27
Re: Leveling system not saving the playing minutes. - by ricardo178 - 26.05.2012, 00:17

Forum Jump:


Users browsing this thread: 2 Guest(s)