local samp = require('samp.events')
local time = 0
function change(text)
for arg in text:match("%((.-)%)"):gmatch("%S+") do
sampSendChat(text:gsub("%(.-%)", arg))
wait(time)
end
end
function samp.onSendChat(text)
if text:find('%(.-%)') then
lua_thread.create(change, text)
return false
end
end
function samp.onSendCommand(text)
if text:find('%(.-%)') then
lua_thread.create(change, text)
return false
end
end