I am looking for the old 911 chat script, I have been through the forums for 2 days looking with no luck, I have even tried to piece it together with the FiveM- Core and I cant get it working. If anybody knows where about it might be hiding or knows how to implement it into the chat we would be greatly appreciated… Thanks
Did you ever find that script?
AddEventHandler('chatMessage', function(source, name, msg)
sm = stringsplit(msg, " ");
if sm[1] == "/911" then
CancelEvent()
TriggerClientEvent('chatMessage', -1, "[911] " .. name, { 255, 0, 0 }, string.sub(msg,5))
end
end)
function stringsplit(self, delimiter)
local a = self:Split(delimiter)
local t = {}
for i = 0, #a - 1 do
table.insert(t, a[i])
end
return t
end
Ok, So this is the server.lua? and then just create a resource.lua for the script? Sorry, I haven’t payed too much attention to coding as I am primarily just the server computer host.
It worked! Thank you!!
yeah just throw it in a file call it whatever e.g. “server.lua” then make a file called “__resource.lua” and put server_script ‘server.lua’ in there.
Works great, Thanks
Yeah there would be a way but you would have to have a database setup and then add code in the 911 script to check if user identifier (ip or steam id) is in table if so then display. I personally don’t want it and don’t have time to do it myself but I’m sure someone here could do it
Thats perfect… No worries it helps alot, I’m sure ill figure it out… Thanks much