local samp = require 'lib.samp.events'
function samp.onServerMessage(color, text)
if text:gsub('{......}',''):find('Номер игрока .+%[%d+%]%: .+') then
lua_thread.create(function() wait(100) -- чтоб оно из чата не исчезало
number = text:gsub('{......}',''):match('Номер игрока .+%[%d+%]%: (%d+)')
sampAddChatMessage(number,-1)
--wait(900)
--sampSendChat('/sms '..number..' mmmm')
end)
end
end
function sampev.onSendCommand(command)
if command:find("/sms (%d+)") then
lua_thread.create(function()
id = command:match("/sms (%d+)")
wait(100)
sampSendChat("/number "..tostring(id))
end)
--return false --это не отправлять /sms команду в чат
end
end