Garry's Mod Wiki

Revision Difference

Global.ClientsideModel#514836

<function name="ClientsideModel" parent="Global" type="libraryfunc">⤶ <description>⤶ Creates a non physical entity that only exists on the client. See also <page>ents.CreateClientProp</page>.⤶ ⤶ <bug issue="861">Parented clientside models will become detached if the parent entity leaves the PVS.</bug>⤶ ⤶ <bug issue="1387">Clientside entities are not garbage-collected, thus you must store a reference to the object and call <page>CSEnt:Remove</page> manually.</bug>⤶ ⤶ <bug issue="3184">Clientside models will occasionally delete themselves during high server lag.</bug>⤶ </description>⤶ <realm>Client</realm>⤶ <args>⤶ <arg name="model" type="string">The file path to the model.&#xA;&#xA;&lt;warning&gt;Model must be precached with &lt;page&gt;util.PrecacheModel&lt;/page&gt; on the server before usage.&lt;/warning&gt;</arg>⤶ <arg name="renderGroup" type="number" default="RENDERGROUP_OTHER">The rendergroup of the entity, see &lt;page&gt;RENDERGROUP&lt;/page&gt;.</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="CSEnt">Created client-side model. ( C_BaseFlex )</ret>⤶ </rets>⤶ </function>⤶ ⤶