I made this
local PANEL_COMMAND = "/dd"
local ply = self.Player
util.AddNetworkString("OpenAdminMenu")
hook.Add("PlayerSay", "OpenTheAdminMenuPLS", function(ply, text, public)
if ( ply:IsAdmin() ) then
if string.lower( text ) == PANEL_COMMAND then
net.Start("OpenAdminMenu")
net.Send(ply)
return ""
end
end)
But it doesn't work and i don't know how to make that only the rank Modo-test, Modérateur, admin and superadmin can open the menu can you help me
I already read this: Player/IsAdmin
And i don't understand
You're ending only one of your if statements, which you probably missed because you didn't indent your second one.
Next time include the script error you get.
Ok thx man and sorry next time im gonna add the error
and can you help me for one other thing i want to make that when a player isn't admin and he try it the popup in the right bottom corner appear and say You don't have the right permission
hook.Add( "OnPlayerChat", "Test", function(ply, text) if (string.lower(text) == "!test" ) then if CLIENT and table.HasValue(AccessToMenu, ply:GetNWString("usergroup")) then test() end end end)
Sorry, you need to Log In to post a reply to this thread.