[Critical Bug] GetPVar's OnPlayerDisconnect
#1

Server can't get the player variables in OnPlayerDisconnect public.
For example try to:
put SetPVarInt(playerid,"var",1); to OnPlayerConnect
and printf("%d",GetPVarInt(playerid,"var")); to OnPlayerDisconnect;
Send gmx command.
It will print "0".
Reply
#2

PVars are deleted when the player disconnect.
Reply
#3

Quote:
Originally Posted by SA:MP Wiki
Note: Variables aren't reset until after OnPlayerDisconnect is called, so the values are still accessible in OnPlayerDisconnect.
This is a lie?
Reply
#4

Why would it be, sounds pretty logical. When the player leaves the saved information of that ID is not needed anymore therefor deleted.

Don't know if its true offcourse
Reply
#5

In OnPlayerConnect PVars sets to 0 too? or i must do it manual?
Reply
#6

PVar's reset when player leave server. I have tested it many times and I still can retrieve data while disconnecting.
Reply
#7

They don't work in OnPlayerDisconnect when you use rcon gmx. Neither does GetPlayerPos since 0.2X. I'm not sure what else doesn't work in OnPlayerDisconnect at a gmx, I only discovered GetPlayerPos after 0.2X because I used to save the players position that way.
Reply
#8

+ This is not a critical bug.
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)