SANDBOX:PlayerSpawnSENT

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

Contents

Description

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

Arguments

Player ply

The player who attempted to spawn the entity.

Arguments

string class

Class name of the entity the player tried to spawn.

Returns

boolean

can_spawn

Examples

Example

Stops non-admins from spawning entities.

function GM:PlayerSpawnSENT( ply, class )
	if not ply:IsAdmin() then
		return false
	end
end


Personal tools
Navigation