Fixing my MySQL Save system
#1

coudl someone read through my script and fix my s ave system? when I make someone admin ingame and they log out it doesnt save etc, also with everything but account password and username lawl
Script
Pastebin
Reply
#2

You're setting everything to 0 on disconnect, could be something =P
Set that to 0 when unregistered players connect, if registered players you just load their stats and it will set the values accordingly.

I dont feel like editing as I myself isn't very sure about this without doing some trial'n'error
pawn Код:
PlayerInfo[playerid][pAdmin] = 0;
        PlayerInfo[playerid][pVip] = 0;
        PlayerInfo[playerid][pScore] = 0;
        PlayerInfo[playerid][pTrusted] = 0;
        PlayerInfo[playerid][pHighest] = 0;
        PlayerInfo[playerid][pMoney] = 0;
Quote:
Originally Posted by Vince
Посмотреть сообщение
You're not setting the IsPlayerLoggedIn variable when the log in, only when they register. This once more proves the importance of debugging. If you'd debug your OnPlayerDisconnect you would've noticed that the value of the variable was 0.
^Proper advice
Reply
#3

You're not setting the IsPlayerLoggedIn variable when the log in, only when they register. This once more proves the importance of debugging. If you'd debug your OnPlayerDisconnect you would've noticed that the value of the variable was 0.
Reply
#4

Could you fix it?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)