Garry's Mod Wiki

SANDBOX:PlayerSpawnProp

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

Special Pages


Wikis

?

Render Time: 62ms

DB GetPage 44
Generate Html 4
SaveChanges (1) 5
Render Body 0
Render Sidebar 6