Files
Elite-Gaming-FiveM/resources/Commands/tweet.lua
T
KingMcDonalds 88b43a7915 iy6ggh
2023-06-06 13:40:19 -07:00

20 lines
474 B
Lua

AddEventHandler('chatMessage', function(source, name, msg)
sm = stringsplit(msg, " ");
if sm[1] == "/tweet" then
CancelEvent()
TriggerClientEvent('chatMessage', -1, "📶 Tweet | " .. name, { 87, 160, 211 }, string.sub(msg,7))
end
end)
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