• Setting networked variable "PlayerName" changes the variable everywhere but chat
    3 replies, posted
Excuse my incompetence or ignorance regarding this situation, I am searching for a solution which I do not have the skills to find. I am referring to a script in which the networked string "PlayerName" is set to another string. target_ply:SetNWString("PlayerName",name) where: target_ply is the target. name is the name to be set. Everything works with one exception, the nickname given in chat will always be the original name of the player. In this screenshot, "goofball124" was renamed to "Test_name" https://files.facepunch.com/forum/upload/185228/768c566f-88f4-4267-989a-7bcede9b7c55/20180312180108_1.jpg I want to avoid using the "OnPlayerChat" hook because it appears to break a different script that I am using. I would appreciate any support or suggestions.
local ply = FindMetaTable("Player") function ply:SetNick(nick)     self:SetNWString("Custom_Nickname", nick) end function ply:Nick()     return self:GetNWString("Custom_Nickname") end If you don't set a nick then it just defaults to the steam name. Also make sure that you run it serverside...
Using "OnPlayerChat" hook separately from a script that I am using appears to break the other in the separate script. I have not tested whether or not this is the case with anything else so I'm willing to try. The last time I have tested was with a chat script which would give tags to players, and a Text to Speech plugin. My assumption is that because both of these scripts used "OnPlayerChat", Text to Speech was broken as a result.
I've read a bit more into the matter on the Ulysses Forums and found out that it is allegedly impossible to do, at least without coding your own script for chat and other uses. Thank you for the help regardless.
Sorry, you need to Log In to post a reply to this thread.