Garry's Mod Wiki

SANDBOX:PlayerSpawnSENT

SANDBOX:PlayerSpawnSENT

  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

Special Pages


Wikis

?

Render Time: 22ms

DB GetPage 3
Generate Html 4
SaveChanges (1) 6
Render Body 0
Render Sidebar 7