When i send a message i get this error:
I have been looking for solutions but havent found any.
Heres the code from client\main.lua, lines 182-206
RegisterNetEvent("gcPhone:receiveMessage")
AddEventHandler("gcPhone:receiveMessage", function(message)
SendNUIMessage({event = 'updateMessages', messages = messages})
--SendNUIMessage({event = 'newMessage', message = message})
if message.owner == 0 then
local text = '~o~New Message'
if ShowNumberNotification == true then
text = '~o~New message from ~y~'.. message.transmitter
for _,contact in pairs(contacts) do
if contact.number == message.transmitter then
text = '~o~New message from ~g~'.. contact.display
break
end
end
end
SetNotificationTextEntry("STRING")
AddTextComponentString(text)
DrawNotification(false, false)
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1)
Citizen.Wait(300)
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1)
Citizen.Wait(300)
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1)
end
end)
So if anyone could help me with this problem id be thankful.