Help With Making Useable Ragdolls

Hello there!

For the past days I have been trying to a script that enables me to be able to press the use key on a player’s ragdoll to run another task. I have had no success in my multiple attempts so I have turned to the forums.

If someone could solve my problem for me it would be much appreciated :slight_smile:

Can you go into more depth on what you mean?

GM:PlayerUse exists for doing things after a player uses another entity.

As far as I know PlayerUse only works on already usable entities.

I am using KeyPress hook for things like this.

Yes thats exactly what I mean

[editline]4th February 2017[/editline]

Ok then how would I make a players ragdoll a useable entity

Dead player ragdolls are clientside only by default, you will have to hide the original and create a serverside ragdolls first before you can do what you want, just like TTT.

They wont be dead. Ill be running the Player:CreateRagdoll function on them before I want the Use key to be useable on them.

Yes, which will create a ragdoll on each client and not on the server.

Sorry I’m quite new to scripting but something has me confused.
On the Gmod wiki the function is referenced as blue which means its serverside, but what your saying is its clientside.
Could you explain this to me?

The function internally creates a networked entity serverside that is then sent to every client, similar to what running ents.Create() does.

The realm indicator on the wiki only tells you in which realms this function is defined, not upon which realm it acts. Take

net.Broadcast as an example. The function exists only in the server realm, however it’s effects only act upon the client realm.

Thank you very much, I understand now.