Garry's Mod Wiki

SANDBOX:SpawnMenuOpen

Description

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.

Returns

1 boolean
Return false to dissallow opening the spawnmenu

Example

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


Wikis

?

Render Time: 23ms

DB GetPage 5
Generate Html 3
SaveChanges (1) 8
Render Body 0
Render Sidebar 6