Raised This Month: $51 Target: $400
 12% 

Remove-ing Dead Body.


Post New Thread Reply   
 
Thread Tools Display Modes
hectorz0r
Senior Member
Join Date: Oct 2008
Old 12-16-2009 , 21:31   Re: Remove-ing Dead Body.
Reply With Quote #11

...
__________________


Last edited by hectorz0r; 04-10-2010 at 13:56.
hectorz0r is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-17-2009 , 00:43   Re: Remove-ing Dead Body.
Reply With Quote #12

You hadn't mentionned you want victim to see attacker's screen.
Try this (after most of death stuff has been proceeded):

PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"1)
}

public 
Ham_CBasePlayer_Killed_Post(idiKiller)
{
    
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
    
// engfunc(EngFunc_SetView, id, iKiller) // see next post

__________________
- tired and retired -

- my plugins -

Last edited by ConnorMcLeod; 12-17-2009 at 11:25.
ConnorMcLeod is offline
joropito
AlliedModders Donor
Join Date: Mar 2009
Location: pfnAddToFullPack
Old 12-17-2009 , 08:01   Re: Remove-ing Dead Body.
Reply With Quote #13

Mmmm
I guess I was wrong with attach_view

Quote:
attach_view
Syntax:

attach_view ( player, target )
Type:

Native
Notes:

player, is a player index from 1 to 32.
target, is an entity's index.

Note: Target must be an non-player entity and the target must have or be given a model for attach_view to work. Most commonly used model for this is "models/rpgrocket.mdl", also make sure to precache the model you use.
__________________

Divide et vinces
approved plugins | steam account

I don't accept PM for support. Just ask on forums.
If you're looking for private work, PM me.
joropito is offline
Send a message via MSN to joropito
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 12-18-2009 , 01:05   Re: Remove-ing Dead Body.
Reply With Quote #14

Quote:
Originally Posted by ConnorMcLeod View Post
You hadn't mentionned you want victim to see attacker's screen.
Try this (after most of death stuff has been proceeded):

PHP Code:
public plugin_init()
{
    
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"1)
}
 
public 
Ham_CBasePlayer_Killed_Post(idiKiller)
{
    
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
    
// engfunc(EngFunc_SetView, id, iKiller) // see next post


There a bug, you can't see the attacker body only he is moving.
__________________
ƒa†es™ is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-18-2009 , 11:34   Re: Remove-ing Dead Body.
Reply With Quote #15

Try this :

PHP Code:
const m_pActiveItem 373

public plugin_init()
{
    
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"1)
}

public 
Ham_CBasePlayer_Killed_Post(idiKiller)
{
    
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
    if( 
is_user_aliveiKiller ) )
    {
        new 
iActiveItem get_pdata_cbase(iKillerm_pActiveItem)
        if( 
iActiveItem )
        {
            
engfunc(EngFunc_SetViewidiActiveItem)
        }
    }

__________________
- tired and retired -

- my plugins -
ConnorMcLeod is offline
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 12-18-2009 , 11:50   Re: Remove-ing Dead Body.
Reply With Quote #16

Quote:
Originally Posted by ConnorMcLeod View Post
Try this :

PHP Code:
const m_pActiveItem 373
 
public plugin_init()
{
    
RegisterHam(Ham_Killed"player""Ham_CBasePlayer_Killed_Post"1)
}
 
public 
Ham_CBasePlayer_Killed_Post(idiKiller)
{
    
set_pev(idpev_effectspev(idpev_effects) | EF_NODRAW)
    if( 
is_user_aliveiKiller ) )
    {
        new 
iActiveItem get_pdata_cbase(iKillerm_pActiveItem)
        if( 
iActiveItem )
        {
            
engfunc(EngFunc_SetViewidiActiveItem)
        }
    }

PHP Code:
public Event_DeathMsg( )
{
         
engfuncEngFunc_SetOriginidFloat:{ -4800.0,-4800.0,-4800.0 } )

The view still stuck with the body, not with the attacker.
__________________
ƒa†es™ is offline
hectorz0r
Senior Member
Join Date: Oct 2008
Old 12-18-2009 , 12:10   Re: Remove-ing Dead Body.
Reply With Quote #17

...

Last edited by hectorz0r; 04-10-2010 at 13:55.
hectorz0r is offline
ƒa†es™
Senior Member
Join Date: May 2009
Location: Garena
Old 12-18-2009 , 12:53   Re: Remove-ing Dead Body.
Reply With Quote #18

Quote:
Originally Posted by hectorz0r View Post
ƒa†es™ the code posted by me is working, i've tested it myself right now.. why dont you use it instead of keep askin for new ones.
No, it's not working.

PHP Code:
public Event_DeathMsg( )
{
         new 
id read_data)
 
         
engfuncEngFunc_SetOriginidFloat:{ -4800.0,-4800.0,-4800.0 } )
         
set_pevidpev_effectsEF_NODRAW )

When client dead his screen still move to his own origin.
__________________
ƒa†es™ is offline
hectorz0r
Senior Member
Join Date: Oct 2008
Old 12-18-2009 , 12:59   Re: Remove-ing Dead Body.
Reply With Quote #19

...

Last edited by hectorz0r; 04-10-2010 at 13:55.
hectorz0r is offline
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 12-18-2009 , 17:34   Re: Remove-ing Dead Body.
Reply With Quote #20

Don't do engfunc( EngFunc_SetOrigin, id, Float:{ -4800.0,-4800.0,-4800.0 } ).
Use only #12 and don't register DeathMsg and set player origin.
__________________
- tired and retired -

- my plugins -
ConnorMcLeod 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 18:57.


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