- 211
- 40
Не работает, хелп
Lua:
script_author("Mirrorka")
script_name("Sliver")
slot0 = require("vkeys")
slot2 = require("inicfg")
require("encoding").default = "CP1251"
u8 = require("encoding").UTF8
function main()
repeat wait(0) until isSampAvailable()
wait(1000)
sampRegisterChatCommand("f.time", time)
sampRegisterChatCommand("f.start", slivv)
slot0 = lua_thread.create(sliv)
sliv = false
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Script Released: {9A3C52}Mirrorka", 4915330)
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}All commands: {9A3C52}/f.time - ms || /f.start - CMD", 4915330)
sett = uv0.load(nil, "Flood.ini")
if sett == nil then
validate = false
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Flood.ini not found", 4915330)
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Script sent to reboot", 4915330)
uv0.save(restore, "Flood.ini")
wait(1001)
for slot4 = 1, 30, 1 do
sampAddChatMessage("", -1)
end
thisScript():reload()
wait(-1)
else
validate = true
wait(-1)
end
end
restore = {
settings = {
time = 0,
cmd = 0
}
}
function time(slot0)
sett = uv0.load(nil, "Flood.ini")
sett.settings.time = slot0
uv0.save(sett, "Flood.ini")
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Вы поставили значение для TIME:{4B0082} " .. slot0 .. "ms", 4915330)
end
function slivv(slot0)
sett = uv0.load(nil, "Flood.ini")
sett.settings.cmd = slot0
uv0.save(sett, "Flood.ini")
sliv = not sliv
if sliv then
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Задержка: " .. sett.settings.time .. "", 4915330)
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Флудер был запущен! ", 4915330)
else
sampAddChatMessage("{4B0082}[Flooder] {FFFFFF}Флудер был выключен! ", 4915330)
end
end
function sliv(slot0)
while true do
wait(0)
if sliv then
sett = uv0.load(nil, "Flood.ini")
wait(sett.settings.time)
sampSendChat(sett.settings.cmd, -1)
end
end
end