I use something like this..
pawn Код:
new name[MAX_PLAYER_NAME];
new string[64];
GetPlayerName(playerid,name,sizeof(name));
name[strfind(name,"_")] = ' ';
format(string,sizeof(string),"Your name is %s",name);
SendClientMessage(playerid,COLOR_GREY,string);
It works and name is without underscore. And btw, its easier, you don't need to write some hard code to gain it. It just requests one line.