Garry's Mod Wiki

ClientsideRagdoll

CSEnt ClientsideRagdoll( string model, number renderGroup = RENDERGROUP_OPAQUE )

Description

Creates a fully clientside ragdoll.

The ragdoll initially starts as hidden and with shadows disabled, see the example for how to enable it.

There's no need to call Entity:Spawn on this entity.

The physics won't initialize at all if the model hasn't been precached serverside first.

Clientside entities are not garbage-collected, thus you must store a reference to the object and call CSEnt:Remove manually.

Arguments

1 string model
The file path to the model.

Model must be precached with util.PrecacheModel on the server before usage.
2 number renderGroup = RENDERGROUP_OPAQUE
The Enums/RENDERGROUP to assign.

Returns

1 CSEnt
The newly created client-side ragdoll. ( C_ClientRagdoll )

Example

Creates a new ragdoll with the player model of breen and enables rendering and shadows.

local ragdoll = ClientsideRagdoll( "models/player/breen.mdl" ) ragdoll:SetNoDraw( false ) ragdoll:DrawShadow( true )

Page Links


Special Pages


Wikis

?

Render Time: 28ms

DB GetPage 3
Generate Html 7
SaveChanges 10
Render Body 0
Render Sidebar 6