EventHelper
FREE
Sold by: imthenewguyEventHelper – This plugin can be used by developers to manage their arena games, etc!
- Description
- Reviews (0)
- Version History
- Discussions (0)
- Setup
- Product Enquiry
Description
Description
About Event Helper
This plugin can be used by developers to manage their arena games etc.
Developers can use this to handle the entry/exit of players into their games.
The plugin will be primarily used by my HungerGames, ScubaArena, FishingCompetition and Skirmish game.
It features:
- Registration calls to create and register the event with the plugin.
- Automatic running of the events in order, so you can have multiple event plugins running 1 after the other (configurable).
- Strip and save the players current inventory, and restore it after they leave the game.
- Store and restore the players metabolism stats when they join/leave the game.
- Register a destination for players to teleport to when joining the game.
- Command black listing.
- Build in hook management for popular plugins such as Backpacks and kits.
API
void EMCreateEvent(string eventName, bool automatic_start, bool stripItems, bool leaves_event_on_death, bool full_health_on_join, bool give_items_back_on_respawn, bool full_metabolism_on_join, Vector3 teleport_destination)
Creates the event and allows the developer to specify the settings:
- eventName: the name of the event. this.Name is recommended.
- automatic_start: enrolls the event to be scheduled and ran by EventHelper.
- stripItems: strips the players items and stores them in the data file. Items will be returned upon leaving the event, or when they respawn after they have left the event unless give_items_back_on_respawn is set to false.
- leaves_event_on_death: Kicks the player from the event when they die.
- full_health_on_join: Stores the players health into the data file and sets their health to max.
- give_items_back_on_join: Gives the players items back when they leave the event, or when they respawn after leaving the event. If set to false, they will need to use the /recoveritems command to get their items back.This is useful if a server is running plugins such as kits, which wipes the players inventory to give the player a kit.
- full_metabolism_on_join: Saves and restores the players metabolism before and after a game.
- teleport_destination: The location that a player will teleport to when joining the game. Set to Vector3.new if you do not want them to teleport.
void EMExternalPluginSettings(string eventName, bool canDropBackpack = false, bool canEraseBackpack = false, bool canOpenBackpack = false, bool canBackpackAcceptItem = false, bool canRedeemKit = false, bool CanLoseXP= false)
Sets up the external plugin settings for the event.
- eventName: The registered name of the event.
- canDropBackpack: Backpack plugin.
- canEraseBackpack: Backpack plugin.
- canOpenBackpack: Backpack plugin.
- canBackpackAcceptItem: Backpack plugin.
- canRedeemKit: Can the player redeem kits.
- CanLoseXP: Can the player lose xp when dying in the game.
void EMBlackListCommands(string eventName, string[] commands)
Use to submit a list of commands that cannot be run while at the event.
void EMRemoveEvent(string eventName)
Removes the event from EventHelper. This will automatically trigger the EMPlayerLeaveEvent hook for each player if the event is active.
void EMManuallyStarted(string eventName)
Flags the event as manually started, preventing it from being run automatically if opting in for automatic_start.
void EMUpdateLobby(string eventName, Vector3 pos)
Allows you to update the lobby destination after an event has been created.
void EMStartEvent(string eventName)
Triggers an event to start. Marks the event as running so it can be used with the EMEndEvent hook. Call this when you want the game to start.
void EMEndEvent(string eventName)
Triggers the event to end. Goes through each participant and calls EMPlayerLeaveEvent on them before clearing the participants. Also resets manually_started to false and triggers the EMEndGame hook.
bool EMEnrollPlayer(BasePlayer player, string eventName)
Enrolls a player into the event. Follows the instructions of the EMCreateEvent settings by stripping items, setting health and metabolisms, as well as teleporting the player to the arena. Also checks for crafting queues, black listed items and escape blocks. Returns true if the player was enrolled successfully.
void EMPlayerLeaveEvent(BasePlayer player, string eventName = null)
Removes the player from the event. Strips the items that they have received from the event, then optionally restores their previous items, teleports them to the location that they were at prior to joining, sets their health and their metabolism etc, or will tell them that they need to use the command in order to get their inventory back.
bool EMIsParticipating(BasePlayer player, string eventName)
Returns true if a player is participating in an event (using the participants list associated with the event itself).
bool EMAtEvent(ulong id)
Returns true if a player is at an event (using the playerdata records).
bool AddBan(BasePlayer player, string event_name)
Bans the player from the specified event.
bool RemoveBan(BasePlayer player, string event_name)
Unbans the player from the specified event.
Hooks
void EMEndGame(string eventName)
Is called when the game ends.
Chat commands
ehban <target name/id> - bans the player from all events globally. ehunban <target name/id> - unbans the player from all events globally.
Reviews (0)
Only logged in customers who have purchased this product may leave a review.
Version History
- Fixed Fixed an issue with events not being announced in discord.
- Added Added hook: OnPlayerItemsRestored(BasePlayer player) - called when the player's items are restored.
- Added Added support for custom item.contents.capacity values.
- Updated Patched for October update
- Updated Updated Pooling for Septembers patch
- Added Added config for vote percentage.
- Fixed Fixed an issue that required players to re-insert their extended magazines after item restoration.
- Added Added new hookmethod: EMEventEnded(string eventName). Removes manually started flag for an event when called.
- Added Added a discord webhook option to announce game starts.
- Added Added support for Join messages to be handled via EventHelper.
- Fixed Fixed an issue where manually started events would end when EventHelper's auto start kicked in.
- Fixed Fixed an issue where players werent being removed from events properly.
- Updated Updated to support item flags.
- Updated Changed the return values to true from false.
- Added Added hook when a player dies at an event: void OnPlayerDiedAtEvent(BasePlayer player, string eventName)
- Added Added method that can be called to see if a player died while at an event - bool EMPlayerDiedAtEvent(BasePlayer player).
- Updated Optimized the restoring of items slightly.
- Fixed Fixed a bug where chainsaws weren't getting their lowgrade back.
- Added Added a team handling system.
- Updated Updated the CanRedeemKit hook.
- Added Added support for ZLevels xp loss.
- Added Added minimum player count for voting and auto starting events.
- Added Added config option for NoEscape
- Updated Updated method so player loses bleeding/radiation effects when entering/exiting an event.
- Updated Added recusion for storing/restoring items so it functions with bag plugins.
- Added Added API for SkillTree to prevent pouch opening while at event.
- Added Added Hook: object EMOnEventJoin(BasePlayer player, string eventName). Returning non-null prevents joining an event.
- Added Added Hook: void EMOnEventJoined(BasePlayer player, string eventName). Called when the player joins the event.
- Added Added Hook: void EMOnEventLeft(BasePlayer player, string eventName). Called when the player leaves the event.
- Added Added config option to remove weapons that are stuck to the player upon joining.
- Added Added a voting system to allow players to vote for games manually.
- Added Added temperature restrictions.
- Added Added hook: EMWasManuallyStarted(string eventName);
- Added Added try/catch when restoring items to prevent potential NREs.
-
Added
Added chat command: /ehban
- bans the player from all events globally. -
Added
Added chat command: /ehunban
- unbans the player from all events globally. - Added Added API: bool AddBan(BasePlayer player, string event_name)
- Added Added API: bool RemoveBan(BasePlayer player, string event_name)
- Added Added fix for backpacks dropping when they shouldn't be.
- Added Added support to prevent ExtraPockets pouch from dropping (SkillTree).
- Added Added support for RestoreUponDeath. Items will not be restored if the player was in an event.
- Added Added OnConsoleCommand support. Will blacklist the same commands as OnPlayerCommand.
- Fixed Fixed an error with OnPlayerCommand.
- Added Added auto kit override when returning false for give_items_back_automatically. Will give the items back after kits has cleared the inventory etc. This will bypass the give_items_back_automatically settings and give the players items back when triggered on the next frame.
- Updated Adjusted the logic leave event and added an additional parameter for manually leaving (set to false by default).
- Fixed Fixed an error with players getting stuck as "AtEvent" when they leave an event.
- Removed Removed the EMEndGame call from EMEndEvent. Exclusively called from StartNextEvent.
- Fixed Fixed a compile issue.
Discussions (0)
Discussions
There are no discussions yet.
Leave a reply
Setup
Plugin FAQ – How do I use this .zip/.7z file I just purchased on my server?
• First, you want to unzip the file. You can do so by just double-clicking it to open, then drag the contents to the desired location (you may need to install an external unzipping software if you don’t already have one such as 7zip or winrar)
• Next you will find either a structure of folders or just the .cs file itself (it’s the actual plugin file itself).
• After that just install the .cs (plugin file) into your …/oxide/plugins/ folder where you will install plugins you ever need to.
Additionally, here’s a great video that easily covers adding a plugin to your server if you need! https://youtu.be/yWC_p97FhQA
• Installation is not included with any products on the site, however, if needed we may assist if you reach out to our support.
Currently all products on Lone.Design will be contained within a zipped file which is the .7z or .zip that you see. I believe windows 10 and up can unzip on its own without 3rd party tools, but in that case, if you’re unfamiliar with zipped files here are 2 programs I recommend to easily unzip zipped files.
Video On How to Zip and Unzip: https://youtu.be/Ep-L3PjBPCk (TechInsider Youtube Channel)
Zipping/Unzipping Tools
Winrar https://www.rarlab.com (I used to use for years, but works great!)
7zip https://www.7-zip.org/a/7z2107-x64.exe (the one I use currently)
Reviews
There are no reviews yet.