Gamemode.PlayerSpawnedProp

From GMod Wiki

Jump to: navigation, search
Event Hook
Hook NamePlayerSpawnedProp
SyntaxGM:PlayerSpawnedProp( Player ply, String model, Entity ent )
DescriptionCalled when a player has already spawned a prop.
ReturnsNil
Lua StateNewerServer.png
BBCode[b][url=wiki.garrysmod.com/?title=Gamemode.PlayerSpawnedProp]Gamemode.PlayerSpawnedProp [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b]

Examples

DescriptionIgnites all props a non-admin spawns.
Used onNewerServer.png
Code
 
function SpawnedProp(ply, model, ent)
	if (!ply:IsAdmin()) then
		ent:Ignite()
	end
end 
 
hook.Add("PlayerSpawnedProp", "playerSpawnedProp", SpawnedProp)
OutputN/A

Additional Notes

Personal tools
Namespaces
Variants
Actions
Navigation
Lua Scripting
Functions
Hooks
Toolbox