Garry's Mod Wiki

ents.CreateClientProp

Entity ents.CreateClientProp( string model = "models/error.mdl" )

Description

Creates a clientside only prop. See also ClientsideModel.

Projected textures do not work on clientside props under specific conditions (see this explanation).

Arguments

1 string model = "models/error.mdl"
The model for the entity to be created.

Model must be precached with util.PrecacheModel on the server before usage.

Returns

1 Entity
Created entity. (C_PhysPropClientside)

Example

Creates a clientside prop at the player location.

function GhostBarrel( ply ) local c_Model = ents.CreateClientProp() c_Model:SetPos( ply:GetPos() ) c_Model:SetModel( "models/props_borealis/bluebarrel001.mdl" ) c_Model:SetParent( ply ) c_Model:Spawn() end

Page Links


Special Pages


Wikis

?

Render Time: 42ms

DB GetPage 3
Generate Html 9
SaveChanges 12
Render Body 0
Render Sidebar 15