This is the fix I made, either the command name or /name can be used, chat is *always* visible so other people take note how they can change their name. I have to add that changing the name in TFC is particularly difficult, since Valve messed up:
http://forums.steampowered.com/forum...d.php?t=944223
Caution: This fix might not work in CS, I think for CS it needs an additional setinfo command. I made this specifically for TFC though, where simply typing name in console is sufficient.
Code:
/*
This plugin is originally by KyleD, I modified it slightly so you don't have to use a slash in front (useful if the keyboard layout isn't American).
I also fixed a major bug, originally global chat wasn't visible anymore because handle_say would *always* return PLUGIN_HANDLED.
version history
1.1 - inital release as described above
1.2 - minor change: made name change chat visiable so other players can see how it's done
*/
#include <amxmodx>
public plugin_init()
{
register_plugin("ChangeName", "1.2", "pizzahut")
register_concmd("say","handle_say")
}
public handle_say(id)
{
new message[128], command[7], name[32]
read_args(message,127)
remove_quotes(message)
strbreak(message, command, 6, name, 31)
if(equali(command, "name", 6) || equali(command, "/name", 6))
{
client_cmd(id, "name ^"%s^"", name)
// return PLUGIN_HANDLED
}
return PLUGIN_CONTINUE
}
__________________