Raised This Month: $32 Target: $400
 8% 

kick all players


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
lqlqlq
Senior Member
Join Date: Jan 2008
Old 10-26-2011 , 12:49   kick all players
Reply With Quote #1

I need plugin - when all non admins players connecting to server - will get kicked + reason
Like a - "Server is still updating...Please rejoin after few minutes".

Thanks!

Last edited by lqlqlq; 10-26-2011 at 12:49.
lqlqlq is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 10-26-2011 , 12:58   Re: kick all players
Reply With Quote #2

You could just put a password and add in the server name to [UPDATING] ?
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 10-26-2011 , 12:59   Re: kick all players
Reply With Quote #3

No, i dont like this method i need a plugin for this.

Last edited by lqlqlq; 10-26-2011 at 12:59.
lqlqlq is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 10-26-2011 , 13:00   Re: kick all players
Reply With Quote #4

Try this one:
PHP Code:
#include <amxmodx>
#include <amxmisc>

public plugin_init()
    
register_plugin("server updating""1.0""thony")

public 
client_authorized(id) {
    if(!
is_user_admin(id)) {
        new 
name[33]
        
get_user_name(idnamecharsmax(name))
        
server_cmd("amx_kick ^"%s^" ^"Server is still updating... Please rejoin after few minutes.^""name)
    }

__________________
"If God exists, I hope he has a good excuse." - Woody Allen

Last edited by kotinha; 10-26-2011 at 14:09.
kotinha is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 10-26-2011 , 14:02   Re: kick all players
Reply With Quote #5

Both method's dont work..
lqlqlq is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 10-26-2011 , 14:09   Re: kick all players
Reply With Quote #6

Code #4 edited, try it again
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 10-26-2011 , 15:40   Re: kick all players
Reply With Quote #7

dont work again.
lqlqlq is offline
kotinha
Senior Member
Join Date: Jun 2009
Location: Alentejo, Portugal :)
Old 10-26-2011 , 15:55   Re: kick all players
Reply With Quote #8

oh sh*t, just ask someone else xD
__________________
"If God exists, I hope he has a good excuse." - Woody Allen
kotinha is offline
kramesa
Veteran Member
Join Date: Feb 2011
Location: Brazil
Old 10-26-2011 , 16:24   Re: kick all players
Reply With Quote #9

I update this plugin, look:

Command: amx_kickall = Kick all players on the server.

Cvars: sv_update 1 enable 0 disable = Kick players on connect the server.

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

#define PLUGIN "Updating Server"
#define VERSION "1.0"
#define AUTHOR "kramesa"

#define FLAG_A ADMIN_IMMUNITY  
#define _ACCESS ADMIN_CVAR

public plugin_init() 
{
    
register_plugin(PLUGINVERSIONAUTHOR)
    
    
register_cvar("sv_update","1",FCVAR_SERVER)                                           /* Kick players on join server */
    
register_concmd("amx_kickall","CmdKickAll",_ACCESS,"Kick all users on the server")    /* Kick all players */
}

public 
client_connect(id)
{
    if(
get_cvar_num("sv_update") <= 0)
        return
    
    
set_task(0.1,"DisconnectUser",id)
}

public 
CmdKickAll(id,level,cid)
{
    if(
get_user_flags(id) & ADMIN_IMMUNITY)
        return
    
    if(!
cmd_access(id,level,cid,1))
    {
        return 
    }
    
    
client_cmd(0,"toggleconsole")
    
client_cmd(0,"wait;wait;wait;wait;wait;wait; wait")
    
client_cmd(0,"clear")
    
client_cmd(0,"echo Server is still updating...")
    
client_cmd(0,"echo Please rejoin after few minutes.")
    
client_cmd(0,"disconnect")


public 
DisconnectUser(id)
{
    if(
get_user_flags(id) & ADMIN_IMMUNITY)
        return
    
    
server_cmd("kick #%d ^"%s^""get_user_userid(id), "Server is still updating... Please rejoin after few minutes."

__________________

Last edited by kramesa; 10-26-2011 at 18:10.
kramesa is offline
lqlqlq
Senior Member
Join Date: Jan 2008
Old 10-26-2011 , 17:00   Re: kick all players
Reply With Quote #10

Quote:
Originally Posted by kramesa View Post
Try is:
Thanks, but not working.
lqlqlq is offline
Reply


Thread Tools
Display Modes

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 01:55.


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