Well if you have an NPC-Server it's a simple case of just making a serverside part set the nickname, like this system example:
NPC Code:
if (actionserverside)
setplayerprop #n,#s(clientr.nickname);
//#CLIENTSIDE
if (created||timeout) {
if (!(strequals(#n,#s(clientr.nickname)))
triggeraction x,y,serverside,;
timeout=0.05;
}
If you aren't going to have an NPC-Server it's trickier, but can apparently be done by setting the players chat to "setnick nickname"
Both examples don't work offline though, anyway basically with NPC-Server any serverside NPcs can change players nicknames using setplayerprop #n. Without the same affect can be achieved by setting a players chat to 'setnick nickname'