Raised This Month: $ Target: $400
 0% 

name/kick


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
SSJ2GOKU
Senior Member
Join Date: Oct 2005
Location: Belgium
Old 01-25-2007 , 18:43   Re: name/kick
Reply With Quote #1

the part containing the switch is never executed, because you close way too much methods

"} } }" the ones after the "return"

post the whole code pls because now it looks like you only showed a tiny bit and it ain't even parts that follow each other due to the "}"
SSJ2GOKU is offline
Send a message via MSN to SSJ2GOKU
Pamaliska
Senior Member
Join Date: Apr 2006
Location: Edinburgh, UK
Old 01-25-2007 , 19:21   Re: name/kick
Reply With Quote #2

*Re-opened*
Any suggstions, because I am clueless. It kicks players with [Cheater]Nick, but it also kicks players with such names as [clan tag]^Nick, or Nick@; why is it happening, the code shoud not check for special signs, but it does and kicks them.

Code:
  register_plugin(PLUGIN, VERSION, AUTHOR)
}
public kick(id)
{
        server_cmd("kick #%d ^"MY MESSAGE^"", get_user_userid(id))
}
public client_infochanged(id)
    {
        new name[32]
        get_user_name(id, name, 31)
        if(containi(name, "Cheater") != -1)
{
             kick(id)
             return
}
        new i, c
        while((c = name[i++]))
        {
                switch(c)
                {
                        case 33, 35, 36, 37, 38, 40, 41, 42, 64, 94, 123, 125:
                        {
                                kick(id)
                                return
                        }
                }
        }
}
P.S. that is the complete piece of code.

Last edited by Pamaliska; 01-26-2007 at 12:06.
Pamaliska 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 22:21.


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