SA-MP Forums Archive
OnPlayerDisconnect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+--- Thread: OnPlayerDisconnect (/showthread.php?tid=402552)



OnPlayerDisconnect - Diorturato - 27.12.2012

Function OnPlayerDisconnect is always called when a player disconnects from the server? Can a player bypass this function and disconnect from the server insensibly?


Re: OnPlayerDisconnect - zDevon - 27.12.2012

https://sampwiki.blast.hk/wiki/OnPlayerDisconnect

I don't believe it is called on a server GMX (fixed here https://sampforum.blast.hk/showthread.php?tid=250369) but even then that wouldn't be a player bypassing it. Force crashing I'm sure would fall under the timing out category on the wiki page. So, nope.


Re: OnPlayerDisconnect - Diorturato - 27.12.2012

So, problems with saving when a player disconnects shouldn't arise?


Re: OnPlayerDisconnect - Dragonborn - 27.12.2012

Yes. This fix will "create" three new reasons when the player disconnect, case player will disconnected by gmx, by exit, or by changemode... So, all reasons that the player disconnect, with this fix, will be detected.

Quote:
Originally Posted by ******
Посмотреть сообщение
There are three new disconnect reasons for "OnPlayerDisconnect" too:

Quote:

101 = "gmx1" or "gmx2" was typed.
102 = "exit1" or "exit2" was typed.
103 = "changemode1" or "changemode2" was typed.




Re: OnPlayerDisconnect - Lordzy - 27.12.2012

Show your 'OnPlayerDisconnect'. It may also happen if some coding done there is bugged.


Re: OnPlayerDisconnect - Diorturato - 27.12.2012

Thanks for information. I will use ******'s fix.