Garry's Mod Wiki

ents.CreateClientProp

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

Description

Creates a clientside only prop. See also ClientsideModel.

Clientside entities are not garbage-collected, thus you must store a reference to the object and call CSEnt:Remove manually.
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 CSEnt
Created entity.

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: 40ms

Session 0
DB GetPage 5
Generate Html 12
SaveChanges 9
Render Body 0
Render Sidebar 12