Gamemode.PlayerSpawnedProp

From GMod Wiki

Revision as of 17:39, 18 November 2009 by Dlaor (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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