|
|
#1 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2010
Posts: 472
Reputation: 23
|
Hi guys, I have lots of systems which needs to be saved upon server shutdown (house owners, business data, etc.), but how am I supposed to do this, when this callback is not being called as it should be (atlest its name tells that its supposed to be called upon game mode exit)? Or is there any other way to do this?
PS. I remeber doing this before and it worked, and some people also use TextDrawDestroy() in this callback (and they recommend others doing so), but whats the point if this callback is useless? Thanks in advice. |
|
|
|
|
|
#2 |
|
Gangsta
Join Date: Jul 2010
Location: Australia
Posts: 940
Reputation: 89
|
If your server crashes, sometimes it will not call OnGameModeExit, I would recommend you set a timer to save these systems, obviously not for TextDrawDestroy etc.
Not sure what other things might affect OnGameModeExit... other than the timer, I cannot think of any other way to save it apart from OnGameModeExit. |
|
|
|
|
|
#3 |
|
Gangsta
![]() ![]() ![]() ![]() Join Date: Jan 2012
Location: The Arab Republic of Egypt
Posts: 691
Reputation: 105
|
It's being called when the gamemode ends (e.g when you close the samp-server.exe or use GameModeExit). If it's not being called in your script, then there should be a problem
# Maybe you're using the script as a filterscript not as a gamemode. # Maybe the server crashes right before this callback is called (Check this crash detect plugin). # Maybe it's being called but you probably saving stuff wrongly (Have you tried log prints to debug?). Oh I got a question. How did you know that it's not being called? |
|
|
|
|
|
#4 |
|
Huge Clucker
![]() ![]() ![]() Join Date: Jan 2010
Posts: 472
Reputation: 23
|
Because I tried printing stuff, and had nothing at all. Had like 6 print's before every function.
|
|
|
|
|
|
#5 |
|
High-roller
![]() ![]() ![]() ![]() ![]() Join Date: Sep 2011
Posts: 1,014
Reputation: 283
|
Make a restart command to restart the server right after saving. You can achieve a server restart by doing one of the following:
pawn Code:
pawn Code:
|
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OnGameModeExit(); | NeroX98 | Scripting Help | 6 | 10/06/2012 10:50 AM |
| OnGameModeExit and OnFilterScriptExit [HELP] | Sting. | Scripting Help | 5 | 10/04/2012 04:21 AM |
| OnGameModeExit | Asasi | Română/Romanian | 12 | 31/05/2011 07:38 PM |
| [Bug] OnGameModeExit | scottyishere | Help Archive | 2 | 14/12/2010 12:21 PM |
| OnGameModeExit | GaGlets(R) | Help Archive | 4 | 27/11/2010 11:55 PM |