dd6f569620
This reverts commit d4fe71a0263f53a8b407a2a790fc34fbb0e36406.
81 lines
2.7 KiB
Lua
81 lines
2.7 KiB
Lua
--[[AddEventHandler('chatMessage', function(source, name, msg)
|
|
sm = stringsplit(msg, " ");
|
|
if sm[1] == "/ooc" then
|
|
CancelEvent()
|
|
TriggerClientEvent('chatMessage', -1, "OOC | " .. name, { 128, 128, 128 }, string.sub(msg,5))
|
|
end
|
|
end)]]--
|
|
|
|
--local cmds = {{"ooc", "🔇OOC", "128, 128, 128"}, {"911", "📲 911", "30, 144, 255"}, {"ad", "📡 Advertisement", "255, 255, 51"}, {"", ""}, {"", ""}, {"", ""}, {"", ""}, {"", ""}}
|
|
|
|
--[[for c, v in pairs(cmds) do
|
|
RegisterCommand("ooc", function(source, args, raw)
|
|
local arg = args[1]
|
|
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "OOC | " .. GetPlayerName(source), { 128, 128, 128 }, string.sub(raw, 5))
|
|
end
|
|
end, false)
|
|
end]]--
|
|
|
|
-- Ignore above, under development
|
|
|
|
RegisterCommand("ooc", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "🔇OOC | " .. GetPlayerName(source), { 128, 128, 128 }, string.sub(raw, 5))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("911", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "📲 911 | " .. GetPlayerName(source), { 30, 144, 255 }, string.sub(raw, 5))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("ad", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "📡 Advertisement | " .. GetPlayerName(source), { 255, 255, 51 }, string.sub(raw, 4))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("atc", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "👨✈️ ATC | " .. GetPlayerName(source), { 255, 140, 0 }, string.sub(raw, 5))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("darkweb", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "👨💻 Dark Web | " .. GetPlayerName(source), { 0, 0, 0 }, string.sub(raw, 9))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("dispatch", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "📲 Dispatch | " .. GetPlayerName(source), { 30, 144, 255 }, string.sub(raw, 10))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("drugdeal", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "💊 Drug Deal | " .. GetPlayerName(source), { 0, 100, 0 }, string.sub(raw, 10))
|
|
end
|
|
end, false)
|
|
|
|
RegisterCommand("me", function(source, args, raw)
|
|
if (source > 0) then
|
|
TriggerClientEvent('chatMessage', -1, "Me | " .. GetPlayerName(source), { 255, 0, 0 }, string.sub(raw, 4))
|
|
end
|
|
end, false)
|
|
|
|
--[[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]]-- |