Jump to content
Sign in to follow this  
BRPVP

HandleDisconnect possible problem.

Recommended Posts

Hi,

 

I have a HandleDisconnect mission event handler on server.

When the player disconnects this event triggers on server and _this select 0 is the player object, what i will call _p.

The code i run on HandleDisconnect: I save the player on database, position, gear, health, for the player to continue when he comes back.

 

The problem I have:

Sometimes when the player come back on the server he borns in the spawn position with the default spawn player gear.

This is because _p on HandleDisconnect probably returned this data on database save.

 

The bug:

So i believe _p, in HandleDisconnect is sometimes returning not the actual player disconnecting, but a fresh spawned player in spawn position with spawn gear.

 

Do you understand me?

 

Thanks!

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×