function main()
if not init then
while not isSampAvailable() do wait(100) return false end
sampRegisterChatCommand("test123", function()
active = not active
sampAddChatMessage(active and "ON" or "OFF", -1)
end)
init = true
end
if active then
-- А тут уже что угодно.
end
return false
end