How to make a Rust no fall damage plugin (permission based)
Removes or scales fall damage in OnEntityTakeDamage for players, optionally only for holders of a permission, with a configurable multiplier and a short chat notice.
Fall damage kills players at the worst times: jumping off a base roof while building, hopping down a cliff after a fight, or dropping from a minicopter that clipped the ground. Vanilla Rust applies fall damage through the Rust.DamageType.Fall damage type, so a plugin can neutralise it without touching health values directly.
This plugin hooks OnEntityTakeDamage with a BasePlayer parameter, so Oxide only calls it for player entities and skips vehicles, animals and structures entirely. It reads the fall multiplier from config and, if the hit is a fall, scales only that damage type. When the multiplier is 0 the hit is cancelled and the player gets a short notice; anything between 0 and 1 keeps a proportional amount of damage. A permission gates the whole effect, and a chat command lets holders switch the plugin on and off while testing.
The plugin code
using System;
using System.Collections.Generic;
using Newtonsoft.Json;
using Oxide.Core;
using UnityEngine;
namespace Oxide.Plugins
{
[Info("No Fall Damage", "RustPluginGenerator", "1.0.0")]
[Description("Removes or scales fall damage for players, optionally gated by permission.")]
public class NoFallDamage : RustPlugin
{
private const string PermUse = "nofalldamage.use";
private const string PermToggle = "nofalldamage.toggle";
private PluginConfig config;
private readonly Dictionary<ulong, float> lastNotice = new Dictionary<ulong, float>();
private class PluginConfig
{
[JsonProperty("Enabled")]
public bool Enabled { get; set; } = true;
[JsonProperty("Require Permission")]
public bool RequirePermission { get; set; } = true;
[JsonProperty("Fall Multiplier")]
public float FallMultiplier { get; set; } = 0f;
[JsonProperty("Show Chat Notice")]
public bool ShowNotice { get; set; } = true;
[JsonProperty("Notice Cooldown")]
public float NoticeCooldown { get; set; } = 15f;
}
protected override void LoadDefaultConfig() => config = new PluginConfig();
protected override void LoadConfig()
{
base.LoadConfig();
try
{
config = Config.ReadObject<PluginConfig>();
if (config == null) throw new Exception();
}
catch
{
PrintWarning("Configuration file is invalid, using defaults");
LoadDefaultConfig();
}
SaveConfig();
}
protected override void SaveConfig() => Config.WriteObject(config);
protected override void LoadDefaultMessages()
{
lang.RegisterMessages(new Dictionary<string, string>
{
["FallBlocked"] = "Fall damage cancelled.",
["FallReduced"] = "Fall damage reduced.",
["ToggledOn"] = "Fall damage protection enabled.",
["ToggledOff"] = "Fall damage protection disabled.",
["NoPermission"] = "You do not have permission to use this command."
}, this);
}
private string Msg(string key, string userId = null, params object[] args) =>
string.Format(lang.GetMessage(key, this, userId), args);
private void Init()
{
permission.RegisterPermission(PermUse, this);
permission.RegisterPermission(PermToggle, this);
}
[ChatCommand("nofall.toggle")]
private void CmdToggle(BasePlayer player, string command, string[] args)
{
if (player == null || !permission.UserHasPermission(player.UserIDString, PermToggle))
{
if (player != null) SendReply(player, Msg("NoPermission", player.UserIDString));
return;
}
config.Enabled = !config.Enabled;
SaveConfig();
SendReply(player, Msg(config.Enabled ? "ToggledOn" : "ToggledOff", player.UserIDString));
}
private object OnEntityTakeDamage(BasePlayer player, HitInfo hitInfo)
{
if (player == null || hitInfo == null || hitInfo.damageTypes == null) return null;
if (!config.Enabled || player.IsNpc) return null;
if (config.RequirePermission && !permission.UserHasPermission(player.UserIDString, PermUse)) return null;
if (hitInfo.damageTypes.GetMajorityDamageType() != Rust.DamageType.Fall) return null;
float fallDamage = hitInfo.damageTypes.Get(Rust.DamageType.Fall);
if (fallDamage <= 0f) return null;
float multiplier = Mathf.Clamp(config.FallMultiplier, 0f, 1f);
hitInfo.damageTypes.Scale(Rust.DamageType.Fall, multiplier);
if (config.ShowNotice) Notify(player, multiplier <= 0f ? "FallBlocked" : "FallReduced");
// Fully cancelled fall damage: kill the remaining zero-value hit.
if (multiplier <= 0f && hitInfo.damageTypes.Total() <= 0f) return false;
return null;
}
private void Notify(BasePlayer player, string key)
{
float now = UnityEngine.Time.realtimeSinceStartup;
float last;
if (lastNotice.TryGetValue(player.userID, out last) && now - last < config.NoticeCooldown) return;
lastNotice[player.userID] = now;
SendReply(player, Msg(key, player.UserIDString));
}
private void Unload()
{
lastNotice.Clear();
}
}
}Hooks used: OnEntityTakeDamage
Config file
Created automatically on first load at oxide/config/NoFallDamage.json.
{
"Enabled": true,
"Require Permission": true,
"Fall Multiplier": 0,
"Show Chat Notice": true,
"Notice Cooldown": 15
}Commands and permissions
| Command | What it does | Permission |
|---|---|---|
/nofall.toggle | Enable or disable the plugin globally without reloading it. | nofalldamage.toggle |
| Permission | Grants |
|---|---|
nofalldamage.use | Grants the configured fall damage reduction or immunity. |
nofalldamage.toggle | Allows toggling the plugin on and off with /nofall.toggle. |
How the code works
Restrict the hook to players
The hook is declared as
object OnEntityTakeDamage(BasePlayer player, HitInfo hitInfo). Oxide's dispatch checks that every argument matches the declared parameter type, so this method only runs when the damaged entity is aBasePlayer. Animals, buildings, vehicles and NPCs of another type are ignored without extra casts. Returningnullleaves vanilla damage untouched.Detect fall damage
Inside the hook,
hitInfo.damageTypes.GetMajorityDamageType()returns the dominantRust.DamageType. The code compares it toRust.DamageType.Falland bails out withnullfor anything else. It then reads the fall share withhitInfo.damageTypes.Get(Rust.DamageType.Fall)and stops if that value is zero, so non-fall hits and empty fall entries never reach the scaling step.Scale instead of replacing damage
The config value
Fall Multiplieris clamped to the0to1range withMathf.Clampand passed tohitInfo.damageTypes.Scale(Rust.DamageType.Fall, multiplier). Only the fall portion of the hit is multiplied, so any other damage types in the same hit are left as they were. A multiplier of0.0removes fall damage completely,0.5halves it and1.0changes nothing.Permission and global switch
Both permissions,
nofalldamage.useandnofalldamage.toggle, are registered inInit. WhenRequire Permissionis true the hook checkspermission.UserHasPermission(player.UserIDString, PermUse)and returnsnullfor players who lack it. TheEnabledconfig key is a global switch flipped by/nofall.toggle, which writes the config file so the state survives a reload. NPCs are always skipped.Cancel the hit cleanly
After scaling, if the multiplier was
0andhitInfo.damageTypes.Total()is now0, the hook returnsfalse. Oxide treats that return value as a cancellation, so the hit is dropped entirely instead of running through the damage pipeline with zero values. In every other case the method returnsnull, which keeps the normal damage handling and lets any remaining non-fall damage apply.Notice with a cooldown
Feedback is throttled so repeated falls do not flood chat. The dictionary
lastNoticemaps a player id to theUnityEngine.Time.realtimeSinceStartupvalue of their last message, andNotifyonly sends whenNotice Cooldownseconds have passed. The text comes from the lang keysFallBlockedandFallReduced, and the whole notice can be disabled withShow Chat Notice.Config persistence
LoadDefaultConfiginstantiates the nestedPluginConfigclass, andLoadConfig/SaveConfiground-trip it throughConfig.ReadObject<PluginConfig>()andConfig.WriteObject(config). An invalid or partial file falls back to defaults and prints a warning instead of throwing. All tunables (enabled flag, permission requirement, multiplier, notice flag, cooldown) live inoxide/config/NoFallDamage.json.
Install it on your server
Save NoFallDamage.cs
Keep the file name exactly as the class name. Oxide matches them.Upload it to the plugins folder
Oxide:oxide/plugins/. Carbon:carbon/plugins/. The server compiles and loads it within a few seconds, no restart needed.Edit the config if you want
On first load the default config is written tooxide/config/NoFallDamage.json(Carbon:carbon/configs/NoFallDamage.json). After editing, reload it:oxide.reload NoFallDamage c.reload NoFallDamage # CarbonGrant the permission
Give it to every player, or swapdefaultfor a group such asvip:oxide.grant group default nofalldamage.use c.grant group default nofalldamage.use # Carbon
Variations
Each one opens the generator with a ready prompt you can tweak.
Safe zone only
Only skip fall damage while the player stands inside a building privilege or monument safe zone.
Generate this versionFall damage by height
Scale fall damage based on the distance fallen instead of a flat multiplier.
Generate this versionTeam-wide immunity
Grant fall immunity to every member of a team when one member has a permission.
Generate this version
FAQ
Does this cover fall damage on animals and NPCs too?
No. The hook declares BasePlayer as the damaged type, so Oxide only calls it for players, and the code additionally skips anything where IsNpc is true. If you also want to protect horses or scientists, add a second overload such as object OnEntityTakeDamage(BaseEntity entity, HitInfo hitInfo) and filter by type there.
How do I install it on Oxide or Carbon?
Drop the compiled .cs file into oxide/plugins on an Oxide server, or the same folder on Carbon (Carbon loads Oxide plugins). The plugin compiles on the next reload and writes oxide/config/NoFallDamage.json plus oxide/lang/en/NoFallDamage.json.
Does it also block suicide or bleeding?
No, only the fall damage type is touched. Bleeding from the same hit is applied by Rust's metabolism system after the damage event and can still kill a player, so consider pairing this with a metabolism settings plugin if you want full safety.
Will it interfere with PvP balance?
It can, because a player can jump off a cliff mid-fight with no penalty. The permission system is the usual answer: give nofalldamage.use to VIPs or staff only, or set Fall Multiplier to 0.5 so fall damage still exists but is less punishing.
How do I turn it off temporarily?
Run /nofall.toggle in chat with the nofalldamage.toggle permission. The command flips Enabled, saves the config file and replies with a confirmation fetched from the lang file, so the state survives a plugin reload.
Customize it for your server
Change the reward, add a cooldown, restrict it to VIPs. Start from this prompt and edit anything.
Edit the prompt on the next screen. 2 free plugins a month, no card.
More quality of life plugins
- BackpacksAdds a /backpack command that opens a per-player StorageContainer sized by permission, with contents persisted to oxide/data and optionally droppedโฆOnPlayerLootEndOnPlayerDisconnectedOnPlayerDeath
- Crafting speedA plugin that speeds up crafting by scaling the duration of ItemCraftTask instances when a craft starts, using a global multiplier plus optionalโฆOnItemCraft
- Day and night controlSkips or shortens night by advancing the in-game clock to a configurable morning time, and adds /day and /night admin commands.OnServerInitialized
Last updated Oct 26, 2026.
Customize no fall damage
Customize