SANDBOX:PlayerSpawnedProp

From Garry's Mod
Jump to: navigation, search
 SANDBOX:PlayerSpawnedProp( )

Contents

Description

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

Arguments

Player ply

The player who spawned a prop.

Arguments

string model

Path to the model of the prop the player is attempting to spawn.

Arguments

Entity entity

The entity that was spawned.

Examples

Example

Turns the spawned prop green.

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


Personal tools
Navigation