How do I remove clientside ragdolls in a gamemode? I'm making a custom one which I'm hoping will be killer. :)
I'm not exactly sure what you're asking, but if you override the [b][url=wiki.garrysmod.com/?title=Gamemode.DoPlayerDeath]Gamemode.DoPlayerDeath [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] hook, you can prevent players' ragdolls being spawned on death, like so:
[lua]function GM:DoPlayerDeath( ply, attacker, dmginfo )
//ply:CreateRagdoll()
ply:AddDeaths( 1 )
if ( attacker:IsValid() && attacker:IsPlayer() ) then
if ( attacker == ply ) then
attacker:AddFrags( -1 )
else
attacker:AddFrags( 1 )
end
end
end[/lua]
I commented out the [b]ply:CreateRagdoll()[/b] function to prevent that ragdoll from spawning.
Sorry, you need to Log In to post a reply to this thread.