Raised This Month: $ Target: $400
 0% 

Auto kicking say brb script help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-28-2005 , 04:01   Auto kicking say brb script help
Reply With Quote #1

Ok here my problem when someone get kick for saying brb or /brb on my server. When they have a name like "W. People" when it does it kick. It list the reason as "People".

Quote:
You have been disconnected from the server.
Reason: Kicked: "People"
How can i fix this to this

Quote:
You have been disconnected from the server.
Reason: Kicked
or
Quote:
You have been disconnected from the server.
Reason: Kicked: "You have been auto kicked by the server."
Code:
#include <amxmodx>
#include <amxmisc>

public brbkick( id ) {

    new name[34]
    get_user_name(id,name,32)

    if ( get_user_flags(id) & ADMIN_IMMUNITY ) return PLUGIN_CONTINUE
    else
    {
        server_cmd("amx_kick %s",name, "You have been autokick by the server.")
        client_print(0,print_chat,"[EniGmA] Server:  Autokicking %s", name)
    }

    return PLUGIN_HANDLED;
}

public plugin_init() {
    register_plugin("Kick Say Brb","0.1","EniGmA")
    register_clcmd("say /brb","brbkick")
    register_clcmd("say brb","brbkick")
    return PLUGIN_CONTINUE;
}
Thank you if you can help me.
teame06 is offline
Send a message via AIM to teame06
Extremeone
Senior Member
Join Date: Jan 2005
Old 02-28-2005 , 08:15  
Reply With Quote #2

well duh all that script does is kick anyone without ADMIN_IMMUNITY
looks like you took part of the code and thats all
Extremeone is offline
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-28-2005 , 09:48  
Reply With Quote #3

yea that what i want that script to do.
teame06 is offline
Send a message via AIM to teame06
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-28-2005 , 09:54  
Reply With Quote #4

You are passing two extra parameters to amx_kick, so you need another %s in your command..

Also, if you have spaces in one of the parameters (like the reason), then you should surround it in quotes, otherwise it will look like more than one parameter...

Code:
server_cmd("amx_kick %s %s", name, "^"You have been autokicked by the server.^"") // or just do: server_cmd("amx_kick %s ^"You have been autokicked by the server.^"", name)
xeroblood is offline
Send a message via MSN to xeroblood
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-28-2005 , 10:28  
Reply With Quote #5

Thanks xeroblood.

If their name is like W. People it won't say "You have been autokicked by the server.", but it will say People when they get kick for reason.
teame06 is offline
Send a message via AIM to teame06
xeroblood
BANNED
Join Date: Mar 2004
Location: Toronto, Canada
Old 02-28-2005 , 10:39  
Reply With Quote #6

Hrmm.. maybe try:

Code:
server_cmd("amx_kick ^"%s^" ^"You have been autokicked by the server.^"", name)

xeroblood is offline
Send a message via MSN to xeroblood
teame06
i have a hat
Join Date: Feb 2005
Location: Hat City
Old 02-28-2005 , 22:29  
Reply With Quote #7

Thanks xeroblood that fix it.
teame06 is offline
Send a message via AIM to teame06
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 13:58.


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