AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Scripting Help (https://forums.alliedmods.net/forumdisplay.php?f=11)
-   -   reviw of a plugin (https://forums.alliedmods.net/showthread.php?t=102685)

StormZone 09-05-2009 04:16

reviw of a plugin
 
Code:

#include <amxmodx>

#define PLUGIN "Restrict_Names_Advanced"
#define VERSION "1.0"
#define AUTHOR "Alka & Jim"
public plugin_init()
{
        register_plugin(PLUGIN, VERSION, AUTHOR)
}
public kick(id)
{
        server_cmd("kick #%d ^"Change Your Name!You have a restrict name!^"", get_user_userid(id))
}
public client_connect(id)
{
        new name[32]
        get_user_name(id, name, 31)
        if(containi(name, "player") != -1 || containi(name, "unnamed") != -1 || containi(name, "hack") != -1 || containi(name, "admin") != -1 || containi(name, "`") != -1 || containi(name, "~") != -1)
        {
                kick(id)
                return
        }
        new i, c
        while((c = name[i++]))
        {
                switch(c)
                {
                        case 31, 32, 33, 34, 35, 36, 37, 38, 40, 41, 42, 64, 94, 123, 125:
                        {
                                kick(id)
                                return
                        }
                }
        }
}

Y found this plugin but it kick players with other characters like ( ) - etc and y dont want to.
How can y set it to kick only players with this characters # $ ' ` ~ and y dont want to kick the players for their name.
Y would realy apreciate y someone could help me.

StormZone 09-05-2009 09:03

Re: reviw of a plugin
 
no help at all?

fysiks 09-05-2009 12:45

Re: reviw of a plugin
 
In 5 hours? No. This is how forums work. You post. You wait (more than 5 hours; don't expect an answer for at least a few days).

Exolent[jNr] 09-05-2009 12:54

Re: reviw of a plugin
 
Don't bump until 2 weeks have passed since last post.

Brad 09-05-2009 15:30

Re: reviw of a plugin
 
But please do enjoy all the free bumping we are doing for you.

StormZone 09-05-2009 17:03

Re: reviw of a plugin
 
a lot of cheap talck but no help :cry:

Brad 09-05-2009 22:48

Re: reviw of a plugin
 
http://www.cppreference.com/wiki/ascii

fysiks 09-06-2009 00:53

Re: reviw of a plugin
 
Or just use single quotes aroung the character in your case statement (but you can't do that with the ' (single quote) character). It's much easier to comprehend that way. You can include the characters in:

Code:

containi(name, "`") != -1 || containi(name, "~") != -1
in your switch statement.

BTW, Y -> I. Go and translate the english word "I". I think I might have actually read your post had you not bumped it lol :).

StormZone 09-09-2009 03:03

Re: reviw of a plugin
 
after y connect with an restricted name it wont let me enter again just a an simple name.
no other char

fysiks 09-09-2009 03:11

Re: reviw of a plugin
 
http://translate.google.com/translat...tate0=#en|ro|I


All times are GMT -4. The time now is 14:59.

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