[HELP] about level up
#1

I was have 3/8 respects and payday was come and it says I was go to lvl 4 but I didn't should go to lvl 4 before I have 8/8 then I was get lvl 4. thanks

pawn Код:
new nxlvl = PlayerInfo[playerid][Level]+1;
        if(PlayerInfo[playerid][Respects] >= nxlvl)
        {
            format(string,sizeof(string),"[Level up +++] You are know level: %d",nxlvl);
            SendClientMessage(playerid,SVIJETLOPLAVA,string);
            PlayerInfo[playerid][Level]++;
            PlayerInfo[playerid][Respects] = 0;
            SetPlayerScore(playerid,PlayerInfo[playerid][Level]);
            new query2[200];
            mysql_format(mysql,query2,200,"UPDATE `users` SET `Level` = '%d',`Respects` = '0' WHERE `ID` = '%d'",
            PlayerInfo[playerid][Level],PlayerInfo[playerid][ID]);
            mysql_tquery(mysql,query2,"","");
        }
Reply
#2

You realize you are checking if the respect points of a player are equals to the player level plus one ?

So basically if I'm level 50 and I need 600 respect points to level up, once I'll reach the 50th point I'll even level up ?
Check if the respects are matching the new respect count, thing you have to initialize somewhere before this in the script.
Reply
#3

how can I do that ?thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)