function main()
if not isSampfuncsLoaded() or not isSampLoaded() then return end
while not isSampAvailable() do
wait(200)
end
sampRegisterChatCommand("re"--[[Поменяйте re на команду, какую хотите]], reconnect)
while true do
wait(0)
if res and time ~= nil then
sampDisconnectWithReason(quit)
wait(time*1000)
sampSetGamestate(1)
res= false
else if res and time == nil then
sampDisconnectWithReason(quit)
wait(15500)
sampSetGamestate(1)
res= false
end
end
end
end
function reconnect(param)
time = tonumber(param)
res = true
end