local samp = require('samp.events')
local state = false
function main()
while not isSampAvailable() do wait(0) end
sampRegisterChatCommand('koleso', function ()
state = not state
printStringNow(state and '~g~enabled' or '~r~disabled', 2000)
end)
while true do
wait(0)
if state then
setGameKeyState(21, 1)
wait(100)
end
end
end
function samp.onShowDialog(id, _, title)
if state and title:find('Колесо фортуны') then
sampSendDialogResponse(id, 1, 0, '')
return false
end
end