G.ClientsideModel
From GMod Wiki
Function | |
Syntax |
ClientsideModel( String model, Enum rendergroup ) Where is this used? |
Description: | |
Creates a client side entity with the given model. | |
Returns: | Entity CSent |
Part of Library: | Global Functions |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.ClientsideModel]G.ClientsideModel [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | This creates a clientside model with the hula doll |
---|---|
Used on | |
Code | local cutedoll = ClientsideModel("models/props_lab/huladoll.mdl", RENDERGROUP_OPAQUE) |
Output | N/A |
Additional Notes
- CSEnt appears to be a fancy wrapper for the base clientside entity metatable, so it has the same methods as ents.Create on the client.
- The class is "C_BaseFlex" which is what most entity classes are derived from. It's somewhat of a simpler clientside prop_physics that supports animations.
- This entity is garbage collected, make sure you keep a reference to it.