local sampev = require "lib.samp.events"
local keys = require "vkeys"
local enabled = false
function main()
if not isSampLoaded() or not isSampfuncsLoaded() then return end
while not isSampAvailable() do wait(100) end
while true do
if isKeyJustPressed(keys.VK_F2) then
enabled = not enabled
end
wait(0)
end
end
function sampev.onServerMessage(color, text)
if text:find("when this shows up") and enabled then
sampSendChat("/sendsthiscommand")
end
return {color, text}
end