Add the below code to your sv_admin commands in [essential] resource folder.
This is live on our SLHGames Public Server
/911 “allows the user to call 911”
/dispatch “lets a dispatcher respond”
/me “a player is doing an action”
Also, Thanks to @Trouble for help
Did a small update, the other script kept crashing out and messing up for some reason so i redid it. This code works better
New code 2/6/2017
-This works 100%, But requires a new user permission at the top
-Also removed “is” from /me
local permission = {
kick = 1,
normal = 0,
ban = 3
}
-- 911 DISPATCHER
TriggerEvent('es:addAdminCommand', 'dispatch', permission.normal, function(source, args, user)
table.remove(args, 1)
TriggerClientEvent('chatMessage', -1, "^5[911]", {30, 144, 255}, " (^1 Dispatcher: ^3" .. GetPlayerName(source) .." | "..source.."^0 ) " .. table.concat(args, " "))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficienct permissions!")
end)
-- 911 CALL
TriggerEvent('es:addAdminCommand', '911', permission.normal, function(source, args, user)
table.remove(args, 1)
TriggerClientEvent('chatMessage', -1, "^5[911]", {30, 144, 255}, " (^1 Caller ID: ^3" .. GetPlayerName(source) .." | "..source.."^0 ) " .. table.concat(args, " "))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficienct permissions!")
end)
-- ME
TriggerEvent('es:addAdminCommand', 'me', permission.normal, function(source, args, user)
table.remove(args, 1)
TriggerClientEvent('chatMessage', -1, "^3[Me]", {255, 0, 0}, " (^2 " .. GetPlayerName(source) .." | "..source.."^0 ) " .. table.concat(args, " "))
end, function(source, args, user)
TriggerClientEvent('chatMessage', source, "SYSTEM", {255, 0, 0}, "Insufficienct permissions!")
end)