Garry's Mod Wiki


boolean SANDBOX:SpawnMenuOpen()


Called when spawnmenu is trying to be opened.

Hiding the spawnmenu will not stop people from being able to use the various console commands to spawn in items, etc. See GM:PlayerSpawn* hooks for blocking actual spawning.


1 boolean
Return false to dissallow opening the spawnmenu


Only allow the people you want to open the spawn menu.

local allowed = { ["STEAM_0:0:00000000"] = true, ["STEAM_0:0:10000000"] = true } hook.Add( "SpawnMenuOpen", "SpawnMenuWhitelist", function() if ( !allowed[ LocalPlayer():SteamID() ] ) then return false end end )

Page Links

Special Pages



Render Time: 32ms

DB GetPage 4
Generate Html 4
SaveChanges (1) 10
Render Body 0
Render Sidebar 11