Raised This Month: $ Target: $400
 0% 

Kill/Death Script Help


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
SpyDevil
BANNED
Join Date: Jul 2010
Location: TURKiYE
Old 07-10-2010 , 06:56   Kill/Death Script Help
Reply With Quote #1

hi guyz. My friend wrote a script for me but there is a little problem at amx_banip. Can you help me for fix this pls ??

Code:
#include <amxmodx>
#include <amxmisc>

#define PLUGIN "Kill/Death Ban"
#define VERSION "0.0.2"
#define AUTHOR "AlicanC"


public plugin_init()
    {
    //Register plugin
    register_plugin(PLUGIN, VERSION, AUTHOR)
    
    //Register DeathMsg event
    register_event("DeathMsg", "Event_DeathMsg", "a")
    
    //Create ConVars
    if(!cvar_exists("kdban_kills"))
        {
        register_cvar("kdban_kills", "25", FCVAR_SERVER)
        }
    if(!cvar_exists("kdban_mindeaths"))
        {
        register_cvar("kdban_mindeaths", "2", FCVAR_SERVER)
        }
    }

public Event_DeathMsg()
    {
    //Find the attacker
    new attacker= read_data(1);
    //Get death and kill count
    new deaths= get_user_deaths(attacker);
    new kills= get_user_frags(attacker);
    //Check kills
    if(kills>=get_cvar_num("kdban_kills"))
        {
        //Check deaths
        if(deaths<=get_cvar_num("kdban_mindeaths"))
            {
            new ip[12];
            get_user_ip(attacker, ip, 12, 1)
            server_cmd("amx_banip %s", ip)
            server_exec();
            }
        }
    }
when player frag be 25, not banned by server. I think server says; couldnt find id or username. pls help. thanks.

Last edited by SpyDevil; 07-10-2010 at 08:09.
SpyDevil is offline
Send a message via ICQ to SpyDevil Send a message via MSN to SpyDevil
 



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 07:12.


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