Raised This Month: $32 Target: $400
 8% 

[CS:GO] Ragdoll'ing a player


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 11-19-2016 , 16:50   [CS:GO] Ragdoll'ing a player
Reply With Quote #1

How would you "ragdoll" someone with their current model? I need to do this when the player is still alive so I can reverse the effect without having to kill them.

My thought was to spawn a ragdoll at their feet and just make the player invisible to give the effect.

Last edited by Michael Shoe Maker; 11-19-2016 at 16:50.
Michael Shoe Maker is offline
Mitchell
~lick~
Join Date: Mar 2010
Old 11-19-2016 , 16:54   Re: [CS:GO] Ragdoll'ing a player
Reply With Quote #2

I never tried the whole faking the client side ragdoll but I have messed with Prop_Ragdolls and they do bonemerge.
So you'd spawn the ragdoll, parent it and bonemerge it, then unparent (ClearParent) the ragdoll and it will maintain the the original player's stance.
Mitchell is offline
Michael Shoe Maker
Senior Member
Join Date: Apr 2016
Old 11-20-2016 , 05:34   Re: [CS:GO] Ragdoll'ing a player
Reply With Quote #3

Thanks,

There is a weird problem though, sometimes the ragdoll disappears meaning that the owner of it (the client) is no longer referable and therefore I cannot restore them.

Last edited by Michael Shoe Maker; 11-20-2016 at 06:36.
Michael Shoe Maker is offline
Shadowysn
Senior Member
Join Date: Sep 2015
Location: Location:
Old 09-25-2019 , 12:09   Re: [CS:GO] Ragdoll'ing a player
Reply With Quote #4

Quote:
Originally Posted by Mitchell View Post
I never tried the whole faking the client side ragdoll but I have messed with Prop_Ragdolls and they do bonemerge.
So you'd spawn the ragdoll, parent it and bonemerge it, then unparent (ClearParent) the ragdoll and it will maintain the the original player's stance.
prop_ragdoll is a server entity with physics parts all calculated serverside, meaning that you'd put more stress on the server just for a body that's synced with all clients.

Now, that's good and all if you're in absolute need of it for things that require you to get the exact position that'll match up with all clients, but cs_ragdoll is better if the body is just decorative.

You can type in the console sm_dump_netprops netpropthing, find the netpropthing file in your main game folder, and open it up like a .txt file.
Search for some words like:
CCS_Ragdoll
and then use SetEntProp with those properties just below CCS_Ragdoll when you spawn the ragdoll using CreateEntityByName in order to setup model, velocity, etc.

I don't know about CS:GO, but I learned from experience that the cs_ragdoll entity in L4D2 crashes the game if it doesn't have a model setup.
As such, you may encounter crashing when you try to set it all up, but don't get discouraged.

Keep persisting and trying different methods, and your server won't have to deal with server-handled, expensive ragdolls.

Alternatively you can keep those server ragdolls, since just now after editing I noticed you'd restore clients from their bodies. There's still the server impact though, so it'll just be in your judgement in whether or not you should go with client or server bodies.

Last edited by Shadowysn; 09-25-2019 at 12:14.
Shadowysn is offline
quasemago
Senior Member
Join Date: Dec 2018
Location: Brazil
Old 09-25-2019 , 13:47   Re: [CS:GO] Ragdoll'ing a player
Reply With Quote #5

This item of TTT basically does what you need: https://github.com/Bara/TroubleinTer...tt_knockout.sp
__________________
I accept requests for plugins and configuration of servers.


If you liked my work, consider making a donation via PayPal.
quasemago is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 05:03.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode