- 124
- 9
- Версия MoonLoader
- .026-beta
Всем здарова.
У меня с local не берёт инфу для onServerMessage, как решить?
Просто не могу понять, пытался сделать по никам, но ничего не получилось.
У меня с local не берёт инфу для onServerMessage, как решить?
Просто не могу понять, пытался сделать по никам, но ничего не получилось.
Lua:
local event = require 'lib.samp.events'
local nicks = {'Zig_Hi', 'Bober_Dorill', 'Penis_Bomja'}
sampRegisterChatCommand('ugs', function() if ugs then ugs = false sampAddChatMessage('Офф', 0xff6600) else ugs = true sampAddChatMessage('Вкл', 0x63cb00) end end)
function event.onServerMessage(col, text)
if ugs then
local nickUGS, idUGS = text:match('SMS: /sex | Отправитель: (%w+_%w+)%[(%d+)%]')
if nickUGS and idUGS then
lua_thread.create(function()
wait(150)
sampSendChat('/sms '..idUGS..' sex')
end)
end
end
end