Im sure I can easily add godmode to this, but the issue is if you die while being noclipped/cloaked, you're required to either use the uncloak command or use the ULX noclip to fix it. Im wondering how it can be corrected if a player isnt in noclip/cloak without the need of using extra commands.
hook.Add("PlayerNoClip", "NoClipForAdminColor", function(ply)
if ply:IsUserGroup("trialmod") or ply:IsUserGroup("moderator") or ply:IsUserGroup("admin") or ply:IsUserGroup("superadmin") or ply:IsUserGroup("headadmin") or ply:IsUserGroup("staffmanager") or ply:IsUserGroup("servermanager") or ply:IsUserGroup("director") or ply:IsUserGroup("networkmanager") or ply:IsUserGroup("council") or ply:IsUserGroup("founder") then
local c = ply:GetColor()
if c.a == 255 then
ply:ChatPrint( "You are now invisible.");
ply:SetRenderMode(RENDERMODE_TRANSALPHA)
ply:SetColor(Color(255, 255, 255, 0))
ply.InObserver = true
ply:SetCollisionGroup(COLLISION_GROUP_WORLD)
ply:SetNoDraw(true);
else
ply:ChatPrint( "You are now visible again.");
ply:SetRenderMode(RENDERMODE_NORMAL)
ply:SetColor(Color(255, 255, 255, 255))
ply.InObserver = false
ply:SetCollisionGroup(COLLISION_GROUP_NONE)
ply:SetNoDraw(false);
end
return true
end
return false
end)
I am not exactly clear on what you're asking. Do you want the person to be uncloaked / no clipped when they die or remain cloaked / no clipped?
yeah, basically I want them to spawn as if they just joined the server. The issue i've been having is when I die while noclipped, I spawn invisible while not being noclipped.
Took your advice and freed up some space using the table. As for the playerspawn hook, I had troubles in the past even getting it to work so I'm not sure what can be done.
Sorry, you need to Log In to post a reply to this thread.