SA-MP Forums Archive
Player stats not saving - 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: Player stats not saving (/showthread.php?tid=544384)



Player stats not saving - GwENiko - 01.11.2014

delete.


Re: Player stats not saving - gurmani11 - 01.11.2014

you are not saving player status in OnPlayerDisconnect
you are just loading


Re: Player stats not saving - GwENiko - 01.11.2014

Quote:
Originally Posted by gurmani11
Посмотреть сообщение
you are not saving player status in OnPlayerDisconnect
you are just loading
Yes i am.


Re: Player stats not saving - gurmani11 - 01.11.2014

Show code instead of Argumentation


Re: Player stats not saving - GwENiko - 01.11.2014

delete.


Re: Player stats not saving - Riddick94 - 01.11.2014

You're not bringing any data back once player is connected after MySQL query request is done.

Also, you have to show the "savePlayerData(playerid)" stock function.


Re: Player stats not saving - GwENiko - 01.11.2014

delete.


Re: Player stats not saving - biker122 - 01.11.2014

You have to reset them when the player connects & disconnects.
Example:
pawn Код:
playerVariables[playerid][pLevel] = 0;
playerVariables[playerid][pAdminLevel] = 0;
and so on..


Re: Player stats not saving - GwENiko - 01.11.2014

delete.


Re: Player stats not saving - biker122 - 01.11.2014

Show your playerVariables enum.