Garry's Mod Wiki

Garry's Mod Wiki

  boolean SANDBOX:PlayerSpawnSENT( Player ply, string class )

Description

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

Arguments

1 Player ply
The player who attempted to spawn the entity.
2 string class
Class name of the entity the player tried to spawn.

Returns

1 boolean
Should the player be able to spawn the entity or not.

Example

Stops non-admins from spawning entities.

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

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated four times a day. Edits and history are not available.

Last Parsed: Loading...