Gamemode.PlayerSpawnAsSpectator

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerSpawnAsSpectator
SyntaxGM:PlayerSpawnAsSpectator( Player ply )
DescriptionPlayer spawns as a spectator.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawnAsSpectator]Gamemode.PlayerSpawnAsSpectator [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]


Examples

DescriptionSpawns the player as a spectator
Used onNewerServer.png
Code
function GM:PlayerSpawn( ply )
 
	GAMEMODE:PlayerSpawnAsSpectator( ply )
 
end
OutputThe player spawns as a spectator.


Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox