View Single Post
Ezekiel
Member
Join Date: Mar 2004
Old 03-20-2004 , 16:24  
Reply With Quote #16

Code:
/* AMX Mod script * * (c) 2004, Ezekiel * This file is provided as is (no warranties). * * A plugin that will generate a value based on player kill minus player deaths * and kick if this value is below a certain value. * * Players with immunity won't be checked */ #include <amxmod> new RATIO = -5 // the number kills-deaths has to equal or be smaller than for the user to be kicked and banned new MINPLAYERS = 12 // number of players to be on server before plugin works new BANTIME = 240 // amount of time to ban people for (minutes) public plugin_init() {     register_plugin("Low Skill Kicker","1.0","Ezekiel")     return PLUGIN_CONTINUE } public client_disconnect(id) {     remove_task(id)     return PLUGIN_CONTINUE } public client_putinserver(id){     new param[1]     param[0] = id     set_task(300.0, "checkScore", id, param, 1) } kickPlayer(id) {     new name[32]     get_user_name(id, name, 31)     new uID = get_user_userid(id)     server_cmd("banid %d #%d", BANTIME, uID)     client_cmd(id, "echo ^"Sorry but you don't have a high enough score^"; disconnect")     client_print(0, print_chat, "%s was disconnected due to being shite!", name)     return PLUGIN_CONTINUE } public checkScore(param[]) {    new id = param[0]    if ((get_user_flags(id) & ADMIN_RESERVATION)) {       remove_task(id)       client_print(id, print_chat, "Score checking disabled due to immunity...you'd best not be shite! ")       return PLUGIN_CONTINUE    }    new PLAYERS = get_playersnum()    if ( PLAYERS >= MINPLAYERS) {       new FRAGS = get_user_frags(id)       new DEATHS = get_user_deaths(id)       new KD = FRAGS - DEATHS       if (KD <= RATIO)       {          kickPlayer(id)          return PLUGIN_CONTINUE       }       else {          return PLUGIN_CONTINUE       }    }    else {       return PLUGIN_CONTINUE    }    return PLUGIN_CONTINUE }

like that?
Ezekiel is offline