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.