I tried to block namechaning with this following script:
1
2
3
4
2
3
4
function name(id,old,new,forced) if forced == 0 then msg2(id,"Name changing is not allowed@C") return 1 end end addhook("name","name")
* No namechanging by players
* Script is able to change names
When player is alive, namechaning is blocked (forced is 0), but when player is dead the name will be changed on respawn (forced is now 1).
Is there a simple way to avoid this?
If anyone can figure out a good way, please let me know. Thank you!