Garry's Mod

Armor / Suits Config For an suit that dosnt take damage from an specific gun

Submitted by stevenhascool, , Thread ID: 186242

Thread Closed
09-11-2020, 09:22 PM
This post was last modified: 11-11-2020, 04:00 PM by stevenhascool
#1
Hello im happy to show u guys my config file for an admin suit otherwise known as a suit that dosnt take damage from a specific gun

How to use it u may ask

So u want to go to the config file and go to the suit u want to be invincible fromspecificguns


put this code in sv_armor

Code:
timer.Simple(2,function()
hook.Add( "EntityTakeDamage", "adminsuitstevenhascool", function( pl, dmg )
local WhitelistedGuns = {
"insert_weapon_path_here",



local ply = dmg:GetInflictor()  
if not pl:IsPlayer() then else
if not pl.adminsuit then else

if not table.HasValue(WhitelistedGuns, dmg:GetAttacker():GetActiveWeapon():GetClass()) then
dmg:SetDamage(dmg:GetDamage()/4)
else
dmg:SetDamage(2)
end
end
end
end)
[Image: unknown.png]


see how it says ply.adminsuit = true but those exactly on the suits u want to be an admin suit

now u wanna put the code i sent first in the sv_armor


Now u shud be done :D Smile Smile

Users browsing this thread: 3 Guest(s)