Bad nickname


Does anyone have a script that would change the banned nicknames to others?

Hi Steep, if a name is banned say with IW4MAdmin would it not be up to the player to change there name to rejoin. Or am I not getting the meaning of what you are asking?

I think he is referring to rude names, oh discriminators… and mad is right that it is the player’s responsibility to change it.

What you have to implement are your server rules and if you enter a rude name, for example, what is done is warnings and if you do not make the change, you are temporarily banned.

I think that is your request

Even if you use script in-game to change a players name it would not take effect until they left and came back. Think it is something to do with stopping name changers hacks.
So it would be best to let admin software to deal with kicking for badnames

But you would be looking at a script including code like:

if( == “badname”)
self setClientDvar(“name”, “goodname”);

Make a small script and add a setting to the config.

In config:

set sv_badnames "badname1 badname2 badname3 etc"

and run a script like:

init() {
	level endon("game_ended");
	badnames = strTok(getDvar("sv_badnames"), " ");
	while(1) {
		level waittill("connected", player);
		for(i=0;i<badnames.size;i++) {
			if( == badnames[i]) {
				iprintln( + " name changed. Bad name"); = "CID" + player getEntityNumber();

This is something I just made and is untested… just for you to get the idea.

1 Like

If the player change their name, the server won’t take effect until they rejoin. For server admins, we can actively change to change the in-game name… the player’s clientdvar will not be changed.

if( == “badname”) = “goodname”;

would work for you.

1 Like

thx all !
I’ll try to use this