Raised This Month: $ Target: $400
 0% 

Event_DeathMsg if server


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
ConnorMcLeod
Veteran Member
Join Date: Jul 2006
Location: France (95)
Old 10-27-2013 , 13:37   Re: Event_DeathMsg if server
Reply With Quote #2

Add in register_event filter "1>0" so you won't collect when killer is 0
In callback, check killer against maxplayers value
PHP Code:
new g_iMaxPlayers;

public 
plugin_init()
{
    
register_event("DeathMsg""Event_DeathMsg""a""1>0");
    
g_iMaxPlayers get_players();
}
    
public 
Event_DeathMsg()
{
    new 
killer read_data(1);
    if( 
killer g_iMaxPlayers )
    {
        return;
    }

    
g_iKillskiller ] ++;

__________________
- tired and retired -

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


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