SA-MP Forums Archive
[HELP] about level up - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: [HELP] about level up (/showthread.php?tid=519786)



[HELP] about level up - Luca12 - 15.06.2014

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,"","");
        }



Re : [HELP] about level up - S4t3K - 15.06.2014

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.


Re: [HELP] about level up - Luca12 - 15.06.2014

how can I do that ?thanks