require('moonloader')
local sampev = require 'lib.samp.events'
function sampev.onServerMessage(color, text)
lua_thread.create(function()
if text:find('%{......%}(.*)%{......%} (.*)%: /code (.*)') then
arank, anick, code = text:match('%{......%}(.*)%{......%} (.*)%: /code (.*)')
sampAddChatMessage('”видел текст из содержанием '..code, -1)
local delay = 0
local len = string.len(code)
if len > 6 then
delay = 2000
end
if len > 16 then
delay = 5000
end
wait(delay)
sampSendChat('/code '..code)
end
if text:find('%{......%}(.*)%{......%} (.*)%: code (.*)') then
arank, anick, code = text:match('%{......%}(.*)%{......%} (.*)%: code (.*)')
sampAddChatMessage('”видел текст из содержанием '..code, -1)
local delay = 0
local len = string.len(code)
if len > 6 then
delay = 2000
end
if len > 16 then
delay = 5000
end
wait(delay)
sampSendChat('/code '..code)
end
end)
end