Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Disable Radiation with Perms (one that actually works)


pr0fa1n
 Share

Recommended Posts

Just blocking radiation on users with a set permission is easy.
 

            private object OnEntityTakeDamage(BasePlayer player, HitInfo hitInfo)
            {
                Rust.DamageType damageType = hitInfo.damageTypes.GetMajorityDamageType();
                if (permission.UserHasPermission(player.UserIDString, perm)) && (damageType == Rust.DamageType.Radiation || damageType == Rust.DamageType.RadiationExposure)) return false;
                return null;
            }

But im not sure how youd do it with other plugins that are adding it.
Since they could be just straight sending the player the flags and damage instead of triggering a radiation event.

Youd sort of want to edit those plugins instead to add some block conditions.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

About Us

Codefling is a forward-thinking platform for developers to share and monetize their work from plugins to game assets and everything in-between.

4,287 files sold to 445 customers and $63,063 of payments processed this year!

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.