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

Hide Ragdoll


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-17-2019 , 14:31   Hide Ragdoll
Reply With Quote #1

Is it possible to hide the ragdoll and/or death-animation for your own team, but show it for the opponent team (and spectators)?
fragnichtnach is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 02-17-2019 , 14:33   Re: Hide Ragdoll
Reply With Quote #2

Yes
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-17-2019 , 15:55   Re: Hide Ragdoll
Reply With Quote #3

Oh, nice. That's good news. Mind telling me how or name a plugin where sth. similar is done.

edit: probably this one: https://forums.alliedmods.net/showthread.php?p=2615988

edit2:
I don't get it. I think I would need to work with "SDKHook(client, SDKHook_SetTransmit, CheckIfAlive);" but how?

Code:
public void CheckIfAlive(int iEntity, int iClient)
{
     if(GetClientTeam(iEntity)!=GetClientTeam(iClient))
          return Plugin_Handled;
     return Plugin_Continue; 
}
is not working, because the ragdoll is no client after death.

Last edited by fragnichtnach; 02-17-2019 at 16:14.
fragnichtnach is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-17-2019 , 19:07   Re: Hide Ragdoll
Reply With Quote #4

Code:
public OnEntityCreated(int entity, const char[] classname)
{
    PrintToChatAll("entity classname = %s ", classname);
    if(StrContains("cs_ragdoll",classname)!=-1)
    {
        PrintToChatAll("Hooking now %s ", classname);
        SDKHook(entity, SDKHook_SetTransmit, Hook_SetTransmitEntity);
    }
}
public Action:Hook_SetTransmitEntity(entity, client) 
{
    PrintToChatAll("HookHook");
    return Plugin_Handled;
}
This code is not working. Deathanimation is still shown. How do I remove the ragdoll totally?
fragnichtnach is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 02-17-2019 , 21:17   Re: Hide Ragdoll
Reply With Quote #5

Quote:
Originally Posted by fragnichtnach View Post
Code:
public OnEntityCreated(int entity, const char[] classname)
{
    PrintToChatAll("entity classname = %s ", classname);
    if(StrContains("cs_ragdoll",classname)!=-1)
    {
        PrintToChatAll("Hooking now %s ", classname);
        SDKHook(entity, SDKHook_SetTransmit, Hook_SetTransmitEntity);
    }
}
public Action:Hook_SetTransmitEntity(entity, client) 
{
    PrintToChatAll("HookHook");
    return Plugin_Handled;
}
This code is not working. Deathanimation is still shown. How do I remove the ragdoll totally?
To remove it just use AcceptEntityInput(entity, "kill")

It might help which game your doing this for.
Not all games use "cs_ragdoll"
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-18-2019 , 03:00   Re: Hide Ragdoll
Reply With Quote #6

Quote:
Originally Posted by Lux View Post
To remove it just use AcceptEntityInput(entity, "kill")
I'm doing it for CS:GO! CS:GO is using "cs_ragdoll". At least no other entity is created with a death.

I don't like to kill it. I would like to hide it, if ragdoll owner and viewing client is in a different team. That's why I tried to use "SDKHook_SetTransmit" like you do sth. similar in one of your plugins. The hook is working but returning Plugin_Handled doesn't hide the deathanimation.

edit: sorry for the wrong section. anybody able to move it to scripting, please?

Last edited by fragnichtnach; 02-18-2019 at 03:01.
fragnichtnach is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 02-18-2019 , 08:18   Re: Hide Ragdoll
Reply With Quote #7

Quote:
Originally Posted by fragnichtnach View Post
I'm doing it for CS:GO! CS:GO is using "cs_ragdoll". At least no other entity is created with a death.

I don't like to kill it. I would like to hide it, if ragdoll owner and viewing client is in a different team. That's why I tried to use "SDKHook_SetTransmit" like you do sth. similar in one of your plugins. The hook is working but returning Plugin_Handled doesn't hide the deathanimation.

edit: sorry for the wrong section. anybody able to move it to scripting, please?
Nice work on hiding the ragdoll!

I don't really know much about csgo
But that sounds like the clients are playing a death sequence them self.

You can try hooking the clients and see what entprops are being changed on client who dies with tentdev
https://forums.alliedmods.net/showthread.php?p=1349107
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-20-2019 , 04:18   Re: Hide Ragdoll
Reply With Quote #8

Oh, wow. That's complicated.However thanks Lux. You say, that this might be a client sided animation, do you still think it is possible to hide the death sequence only for specific players?

Anybody willing to help me doing this. Would pay for the code some bucks. Offers per dm are welcome.
fragnichtnach is offline
Lux
Veteran Member
Join Date: Jan 2015
Location: Cat
Old 02-20-2019 , 09:52   Re: Hide Ragdoll
Reply With Quote #9

Quote:
Originally Posted by fragnichtnach View Post
Oh, wow. That's complicated.However thanks Lux. You say, that this might be a client sided animation, do you still think it is possible to hide the death sequence only for specific players?

Anybody willing to help me doing this. Would pay for the code some bucks. Offers per dm are welcome.
You can try using this to hide the death sequence.
https://github.com/TheByKotik/sendproxy

or you can just set transmit the client? xD
__________________
Connect
My Plugins: KlickME
[My GitHub]

Commission me for L4D
Lux is offline
fragnichtnach
AlliedModders Donor
Join Date: Oct 2008
Old 02-22-2019 , 05:53   Re: Hide Ragdoll
Reply With Quote #10

Thanks for your answer.

Quote:
Originally Posted by Lux View Post
You can try using this to hide the death sequence.
https://github.com/TheByKotik/sendproxy
Where is an "How to use?" for this extention? The basic extention is "for all clients". Do I need to hook m_nModelIndex? Honestly I would prefer working with SDKHook_SetTransmit, but this is still making problems:m


Quote:
Originally Posted by Lux View Post
[..]
or you can just set transmit the client? xD
The following code is not working as it should. I attach an mp4 that shows that a dying client is viewable at the point of his death for a short second.
Code:
#include <sdktools> 
#include <sdkhooks>

public OnPluginStart()
{
}

public OnClientPutInServer(client)
{
    if(!IsFakeClient(client))
    {
        SDKHook(client, SDKHook_SetTransmit, Hook_SetTransmitClient);
    }
}

public Action:Hook_SetTransmitClient(entity, client) 
{
    if(entity!=client)
    {
        if(!IsPlayerAlive(entity))
            PrintToChatAll("HookClient (%d/%d)", entity, client);
        return Plugin_Handled;
    }
    return Plugin_Continue; 
}
Attached Files
File Type: 7z 2019.02.22-11.48_01.mp4.7z (2.58 MB, 35 views)

Last edited by fragnichtnach; 02-22-2019 at 08:31.
fragnichtnach 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 01:28.


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