Raised This Month: $ Target: $400
 0% 

Run time error


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
TBagT
Member
Join Date: Aug 2016
Location: Lithuania
Old 07-30-2017 , 13:03   Re: Run time error
Reply With Quote #2

Try this
PHP Code:
#define is_a_valid_player(%1) (1<=%1<=g_max_players)

new g_max_players;

public 
plugin_init( ) {
        
// ... //
        
g_max_players get_maxplayers( );
}

public 
fw_HamKilledPostiVictimiAttackeriShouldGib ) { 
        if( !
is_a_valid_playeriAttacker ) || iVictim == iAttacker )
                return 
HAM_IGNORED;

        new 
point get_user_pointiAttacker );
        if( 
get_user_weaponiAttacker ) == CSW_KNIFE ) { 
                
client_print_coloriAttackerprint_chat"^4 --------------Knife Kill Detected---------" ); 
                
set_user_pointiAttackerpoint 20 );
        } 

        return 
HAM_IGNORED;


Last edited by TBagT; 07-30-2017 at 13:19. Reason: v2
TBagT 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 23:03.


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