Garry's Mod Wiki

Garry's Mod Wiki

  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

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 twice a day. Edits and history are not available.

Last Parsed: Loading...