Garry's Mod Wiki

SANDBOX:PlayerSpawnProp

boolean SANDBOX:PlayerSpawnProp( Player ply, string model )

Description

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

Arguments

1 Player ply
The player who attempted to spawn a prop.
2 string model
Path to the model of the prop the player is attempting to spawn.

Returns

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

Example

Stops non-admins from spawning props.

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

Page Links


Special Pages


Wikis

?

Render Time: 35ms

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