Raised This Month: $ Target: $400
 0% 

Death Pre


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
GXLZPGX
Veteran Member
Join Date: Sep 2009
Old 08-13-2010 , 08:02   Death Pre
Reply With Quote #1

Alright, it creates the death message when a CT gets killed like its supposed to. But when a T gets killed, it wont show a death message. For example:

When a CT gets killed:



But when the T dies, it doesn't display a message at all.

Here is the code I used to block/create a new death message:

PHP Code:
stock create_deathmsg(idvictimheadshotweapon_name[])
{
    
message_begin(MSG_ALL,get_user_msgid("DeathMsg"),{0,0,0},0);
    
write_byte(id);
    
write_byte(victim);
    
write_byte(headshot);
    
write_string(weapon_name);
    
message_end();

PHP Code:
RegisterHamHam_Killed"player""eDeathPre"
PHP Code:
public eDeathPreiVictimiAttackershouldgib )
{
    if( 
cs_get_user_team(iVictim) == CS_TEAM_CT && cs_get_user_team(iAttacker) == CS_TEAM_T )
    {
        new 
frags get_user_frags(iAttacker)
        
set_user_fragsiAttackerfrags )
        
        
set_msg_block(get_user_msgid("DeathMsg"), BLOCK_SET);
        
create_deathmsg(0iVictim1"nothing");
        
        if( 
gInLR[iVictim] == true )
        {
            
gInLR[iVictim] = false;
            
gLastRequest false;
            
            return 
HAM_HANDLED;
        }
        
        return 
HAM_HANDLED;
    }
    
    return 
HAM_HANDLED;

__________________
Currently accepting payment US DOLLARS ONLY for custom plugins, contact me through PM.
GXLZPGX is offline
 



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 22:03.


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