09.04.2011, 20:58
Hey all,
I'm having a bit of a problem using 'GetPVarString' when a player disconnects from the server, it's as if the variable is reset BEFORE OnPlayerDisconnect is called? GetPVarInt works fine, it's just PVar strings.
Now because my script uses a character system, the player's name is set to their selected character name, and their actual login same (The name you use on the SA-MP client) is set to a PVar for future use.
The problem is, when using GetPVarString under OnPlayerDisconnect, it doesn't return the string I have set. It's just blank. But if I were to use this anywhere else, it works perfectly. I would use GetPlayerName, but that would return their character name, which I don't want. The actual string I want is stored in the PVar "user_username".
Is this normal when getting PVars when a player disconnects? As this could cause more problems when saving a users data etc.
Any advice is appreciated!
Many Thanks
I'm having a bit of a problem using 'GetPVarString' when a player disconnects from the server, it's as if the variable is reset BEFORE OnPlayerDisconnect is called? GetPVarInt works fine, it's just PVar strings.
Now because my script uses a character system, the player's name is set to their selected character name, and their actual login same (The name you use on the SA-MP client) is set to a PVar for future use.
The problem is, when using GetPVarString under OnPlayerDisconnect, it doesn't return the string I have set. It's just blank. But if I were to use this anywhere else, it works perfectly. I would use GetPlayerName, but that would return their character name, which I don't want. The actual string I want is stored in the PVar "user_username".
Is this normal when getting PVars when a player disconnects? As this could cause more problems when saving a users data etc.
Any advice is appreciated!
Many Thanks