Raised This Month: $ Target: $400
 0% 

EventDeathMsg


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
Snitch
Veteran Member
Join Date: Sep 2013
Location: Kazakhstan
Old 10-07-2014 , 18:35   EventDeathMsg
Reply With Quote #1

i have this code
Code:
public EventDeathMsg()
{
    static killer, victim, hs, cash;
    
    killer = read_data( 1 );
    victim = read_data( 2 );
    
    hs = read_data( 3 );
    
    if ( !is_user_connected( killer ) || !is_user_connected( victim ) )
        return 0;
    
    static CsTeams:teams[ 2 ];
    
    teams[ 0 ] = cs_get_user_team( killer );
    teams[ 1 ] = cs_get_user_team( victim );

    if ( teams[ 0 ] == teams[ 1 ] || teams[ 0 ] != CS_TEAM_T || teams[ 1 ] != CS_TEAM_CT )
        return 0;    
    
    if ( is_user_connected( killer ) && teams[ 0 ] == CS_TEAM_T )
    {
        cash = hs ? 100 : 100;
        
        user_give_cash( killer, cash );
        
        ColorChat( 0, NORMAL, "%s^x03 %s^x01 has killed^x03 %s^x01 and gain^x04 %i^x01 Cash.", g_szChatPrefix, GetUserName( killer ), GetUserName( victim ), cash );
    }

    return 0;
}
can someone add
CT Kill: Gain 50 cash + Message name kill name and gain amount cash
like this LINE
Quote:
if ( is_user_connected( killer ) && teams[ 0 ] == CS_TEAM_T )
{
cash = hs ? 100 : 100;

user_give_cash( killer, cash );

ColorChat( 0, NORMAL, "%s^x03 %s^x01 has killed^x03 %s^x01 and gain^x04 %i^x01 Cash.", g_szChatPrefix, GetUserName( killer ), GetUserName( victim ), cash );
}

Last edited by Snitch; 10-08-2014 at 06:45.
Snitch is offline
Send a message via Skype™ to Snitch
 



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 17:39.


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