Originally Posted by
Ni3ls
Do you have documentation of "CodeCallback_userinfochanged"?
CodeCallback_UserInfoChanged is called every time the 'userinfo' text has been changed (including your name) and is called before changing the client's user info data.
So 'self.name' is updated after executing the function clientuserinfochanged().
PHP Code:
CodeCallback_UserInfoChanged(clientNum)
{
oldname = self.name; // 'userinfo' text has not been processed yet.
name = self get_userinfo("name"); // Get player's name from the updated 'userinfo' text.
// Edit:
// Like IzNoGod said: check for name duplication here and restore the old name using renameclient(oldname) in case needed.
self clientuserinfochanged(); // Update the client's user info data.
}