Prevents death and restores health to 100% when activated

Supported Games

When enabled, Life Support will prevent a player’s death and restore their health to 100%. Optionally you can charge Reward Points on three scales. Default, VIP and Admin. Life Support will not prevent death if a player does not have enough reward points.

This plugin is intended for PvE servers. The idea is to reward players for spending more time on your server, and to make is easier for solo player to defeat the hard monuments.

Features

  • Prevents player from dying
  • Rewards players for spending more time on your server
  • Allow your admins and moderators to be invincible without using god mode.
  • Life Support can be suppressed by other plugins on a player by player basis.
  • Life Support can be disabled in zones managed by Zone Manager, Raidable Bases, and Dangerous Treasures.

Permissions

  • lifesupport.default
  • lifesupport.vip
  • lifesupport.admin

You must have lifesupport.admin to use the lszones command.Set the amount of Reward Points to charge (if any) in the configuration file.

Chat Commands

  • /lifesupport - Toggle Life Support on and off.
  • /lszones add [zone] [zone] replace [zone] with Zone Manager's zone ID. You can add multiple zones seperated by a space
  • /lszones remove [zone] [zone] replace [zone] with Zone Manager's zone ID. You can remove multiple zones seperated by a space
  • /lszones clear Clears all zone IDs from Life Support
  • /lszones list List all excluded zone IDs

Configuration

{
     "UseZoneManager (true/false)":false,
     "UseDangerousTreasures (true/false)":false,
     "Use Server Rewards (true/false)": false,
     "Exclude RaidableBases Zones (true/false)": true,
     "Enable Log file (true/false)": true,
     "Log output to console (true/false)": true,
     "Permissions and cost": {
     "lifesupport.default": 400,
     "lifesupport.vip": 200,
     "lifesupport.admin": 0
    }
}

If Use Server Rewards is set to false Life Support will be free to everyone who has any permission level.

Set "UseZoneManager" to true and enter Zone Manager zone IDs to disable LifeSupport when in that zone.

Set "UseDangerousTreasures" to true to disable LifeSupport when in a Dangerous Treasure zone.Set "Exclude RaidableBases Zones" to true to disable LifeSupport when in a RaidableBase zone.

Log file is written to oxide/logs/lifesupport and can be turned off by setting Enable Log file to false.

Log to console can be disabled by setting Log output to console to false.

Cost can be set to any value so you can adjust to how many reward points you give out. I have my server set to 50 reward points every 30 minutes, so it takes 4 hours of play time per life at default level.

Hooks

object OnLifeSupportSavingLife(BasePlayer player) 
     // Called when LifeSupport is about to save the players life
     // Return a non-null value to prevent saving life
     // Return null to allow LifeSupport to continue

Localization

MIT License

Copyright (c) 2021 OG61

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.