Raised This Month: $ Target: $400
 0% 

Automatic Kick


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Brad
AMX Mod X Team Member
Join Date: Jun 2004
Old 06-24-2006 , 14:14   Re: Automatic Kick
Reply With Quote #1

The Restrict Names plugin could do that.
__________________
Brad is offline
sen-me
Junior Member
Join Date: Jun 2006
Old 06-24-2006 , 14:54   Re: Automatic Kick
Reply With Quote #2

Hmmm, other question, what public function (example client_PreThink) will start, when a player connect to the server?
client_connect doesn't work...

or is this script false?

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

new bool:train=false

public plugin_init()
{
    register_plugin("Training", "1.0", "sen-me http://privat.multi-pages.de")
    register_concmd("amx_training", "training", ADMIN_KICK, " 1/2 on/off")
    register_cvar("mp_training", "0")
}

public training(id, level, cid)
{
    if(!cmd_access(id, level, cid, 2)) return PLUGIN_HANDLED
    
    new arg[5]
    read_argv(1, arg, 4)
    
    if(equal(arg, "1") || equal(arg, "on"))
    {
        if(get_cvar_num("mp_training") == 1) client_print(id, print_chat, "Clan training! Other ppl. kicked!")
        else client_print(0, print_chat, "Clan training! Other ppl. kicked!")
        
        train=true
        server_cmd("sv_restartround 5")
    }
    
    if(equal(arg, "0") || equal(arg, "off"))
    {
        train=false
        
        if(get_cvar_num("mp_training") == 1) client_print(id, print_chat, "Clan training OFF!")
        else client_print(0, print_chat, "Clan training OFF!")
    }
    
    return PLUGIN_HANDLED
}


public client_connect(id)
{
    if(!train) return PLUGIN_HANDLED
    
    new pName[32]
    get_user_name(id, pName, 31)
    
    if(!containi(pName, "$F3"))
    {
        new player = cmd_target(id, pName, 1), userid2
        
        if(!player) return PLUGIN_HANDLED
        
        userid2 = get_user_userid(player)
        
        if(get_cvar_num("mp_training") == 0) client_print(0, print_chat, "%L", LANG_PLAYER, "ADMIN_KICK_1", pName)
        
        server_cmd("kick #%d ^"%s^"", userid2, "Sorry, but here is training! Try it later again!")
    }
    
    return PLUGIN_HANDLED
}
sen-me is offline
twistedeuphoria
Veteran Member
Join Date: Jul 2004
Old 06-24-2006 , 16:09   Re: Automatic Kick
Reply With Quote #3

Try using client_putinserver.
__________________
twistedeuphoria is offline
Reply



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:56.


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