Garry's Mod Wiki

SANDBOX:PlayerSpawnedProp

  SANDBOX:PlayerSpawnedProp( Player ply, string model, Entity entity )

Description

Called when a player has successfully spawned a prop from the Q menu.

Arguments

1 Player ply
The player who spawned a prop.
2 string model
Path to the model of the prop the player is attempting to spawn.
3 Entity entity
The entity that was spawned.

Example

Turns the spawned prop green.

function GM:PlayerSpawnedProp(ply, model, ent) ent:SetColor(Color(0, 255, 0)) end