Im using this for /anontwt and i got this error… How do I fix it so I don’t write a mistake?
Im want ingame /twitter and /anontwt and /ad And I don’t know anything because he keeps making mistakes.Thank you very much for the answers, help in advance.
if source == 0 then
print('esx_rpchat: you can\'t use this command from rcon!')
return
end
args = table.concat(args, ' ')
local name = GetPlayerName(source)
if Config.EnableESXIdentity then name = GetCharacterName(source) end
TriggerClientEvent('chat:addMessage', -1, { args = { _U('twt_prefix', 'Anonymous'), args }, color = { 0, 153, 204 } })
print(('%s: %s'):format(name, args))
this is what my chat looks like with edited esx_rpchat and chat-theme-civlifechat and the chat resource, dunno if my code works without the two other resources.
cfx> SCRIPT ERROR: @esx_rpchat/server/main.lua:9: attempt to index a nil value (
global ‘MySQL’)
handler (@esx_rpchat/server/main.lua:30)
handler (@chat/sv_chat.lua:15)
Tbence: teszt
SCRIPT ERROR: @esx_rpchat/server/main.lua:9: attempt to index a nil value (globa
l ‘MySQL’)
handler (@esx_rpchat/server/main.lua:30)
handler (@chat/sv_chat.lua:15)
cfx> SCRIPT ERROR: @esx_rpchat/server/main.lua:9: attempt to index a nil value (
global ‘MySQL’)
handler (@esx_rpchat/server/main.lua:30)
handler (@chat/sv_chat.lua:15)
Tbence: teszt
SCRIPT ERROR: @esx_rpchat/server/main.lua:9: attempt to index a nil value (globa
l ‘MySQL’)
handler (@esx_rpchat/server/main.lua:30)
handler (@chat/sv_chat.lua:15)
hmm, i just tried making a new esx server from scratch and copied it over and it worked like a charm when i replaced the chat and rpchat and installed chat-theme-civlifechat which is basically just a css script.
im not really that much into coding, just played around with the css code and added commands i needed.
did you delete the chat and rpchat before copying the scripts over?