Garry's Mod Wiki

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
can_spawn

Example

Stops non-admins from spawning entities.

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

Page Links


Special Pages


Wikis

?

Render Time: 41ms

DB GetPage 4
Generate Html 11
SaveChanges (1) 12
Render Body 0
Render Sidebar 12