Simple Non ES 911 Script


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
		TriggerClientEvent('chatMessage', -1, "[911] " .. name, { 255, 0, 0 }, string.sub(msg,5))

function stringsplit(self, delimiter)
	local a = self:Split(delimiter)
	local t = {}
	for i = 0, #a - 1 do
		table.insert(t, a[i])
	return t


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 :slight_smile:


@Modo Just an after-thought… Is there any way to only make this display to particular IP’s?


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