Burgershot
  • Home
  • Members
  • Team
  • Help
  • Search
  • Register
  • Login
  • Home
  • Members
  • Help
  • Search
Burgershot SA-MP Pawn Scripting [Pawn] How to use OnGameModeExit?

 
  • 0 Vote(s) - 0 Average
Pawn How to use OnGameModeExit?
Luciano
Offline

Burgershot Member
Posts: 8
Threads: 6
Joined: Apr 2019
Reputation: 0
#1
2019-04-22, 02:08 PM
Should I do the following things in OnGameModeExit or they are done automatically in the background?

- close files
- close database connections
- save player data (despite doing so in OnPlayerDisconnect)
- destroy global textdraws
- destroy gvars
- destroy gangzones or dynamic areas/pickups/checkpoints/actors


Is there any other action that I'm supposed to do in OnGameModeExit?
kristo
Offline

Burgershot Member
Posts: 47
Threads: 10
Joined: Feb 2019
Reputation: 7
Location: Estonia
#2
2019-04-22, 02:54 PM
Most of these things are only necessary if your server is running multiple gamemodes that can be switched between, which is very uncommon and usually when the gamemode exits, it means that the server is being closed and the things you listed are being destroyed anyway, because the server instance just doesn't exist anymore after that. However if you want to be super correct and sure, you can do all of these things.
Y_Less
Offline

Administrator

Posts: 323
Threads: 16
Joined: Feb 2019
Reputation: 90
#3
2019-04-22, 03:39 PM
Files definitely yes.
Gravityfalls
Offline

Burgershot Member
Posts: 105
Threads: 7
Joined: Apr 2019
Reputation: 2
#4
2019-04-22, 04:40 PM
If you use Streamer, it automatically deletes those stuff for you when it detects OnGameModeExit is called.
Carlos
Offline

Burgershot Member
Posts: 15
Threads: 2
Joined: Apr 2019
Reputation: 0
Location: Portugal
#5
2019-04-23, 12:14 AM
No reason not to do the first three.
Woozie_Cross
Offline

Burgershot Member
Posts: 8
Threads: 1
Joined: Apr 2019
Reputation: 0
Location: Russia
#6
2019-04-23, 07:36 AM
files do
« Next Oldest | Next Newest »



  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Burgershot - Powered by our Community and MyBB Original Theme by Emerald

Linear Mode
Threaded Mode