AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Suggestions / Requests (https://forums.alliedmods.net/forumdisplay.php?f=12)
-   -   [REQ] HeadShot with fade colored (https://forums.alliedmods.net/showthread.php?t=174320)

pacheco 12-18-2011 18:25

[REQ] HeadShot with fade colored
 
When player kill someone with headshot, gives in your monitor, one screen fade colored.. (red or blue, etc) Thanks!!

kramesa 12-18-2011 20:16

Re: [REQ] HeadShot with fade colored
 
PHP Code:

#include <amxmodx>
#include <fun>

new Killer

public plugin_init()
{
    
register_event("DeathMsg""hook_death""a""1>0")
}

public 
hook_death()
{
    
Killer read_data(1)
    
    if((
read_data(3) == 1) && (read_data(5) == 0))
    {
        
message_begin(MSG_ONEget_user_msgid("ScreenFade"), {0,0,0}, Killer)
        
write_short(1<<10)
        
write_short(1<<10)
        
write_short(0x0000)
        
write_byte(0)
        
write_byte(0)
        
write_byte(200)
        
write_byte(75)
        
message_end()
        return 
PLUGIN_HANDLED
    
}
    else
    {
        return 
PLUGIN_HANDLED
    
}
    return 
PLUGIN_HANDLED


Blue Screen.

** Now works, i tested **

pacheco 12-19-2011 09:31

Re: [REQ] HeadShot with fade colored
 
Didn't work :s

kramesa 12-19-2011 09:34

Re: [REQ] HeadShot with fade colored
 
Try now.

pacheco 12-19-2011 09:42

Re: [REQ] HeadShot with fade colored
 
Thanks Kramesa, but didn't work too.

kramesa 12-19-2011 10:40

Re: [REQ] HeadShot with fade colored
 
Try now.

pacheco 12-19-2011 11:05

Re: [REQ] HeadShot with fade colored
 
Thanks very much brother!! works perfect

drekes 12-19-2011 12:37

Re: [REQ] HeadShot with fade colored
 
Quote:

Originally Posted by kramesa (Post 1615589)
** Now works, i tested **

You should test it before posting or at least be pretty sure it's gonna work.

xPaw 12-19-2011 16:03

Re: [REQ] HeadShot with fade colored
 
Improved.
PHP Code:

#include < amxmodx >

new g_iMsgScreenFade;

public 
plugin_init( )
{
    
register_event"DeathMsg""EventDeath""a""1>0""3=1" );
    
    
g_iMsgScreenFade get_user_msgid"ScreenFade" );
}

public 
EventDeath( )
{
    
message_beginMSG_ONE_UNRELIABLEg_iMsgScreenFade_read_data) );
    
write_short<< 10 );
    
write_short<< 10 );
    
write_short0x0000 );
    
write_byte);
    
write_byte100 );
    
write_byte240 );
    
write_byte75 );
    
message_end( );



pacheco 12-19-2011 16:23

Re: [REQ] HeadShot with fade colored
 
Thanks xPaw and Kramesa!


All times are GMT -4. The time now is 20:58.

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