GhostXoP Posted June 24, 2012 Share Posted June 24, 2012 onClientPlayerQuit or onPlayerQuit? Link to comment
Genius Posted June 24, 2012 Share Posted June 24, 2012 onClientPlayerQuit or onPlayerQuit? "onClientPlayerQuit" is for Client side,"onPlayerQuit" is for Server side Link to comment
GhostXoP Posted June 24, 2012 Author Share Posted June 24, 2012 Ofcourse but, which fires first? Everytime i try and set onPlayerQuit to log the player out and save stats, its too late and the pointer to the account goes nil. Link to comment
Guest Guest4401 Posted June 24, 2012 Share Posted June 24, 2012 Everytime i try and set onPlayerQuit to log the player out and save stats, its too late and the pointer to the account goes nil. It might be because you are logging out the player and then trying to save stats, which obviously won't work, because the player has to be logged in. As far as I know, getting the player (i.e, source), as well as account (getPlayerAccount(source)) is possible in this event. Link to comment
GhostXoP Posted June 24, 2012 Author Share Posted June 24, 2012 It might be because you are logging out the player and then trying to save stats Its not. The data was stored in fields that hadn't existed. The expected field was capitalized, the one that was there was Not. Link to comment
BinSlayer1 Posted June 24, 2012 Share Posted June 24, 2012 server event is fired first I'm almost sure because client doesnt exist without server. server needs to send data (i.e playing quitting) to client so server knows about the quit long before the client does (might even be a few milliseconds) Dunno how that helps you, but I just responded to the original question Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now