require "lib.moonloader"
require 'lib.vkeys'
local on = require "lib.samp.events"
local imgui = require 'imgui'
local timer, nick, id, cmd, nan, tim = 0, '', '', '', '', 0
local sms = sampAddChatMessage
local font_flag = require('moonloader').font_flag
local my_font = renderCreateFont('Verdana', 12)
function main()
while true do wait(0)
if tim >= os.time() then renderFontDrawText(my_font, os.time() - tim, 10, 400, 0xFFFFFFFF) end
if isKeyDown(18) and isKeyDown(81) and timer <= os.time() then
if tim >= os.time() then
sampSendChat('/a '..nick..' у тебя есть пруфы на нарушение?')
timer = os.time() + 1.2
end
end
end
end
function on.onServerMessage(color, text)
if text:find('[A%] %(%w+_%w+)%[%d+]: (+)') and tim >= os.time() then
nan = text:match('(%w+_%w+)')
if nan == nick then
sampSendChat('/'..cmd..' //'..nick)
nick, id, cmd, nan = '', '', '', ''
end
elseif text:find('[A%] %(%w+_%w+)%[%d+]: /(%S+) (.+)',1) and tim <= os.time() then
nick, id, cmd = text:match('(%w+_%w+)%[%d+]: /((%S+ .+))')
tim = os.time() + 13
end
end