Hi all, so I have this code and was wondering why it won’t display the message to all players online. I have tried many things and its probably something simple lol.
The aim of it is to display a message to all players when the command is entered.
Client.lua
RegisterNetEvent('testmsg')
AddEventHandler('testmsg', function()
TriggerEvent('chatMessage', -1, "^8Test Message", string.sub(msg,5))
end)
function stringsplit(inputstr, sep)
if sep == nil then
sep = "%s"
end
local t={} ; i=1
for str in string.gmatch(inputstr, "([^"..sep.."]+)") do
t[i] = str
i = i + 1
end
return t
end