An Events.OnGameStart event is exist to enter the game, but I can not find the event responsible for exiting the game.
There is an Events.OnDisconnect event, but for me it does not work - the function added to it is never called. I searched the Internet and found a 2016 post on the forum https://theindiestone.com/forums/index.php?/topic/17846-testing-for-when-the-game-is-running-lua/&tab=comments#comment-220050 which mentions the Event.OnGameExit event, but, as far as I understand, this event does not exist.
Now I’m thinking about redefining clicking on the Quit menu item, but this will not give me the full necessary result, since it’s still not clear how to handle closing the game console, ALT + F4 or losing the connection.
I probably need to look towards the server side of the mod, but I have run out of ideas where and what to look for. I will be grateful if someone shares their knowledge in this area.
I am not sure if this is the correct about the event when the helicopter shows up and follows you and draws in the Zombies from every direction. So I am 2 months on this build, I am in farm up in rosewood, the helicopter event start, I built a flat roof where I can climb up with sheet rope, and the horde moves in, I start shooting with the M16 found on a dead solider, and after the mag runs out, I start to reload the mag the game crashes, I reload it and everything is the same except the event with helicopter and zombies, none are there, not even the bodies. But the event starts again and the zombies come again only I hell of allot more. This happens the same way 3 more times, crash and reload. Only eveytime I lose whatever I used in ammo, water food, etc. Now I am out of ammo, or so I thought I have no ammo but the weapon keeps shooting like I do have rounds and it has super aiming now, I shot over 200 Zeds with no rounds with the sound of dry firing the weapon, so I was able to survive this event and horde and now the game is stable, my house is trashed, and there is a crap ton of bodies to clean up, and the game is stable. I don’t know what I can provide to help with this bug, log, I did not screenshot or recorded anything. I have no mods installed this is 41.20 update.