Event Manager is the core component for arena combat minigames
Dependencies
Event Manager requires a few plugins to function. You can find links for these plugins at the top of the overview
EMInterface - This plugin manages all the UI elements used by Event ManagerEvent Statistics - This plugin handles all the event statistics from event games
Kits - This is used to give event players gear and weaponsSpawns Database - This is used for player spawn pointsZone Manager - This is used primarily to restrict event players to the event area. This can be expanded to your liking with zone flags
Commands
/event
- Opens the event menu
Permissions
eventmanager.admin
- Required to access any of the admin functionality in the event menu
Creating Events
Before you can create a event you first must prepare the components necessary for a event to run.These include;
- Spawnfile(s) - Which are used to spawn the players
- Kit(s) - Which are used to give players the items they need for the event
- Zone - Which is used to keep the players inside the designated event area
You can read more about setting these things up below.
Once you have prepared these you can access the event creator via the Admin tab of the event menu.
To create a event click the "Create Event" button. You will be prompted to select an event mode, once you have selected a mode you just need to fill in the options.
There are 3 types of fields here;
- Input Fields - These will require you click on them and enter text. When you are done hit the Enter key to store that line. To clear the line click the "X" at the end of it to clear that field
- Selection Fields - These will open another window where you can make a selection from a list of options
- Toggle Fields - These are simple on/off toggles
This picture is depicting a Capture The Flag event. Go through each option here and fill out the details. Once you are done click the "Save" button.
This event will now be accessible from the "Open Event" tab.
Creating Zones
Zones are an important part of moderating events. You can find more detailed information on creating zones on the Zone Manager overview. Here I will give a brief example.
- Find the area in which you want to create an arena
- Use the command
/zone_add
. This will create a zone on your position. - Change the size of the zone using '/zone radius XX' replacing XX with the radius of the zone (eg. 30)
- You can add additional zone flags if you desire, but just a standard zone with no flags is enough to keep event players inside
- Take note of the ZoneID and add it to your event config/auto event config
Creating Spawnfiles
Spawnfiles are a necessary part of events. They determine where the player will respawn after death and at the beginning of a event. Here is a brief example on how to create a spawnfile
- Type
/spawns new
- Walk to a location where you would like a spawnpoint and type
/spawns add
- Repeat this to create as many spawn locations as you want
- When done type
/spawns save <filename>
be sure to remember this file name as you will need to to configure events
Creating Kits
Kits are needed in one way or another. Use the Kits plugin to create kits for your event players to use in combat. As stated above you can use 1 kit for all, or create multiple and use the class selector. You can read more about creating kits on the Kits plugin overview
Manging Events
All event management can be done via the 'Admin' tab of the event menu. From here you can;
- Open pre-made events
- Edit existing events
- Create new events
- Delete existing events
- Close Event - Closes an open event to prevent further players from joining
Setting up Auto-Events
You can create a loop of events that run on a timer. To enable this feature you need to of already created some events.
In the auto-event section of the config you can specify which events to run on a timer by adding the event name to the list.ex.
"List of event configs to run through": [
"Some Event Name",
"Another Event Name"
],
Rewards
You can opt to give rewards to players for kills, headshots and event wins. You can select between 3 reward systems;
- ServerRewards (RP)
- Economics
- Scrap
You can also adjust how much of the reward to give in the config
"Reward Options": {
"Amount rewarded for kills": 1,
"Amount rewarded for wins": 5,
"Amount rewarded for headshots": 2,
"Reward type (ServerRewards, Economics, Scrap)": "Scrap"
},
Configuration
{
"Auto-Event Options": {
"Enable auto-events": false,
"List of event configs to run through": [],
"Randomize auto-event selection": false,
"Auto-event interval (seconds)": 3600
},
"Event Options": {
"Blacklisted commands for event players": [
"s",
"tp"
]
},
"Reward Options": {
"Amount rewarded for kills": 1,
"Amount rewarded for wins": 5,
"Amount rewarded for headshots": 2,
"Reward type (ServerRewards, Economics, Scrap)": "Scrap"
},
"Timer Options": {
"Match start timer (seconds)": 60,
"Match pre-start timer (seconds)": 10,
"Backpack despawn timer (seconds)": 30
},
"Message Options": {
"Announce events when one opens": true,
"Announce events when a match is playing (to non-event players)": true,
"Event announcement interval (seconds)": 120,
"Broadcast when a player joins an event to chat": true,
"Broadcast when a player leaves an event to chat": true,
"Broadcast the name(s) of the winning player(s) to chat": true,
"Broadcast kills to chat": true,
"Chat icon Steam ID": 76561198403299915
},
"Version": {
"Major": 4,
"Minor": 0,
"Patch": 4
}
}
API
Use this for direct hook usage (ie. EventManager.Call(".....)
(object) IsEventPlayer(BasePlayer player) // Returns true if the player is in a event, otherwise returns null
Use this for global hook usage (ie Interface.CallHook("....)
(object) isEventPlayer(BasePlayer player) // Returns true if the player is in a event, otherwise returns null
Credits
Reneb the original author of this plugin
MIT License
Copyright (c) 2019 k1lly0u
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.