Posts: 261
Threads: 93
Joined: Aug 2011
Reputation:
0
hey, public OnPlayerDisconnect is calling a litle bit after OnGameModeExit, After OnGameModeExit al PVar's are deleting, i'm saving all player information with PVar's on OnPlayerDisconnect but they doesn't save becouse they deleted earlyer in OnGameModeExit so how can i call OnPlayerDisconnect earlyer? to get my info saved?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
It does save fine for me. How do you save in OnPlayerDisconnect?
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
It was just an example, I don't know where you're saving to. Replace OnGameModeExit with OnFilterScriptExit and use it to your filterscript. Or if this callback already exists, add the for loop.
It should work fine then.
Posts: 261
Threads: 93
Joined: Aug 2011
Reputation:
0
filterscript isint exiting when gamemode changes
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
Wait man, you made me confused. What do you want to do?
Posts: 261
Threads: 93
Joined: Aug 2011
Reputation:
0
when chaning the mode call OnPlayerDisconnect before OnGameModeExit
Posts: 11,827
Threads: 33
Joined: Dec 2011
Reputation:
0
And about "not saving"? You just told me you're using a system which saves and it's filterscript. OnPlayerDisconnect won't be called if the OnFilterScriptExit won't be called either.
Anyway, what I can suggest you is a timer. Let's say you have the code that it changes the gamemode, instead of that, call OnPlayerDisconnect with the way I showed you above and start a timer with few milliseconds (Not repeated (false). When the timer's callback will be called then change the gamemode.