Garry's Mod Wiki

SANDBOX:PlayerSpawnObject

  boolean SANDBOX:PlayerSpawnObject( Player ply, string model, number skin )

Description

Called to ask whether player is allowed to spawn a given model. This includes props, effects, and ragdolls and is called before the respective PlayerSpawn* hook.

Arguments

1 Player ply
The player in question
2 string model
Model path
3 number skin
Skin number

Returns

1 boolean
Return false to disallow the player to spawn the given model.