Raised This Month: $ Target: $400
 0% 

remove dead body/ghost(don't know how to call it)?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-08-2006 , 01:40   remove dead body/ghost(don't know how to call it)?
Reply With Quote #1

when someone has a net problem then he is out, but his float body remain in game. what is this body? is it still an entity? and when next round start, it's gone. but now i run csdm with no round end. so there are so many this XX remaining in game. how to remove them? thanks a lot and +kamma
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 10-08-2006 , 02:02   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #2

By blocking the ClCorpse Event. There two ways you can block it. This code is setup for when CSDM is active. This should work with 2.1 not sure about 2.0

It not an entity either. Think it a brush or a temp entity or something.


PS. Not sure if this will block the ghost body for net problem but this will block the one left by player dying on a longer respawn time then 0.5 secs

Code:
#include <amxmodx> #include <csdm> #define OneWay new ClCorpse; public plugin_init() {     register_plugin("Corpses", "1.0", "What");     ClCorpse = get_user_msgid("ClCorpse");     #if !defined OneWay     register_message(ClCorpse, "Corpse");     #endif } #if defined OneWay public csdm_StateChange(csdm_state) {     switch(csdm_state)     {         case CSDM_ENABLE:             set_msg_block(ClCorpse, BLOCK_SET);         case CSDM_DISABLE:             set_msg_block(ClCorpse, BLOCK_NOT);     } } #else public Corpse() {     if(csdm_active())         return PLUGIN_HANDLED;     return PLUGIN_CONTINUE; } #endif
__________________
No private support via Instant Message
GunGame:SM Released

Last edited by teame06; 10-08-2006 at 02:12.
teame06 is offline
Send a message via AIM to teame06
jim_yang
Veteran Member
Join Date: Aug 2006
Old 10-09-2006 , 03:02   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #3

thank you! tested it for two days, it's excellent!
__________________
Project : CSDM all in one - 99%
<team balancer#no round end#entity remover#quake sounds#fake full#maps management menu#players punishment menu#no team flash#colored flashbang#grenade trails#HE effect#spawn protection#weapon arena#weapon upgrade#auto join#no weapon drop#one name>
jim_yang is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-31-2013 , 08:37   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #4

How to make this for individual players? I tried to get the player id and block it, seems like it doesn't work for me:

PHP Code:
enum
{    
    
ClCorpse_ModelName 1// string
    
ClCorpse_CoordX // long
    
ClCorpse_CoordY// long
    
ClCorpse_CoordZ// long
    
ClCorpse_Angle0 // coord
    
ClCorpse_Angle1// coord
    
ClCorpse_Angle2// coord
    
ClCorpse_Delay// long
    
ClCorpse_Sequence // byte
    
ClCorpse_ClassID// byte
    
ClCorpse_TeamID// byte
    
ClCorpse_PlayerID// byte
}

new 
g_MsgClCorpse

public plugin_init()
{
    
g_MsgClCorpse get_user_msgid("ClCorpse")
    
register_message(g_MsgClCorpse"Message_ClCorpse")
}

public 
Message_ClCorpse()
{    
    new 
id read_data(ClCorpse_PlayerID)
    
    if(
g_bBlockBody[id]) //this is for sure setted true
    
{
        
client_print(0print_chat"blocked corpse")
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_CONTINUE

__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-31-2013 , 11:31   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #5

If enum is ok, code is ok
__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 01-31-2013 at 11:31.
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 01-31-2013 , 11:37   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #6

Could you also test it please?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 01-31-2013 , 14:14   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #7

lol no, already used such code and was working.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 02-01-2013 , 06:40   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #8

I changed if(g_bBlockBody[id]) to if(is_user_connected(id)) and it still spawns the corpse.

Is there anyone else to test this beside arrogant connor?
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.
bibu is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 02-01-2013 , 06:43   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #9

I'm not arrogant, just telling you that the player id passed in the message is really the player id, so prevent corpse from being sent with index filter does work.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
bibu
Veteran Member
Join Date: Sep 2010
Old 02-01-2013 , 06:56   Re: remove dead body/ghost(don't know how to call it)?
Reply With Quote #10

Tell me where my fault is then? I could only test this on pod bots.

EDIT: Tested also on me, and I see myself in free look. Btw, I even made a debug message before getting the id.
__________________
Selling tons of my own private works.
Accepting paid work for clans and communities.
Don't hesitate to contact me.

Last edited by bibu; 02-01-2013 at 07:00.
bibu is offline
Reply


Thread Tools
Display Modes

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 04:50.


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