My NLR menu shows up for everyone even for admins and the owner
9 replies, posted
I just downloaded a NLR Menu that pops up when you die but I dont want it to pop up for admins.
It would be a huge help if somone can explane it to me.
This is the download: [url]http://www.garrysmod.org/downloads/?a=view&id=65205[/url]
Kindest regards,
Jeromy Han.
Go to lua/autorun/server/sv_deathmassages.lua and replace:
[CODE]
function SendDeathPanel(pl,cmd,args)
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
[/CODE]
with
[CODE]
function SendDeathPanel(pl,cmd,args)
if not pl:IsAdmin() then
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
end
[/CODE]
[QUOTE=freakyy;44244713]Go to lua/autorun/server/sv_deathmassages.lua and replace:
[CODE]
function SendDeathPanel(pl,cmd,args)
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
[/CODE]
with
[CODE]
function SendDeathPanel(pl,cmd,args)
if not pl:IsAdmin() then
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
end
[/CODE][/QUOTE]
Actually, should be not IsAdmin or not IsSuperAdmin.
[QUOTE=code_gs;44245160]Actually, should be not IsAdmin or not IsSuperAdmin.[/QUOTE]
If ply:IsSuperAdmin is true, ply:IsAdmin will always be true.
[QUOTE=Robotboy655;44245229]If ply:IsSuperAdmin is true, ply:IsAdmin will always be true.[/QUOTE]
Huh, I never knew that. I always did both for safety, but that's good to know.
Haha code_gs, someone told me that yesterday aswell - I used both before aswell xD
For anyone in doubt, [URL]http://github.com/garrynewman/garrysmod/blob/master/garrysmod/lua/includes/extensions/player_auth.lua#L10[/URL]
[QUOTE=freakyy;44244713]Go to lua/autorun/server/sv_deathmassages.lua and replace:
[CODE]
function SendDeathPanel(pl,cmd,args)
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
[/CODE]
with
[CODE]
function SendDeathPanel(pl,cmd,args)
if not pl:IsAdmin() then
pl:ConCommand("DrawDeathMsg") -- or RunConsoleCommand("DrawDeathMsg")
end
end
[/CODE][/QUOTE]
This rely helped for this NLR Menu but it doesnt work for the new one I got *wesnlr*
Download here: [url]http://steamcommunity.com/sharedfiles/filedetails/?id=111509626&searchtext=nlr[/url]
If you could show me how I fix it here It would be great I did this:
[CODE]
function SendNLRBox(ply,cmd,args)
if not pl:IsAdmin() then
pl:ConCommand("wesnlr")
end
end
[/CODE]
Look at the first argument. It's now ply instead of pl.
Just change it to ply:IsAdmin() and ply:ConCommand( "wesnlr" )
I got it thank you guys for all the help
Sorry, you need to Log In to post a reply to this thread.