Have problem with Level System
#2

For the Payday, make a second timer like this:

pawn Код:
forward SecondTimer();
public SecondTimer()
{
    new hours, minutes, seconds;
    gettime(hours, minutes, seconds);
    if(seconds == 0 && minutes == 0)
    {
        PayDay()
    }
    return 1;
}
Under OnFilterScriptInit / OnGameModeInit:

pawn Код:
SetTimer("SecondTimer", 1000, true);
Change PayDay(playerid) to PayDay().

Also, the OnPlayerUpdate is saving the level and exp as kills and deaths?

pawn Код:
format(var, 32, "[COLOR="red"]Kills[/COLOR]:%d\n",PlayerInfo[playerid][[COLOR="Red"]pLevel[/COLOR]]);fwrite(hFile, var);
                format(var, 32, "[COLOR="red"]Deaths[/COLOR]:%d\n",PlayerInfo[playerid][[COLOR="red"]pExp[/COLOR]]);fwrite(hFile, var);
Try and change it to:

pawn Код:
format(var, 32, "Level:%d\n",PlayerInfo[playerid][pLevel]);fwrite(hFile, var);
                format(var, 32, "Exp:%d\n",PlayerInfo[playerid][pExp]);fwrite(hFile, var);
Reply


Messages In This Thread
Have problem with Level System - by Bulgaria - 22.09.2013, 09:26
Re: Have problem with Level System - by DanishHaq - 22.09.2013, 10:51
Re: Have problem with Level System - by Bulgaria - 22.09.2013, 12:41
Re: Have problem with Level System - by DanishHaq - 22.09.2013, 12:44

Forum Jump:


Users browsing this thread: 1 Guest(s)