I am trying to use this chat script: nb-rpchat
The only problem is I cant seem to figure out how to make the chat say my players name instead of my steam name, I was told the line of code that must be edited is:
local sendername = GetPlayerName(player)
What do I need to replace this line of code with to display my players name for QBCore?
I figured it would be something like this, but the script is a shared script. I tried both of the lines of code and neither work, it just stops messages from showing up all together.
i tried both lines of code and this is what it says, does it not work because its a shared script or did i do something wrong? the code looks like this:
Chat["local"] = function(player,message)
local message = message or ""
local myData = QBCore.Functions.GetPlayerData()
local sendername = myData.charinfo.firstname.." "..myData.charinfo.lastname
local string = _U("local", sendername, message)
ProxDetector(20.0,player,string,COLOR_FADE1,COLOR_FADE2,COLOR_FADE3,COLOR_FADE4,COLOR_FADE5)
end