save this code in a file call it for eg rename.gsc then create a folder in your mod called scripts and put it in there
next open the gamemode file or files you wanna use and paste this line at the botton of the Callback_StartGameType() functionMonitor()
{
while(true)
{
if(getcvar("rename") != "")
{
string = getCvar("rename");
array = strTok(string, ":");
if (array.size == 2)
{
players = getentarray("player", "classname");
for(i = 0; i < players.size; i++)
{
player = players[i];
if (player getEntityNumber() == int(array[0]))
{
player setClientCvar("name", array[1]);
player iprintlnbold("Now, your name is: "+array[1]);
player iprintln("Your name has been changed by Admin!");
}
}
}
setCvar("rename", "");
}
}
}
this should work for now but the are other and better ways i would recommend a event based solutionthread scripts\rename::Monitor();