SA-MP Forums Archive
Callback. - 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: Callback. (/showthread.php?tid=332228)



Callback. - BetaLaxx - 07.04.2012

Is the Function Below called when the console/server is exited?
pawn Код:
public OnPlayerDisconnect(playerid, reason)



Re: Callback. - JhnzRep - 07.04.2012

No it is called when a player dsconnects.

EDIT:
pawn Код:
public OnGameModeExit()
When server is exited.


Re: Callback. - DR3AD - 07.04.2012

Its that little time after you quit the server, the function is called


Re: Callback. - BetaLaxx - 07.04.2012

Quote:
Originally Posted by JhnzRep
Посмотреть сообщение
No it is called when a player dsconnects.

EDIT:
pawn Код:
public OnGameModeExit()
When server is exited.
Everyone disconnects when that function is called.
So don't you think it's called when the server is exited?


Re: Callback. - DR3AD - 07.04.2012

Quote:
Originally Posted by BetaLaxx
Посмотреть сообщение
Everyone disconnects when that function is called.
So don't you think it's called when the server is exited?
That function is called (OnGameModeExit()) when you close the "sa-mp server.exe" in the server folder I think, and closing that "sa-mp server.exe" the server goes down


Re: Callback. - JhnzRep - 07.04.2012

I didn't understand what you meant, yes it is called. But it is called a little time after, meaning if you are trying to save stats on GMX your gona have a problem.

If this is what you need, then here is a tutorial how to get by that. https://sampforum.blast.hk/showthread.php?tid=319439