Garry's Mod

How to set context menu for admins

Submitted by Papich, , Thread ID: 226116

Papich
Junior Member
Level:
5
Reputation:
0
Posts:
95
Likes:
5
Credits:
386
21-11-2021, 01:17 AM
This post was last modified: 21-11-2021, 01:19 AM by Papich
#1
And so in order to set the context of the menu for the administration, you need to follow a couple of steps
1.First go to lua file garrysmod\gamemodes\sandbox\gamemode\spawnmenu\contextmenu.lua
2.The second is just to write this script here.

local function DisallowContextMenu()
    if not LocalPlayer():IsAdmin() then return false end
end
hook.Add("ContextMenuOpen", "DisallowContextMenu", DisallowContextMenu)



And now only the administration sees the context of the menu
[Image: giphy.gif]

RE: How to set context menu for admins

SoraKH32
Newbie
Level:
1
Reputation:
0
Posts:
16
Likes:
0
Credits:
0
22-11-2021, 01:26 AM
#2
i dont know why would you want this to happen? lol

Users browsing this thread: 1 Guest(s)