SANDBOX:PlayerSpawnProp

From Garry's Mod
Jump to: navigation, search
 SANDBOX:PlayerSpawnProp( )

Contents

Description

Called when a player attempts to spawn a prop from the Q menu.

Arguments

Player ply

The player who attempted to spawn a prop.

Arguments

string model

Path to the model of the prop the player is attempting to spawn.

Returns

boolean

Should the player be able to spawn the prop or not.

Examples

Example

Stops non-admins from spawning props.

function GM:PlayerSpawnProp( ply, model )
	if ( !ply:IsAdmin() ) then
		return false
	end
end


Personal tools
Navigation