Raised This Month: $ Target: $400
 0% 

Can't remove dead body (ClCorpse)


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
analogg
Junior Member
Join Date: Sep 2009
Location: Ukraine
Old 07-13-2012 , 01:29   Can't remove dead body (ClCorpse)
Reply With Quote #1

Hello!

I tried remove dead body via:
PHP Code:
set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET); 
but that method doesn't works! Can't understand why!

Can anyone help me?

Thanx!
analogg is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-13-2012 , 06:54   Re: Can't remove dead body (ClCorpse)
Reply With Quote #2

That should work fine.
Another method is setting pev_deadflag to DEAD_DISCARDBODY when the player dies.
__________________
<VeCo> is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-13-2012 , 11:40   Re: Can't remove dead body (ClCorpse)
Reply With Quote #3

it works fine on my server and in testing
Doc-Holiday is offline
analogg
Junior Member
Join Date: Sep 2009
Location: Ukraine
Old 07-13-2012 , 15:37   Re: Can't remove dead body (ClCorpse)
Reply With Quote #4

Hmm...strange. When I kill the player, or kill himself, die animation still play.
With DEAD_DISCARDBODY the same!

Edit: Maybe problem in server build? I'm using 4554 build.

Last edited by analogg; 07-13-2012 at 15:54.
analogg is offline
hleV
Veteran Member
Join Date: Mar 2007
Location: Lithuania
Old 07-13-2012 , 16:36   Re: Can't remove dead body (ClCorpse)
Reply With Quote #5

You wan't the player to disappear once killed? If so, just make him invisible upon death.
PHP Code:
#include <amxmodx>
#include <fun>
#include <hamsandwich>

public plugin_init()
{
    
RegisterHam(Ham_Killed"player""OnPlayerKilled"1);
    
RegisterHam(Ham_Spawn"player""OnPlayerSpawn");

    
// Not sure if this is needed since we make the player invisible anyway
    
set_msg_block(get_user_msgid("ClCorpse"), BLOCK_SET);
}

public 
OnPlayerKilled(client)
    
set_user_rendering(clientkRenderFxGlowShell000kRenderTransAlpha0);

public 
OnPlayerSpawn(client)
    
set_user_rendering(client); // Make visible before spawning 

Last edited by hleV; 07-13-2012 at 16:41.
hleV is offline
analogg
Junior Member
Join Date: Sep 2009
Location: Ukraine
Old 07-13-2012 , 16:44   Re: Can't remove dead body (ClCorpse)
Reply With Quote #6

I have made this before start this topic (invisible die animation)!
But I need that the player after his death not watching his body (I mean the death animation).

How can I do that?
------------------------
I mean, when player die, his camera looks on his invisible dead body. Maybe anybody knows method to solve it?!

Last edited by analogg; 07-13-2012 at 17:00.
analogg is offline
Lolz0r
Veteran Member
Join Date: Nov 2010
Location: Balgaria
Old 07-13-2012 , 18:17   Re: Can't remove dead body (ClCorpse)
Reply With Quote #7

Try this :

Code:
#include <amxmodx> #include <fakemeta> #include <hamsandwich> public plugin_init() {         register_plugin( "Remove Corpse", "1.0", "Sylwester" )         set_msg_block( get_user_msgid( "ClCorpse" ), BLOCK_SET )         RegisterHam( Ham_Killed, "player", "player_killed", 1 ) } public player_killed( id ) {         set_pev( id, pev_effects, EF_NODRAW ) }

or this :

Code:
#include <amxmodx> #include <hamsandwich> #include <engine> #include <fakemeta> const m_pActiveItem = 373 public plugin_init()   {     RegisterHam( Ham_Killed, "player", "Ham_CBasePlayer_Killed_Post", 1 )     }   public Ham_CBasePlayer_Killed_Post( id, iKiller ) {     set_pev( id, pev_effects, pev( id, pev_effects ) | EF_NODRAW )     if( is_user_alive( iKiller ) )     {         new iActiveItem = get_pdata_cbase( iKiller, m_pActiveItem )         if( iActiveItem > 3 )         {             engfunc( EngFunc_SetView, id, iActiveItem )         }     } }
Lolz0r is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-14-2012 , 03:37  
Reply With Quote #8

Not sure if you guys understand him. In cs when you die a death anim is played. The player who died gets to watch himself die. He wants to remove the anim and instantly go to spectate
Doc-Holiday is offline
<VeCo>
Veteran Member
Join Date: Jul 2009
Location: Bulgaria
Old 07-14-2012 , 06:26   Re: Can't remove dead body (ClCorpse)
Reply With Quote #9

Quote:
Originally Posted by Doc-Holiday View Post
Not sure if you guys understand him. In cs when you die a death anim is played. The player who died gets to watch himself die. He wants to remove the anim and instantly go to spectate
The code with EF_NODRAW should work like this.
__________________
<VeCo> is offline
Doc-Holiday
AlliedModders Donor
Join Date: Jul 2007
Old 07-14-2012 , 11:37   Re: Can't remove dead body (ClCorpse)
Reply With Quote #10

Quote:
Originally Posted by <VeCo> View Post
The code with EF_NODRAW should work like this.
Should... I cant see code from my phone when i sent the message it just shows empty message.
Doc-Holiday 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 15:23.


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