Please I need answers, I have this error and I cannot fix it alone
johnsoul777 opened this issue · 1 comments
I put this code in my esx_rpchat
Server side
`RegisterCommand('mp', function(playerId, args, user)
if GetPlayerName(tonumber(args[1])) then
local target = tonumber(args[1])
table.remove(args, 1)
TriggerClientEvent('chat:addMessage', target, { templateId = 'barrio', multiline = true, args = {" MP de | "..GetPlayerName(playerId).. "[" .. playerId .. "]: ^7" ..table.concat(args, " ")}, color = {0, 237, 237}})
TriggerClientEvent('chat:addMessage', playerId, { templateId = 'barrio', multiline = true, args = {" MP enviado a | "..GetPlayerName(target).. "[" .. target .. "]: ^7" ..table.concat(args, " ")}, color = {0, 237, 237}})
else
TriggerClientEvent('chat:addMessage', playerId, "⚠️ SISTEMA", {255, 0, 0}, "ID de jugador incorrecta!")
end
end,false)`
Client Side
TriggerEvent('chat:addTemplate', 'barrio', "<img src='data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAyNC4zLjAsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCINCgkgdmlld0JveD0iMCAwIDkwMi41OSA3NTQuNyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAgOTAyLjU5IDc1NC43OyIgeG1sOnNwYWNlPSJwcmVzZXJ2ZSI+DQo8c3R5bGUgdHlwZT0idGV4dC9jc3MiPg0KCS5zdDB7c3Ryb2tlOiNGRkZGRkY7c3Ryb2tlLXdpZHRoOjI7c3Ryb2tlLW1pdGVybGltaXQ6MTA7fQ0KCS5z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LjEyLDQ3NS4yMiw0MTEuMzQsNTIzLjU1LDQwMy4wNHoiLz4NCgkJPHBhdGggaWQ9Ikxhem9fMSIgZD0iTTIxMy4xNSw0MTEuMjZjLTEzLjQ4LDQuODItMzEuOTksMC01MS43NywxNy40OGMzOC44LDIuMDYsNTcuMDEsMS4yNCw4NC43NS04LjMzDQoJCQljLTU3LjM1LTYwLjMyLTEwOC43NS00NC44LTE3NC4yNiwxNy42NGM2Ny42NywxOS43MiwxMzEuNiwzNC4xMiwxNjAuNywzLjU0Yy03MC45NCwxMC44LTk3LjY5LTIuMDEtMTI3LjUtMTAuOA0KCQkJQzE0NC42NiwzOTguMjUsMTc0LjQ4LDM4Ny4xLDIxMy4xNSw0MTEuMjZ6Ii8+DQoJCTxwYXRoIGQ9Ik0xNTcuMzEsNjAyLjgxYzE3NS45Mi0zMy43MiwxNjguMzEtMTU0LjAxLDE1OS4yMy0xNjIuNzVjLTM1LjEzLDE1Ljk0LTQxLjMsMjMuMTMtODAuMiw2MS40NQ0KCQkJYzI5LjY1LDAuNzYsMzguMTQtMTMuNDgsNjMuNi0yOC44NWMtMTYuOTcsNDUuNzUtNzAuMDMsOTguODUtMTE2LjgxLDEwMi40NWMxNC4zOS03My41Miw3NC45LTEyMC45LDEwMS4yOS0xNDIuNDkNCgkJCUMyMDguMTYsNDMyLjIsMTU3LjA4LDU2OS44MSwxNTcuMzEsNjAyLjgxeiIvPg0KCTwvZz4NCjwvZz4NCjxnIGlkPSJDYXBhXzIiPg0KPC9nPg0KPC9zdmc+DQo=' height='16'> <b>{0}</b>: {1}")
I follow the instructions in https://docs.fivem.net/docs/resources/chat/events/chat-addTemplate/
but, it only works when I restart the resource, if I exit and re-enter the server I receive this error
Cool, there's an amazing thing called discord where support is given, unlike GitHub (which is here to report something broken, not that you broke something).