![]() |
Server States (Open, Closed, Locked) - Printable Version +- Mirage Engine (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Server States (Open, Closed, Locked) (/showthread.php?tid=530) |
- Leighland - 24-12-2006 Thanks dave, this is much easier than setting up a separate test server lol. Can just boot everyone off and do your work. Which is nice ![]() I also took the liberty of posting my own code. I hope you don't mind. If so, delete it :p. I'll understand. I just think it's a good feature and it is relatively easy to implement. Regardless, here it is, free of charge: *************************************************************** Difficulty: 2/5 This is of great use to me, and I'm sure other will use it to. Thanks to Dave for the tutorial. This is my code, the messages and such can be changed to suit your liking. Open up frmServer and click the menu editor. Add the following things to the menu: Code: &Server States Click OK. Now, Click on the &Server States menu, and click Open. Add this code to the sub routine: Code: If mnuOpen.Checked = False Then Now, Click on the &Server States menu, and click Close. Add this code to the sub routine: Code: If mnuClose.Checked = False Then As Dave explained above, this is the code used to boot the players off the server. This code shown here will boot anyone with an access level of 0 and send a global message notifying other admins that the server state has been changed. For those of you who don't know, the AlertMsg command sends a pop up message to the user then disconnects them from the server. They click OK to clear the message and their client will close. Thus, removing them from the game. Now, Click on the &Server States menu, and click Locked. Add this code to the sub routine: Code: If mnuLocked.Checked = False Then This does the same thing as the above sub routine, except it boots everyone who is of Access level 0, 1 and 2. Now, open up modConstants and add the following to the botton of the module: Code: ' Server state constants Now, open up modGlobals and add this: Code: ' Server State var Open up modHandleData and search for "usechar". After this line: Code: Player(index).Charnum = Charnum Add this: Code: If ServerState = STATE_LOCKED Then That's it, I feel like I may have forgotten something, so if so, tell me and I'll edit this post ![]() ![]() - Dragoons Master - 24-12-2006 I think this had an old tutorial, a looong ago, since I have this stuff on my game and I KNOW I didn't developed it. Just can't remember who did it... - Leighland - 25-12-2006 Yea, well Im still sort of a newb at this lmao, I didn't know what an Enum was until about 12 hours ago when I searched for it ![]() |