Hello everyone I have a question and I also managed to find the correct script, is there any script that cancels the normal chat on the “T” key? I have RP server and it is annoying to have normal chat since I use “/ ooc” for all the players, I wanted to put the normal chat just for proximity, only those who are close can see the normal chat and that the name appears the name RP and not the name in the server type wanted to appear Firstname Lastname: Text, only in normal and close chat
Do you see the GTA Online Chat? Or? Send a screenshot.
this chat show for all players, i need put the normal chat only proximity, and name RP Firstname Lastname: Text
1 Like
Thanks, but how do I put the name on the Firstname Lastname server instead of the one placed on the fivem?
im trying:
AddEventHandler('chatMessage', function(source, name, message)
if string.sub(message, 1, string.len("/")) ~= "/" then
local name = GetCharacterName(source) --- call function Fistname Lastname, but dont work
TriggerClientEvent("sendProximityMessage", -1, source, name, message)
end
CancelEvent()
end)
function GetCharacterName(source)
local result = MySQL.Sync.fetchAll('SELECT firstname, lastname FROM users WHERE identifier = @identifier', {
['@identifier'] = GetPlayerIdentifiers(source)[1]
})
if result[1] and result[1].firstname and result[1].lastname then
if Config.OnlyFirstname then
return result[1].firstname
else
return ('%s %s'):format(result[1].firstname, result[1].lastname)
end
else
return GetPlayerName(source)
end
end
thanks for the plug homie
1 Like