local hooy = require 'lib.samp.events'
local lastCmd = ''
function hooy.onServerMessage(color,text)
name,sname, cmd = text:match('%[A%].-(%a+)_(%a+)%[%d+%]: /(.+)')
if name and sname and cmd then
cmds = {'kick','mute','ban','veh','jail','msg','offban','offwarn','warn','unjail','unmute','offunmute','spawn','banip'}
for k,v in pairs(cmds) do
if cmd:match(v) then
sampAddChatMessage("Press Home to accept form", 0xff0000)
lastCmd = '/'..cmd..' | '..name:match('%a')..'.'..sname
end
end
end
end
function main()
while not isSampAvailable() do wait(0) end
while true do wait(0)
if isKeyJustPressed(36) and #lastCmd > 2 then...