added message warelock & added server request warelock

update
rubin 2 years ago
parent 8491561766
commit b93539556e
  1. 27
      mafia-tools.lua

@ -600,6 +600,16 @@ menu.update = function()
end, config.data.mhcars.offset_wait, "Введите на сколько секунд раньше нужно начать флудить"}
end
},
{ -->> Запрос открыть склад
title = "{"..config.data.font.color1.."}"..">{ffffff} Запрос открыть склад",
click = function(button, list, input , outs)
if button ~= 1 then return end
request.warelock = true
request.wait = 0
menu.show = { true, "main" }
end
},
}
},
["edit"] = {
@ -1087,7 +1097,7 @@ get_guns.loop = function()
end
table.remove(get_guns.messages, 1)
end
if #get_guns.warelock_send > 0 then
if #get_guns.warelock_send > 0 and antiflood.get() > 700 then
if get_guns.warelock_send[1][1] < os.time() then
if get_guns.warelock_send[1][2] == get_guns.warehouse then
antiflood.send[#antiflood.send+1] = "/warelock"
@ -1320,7 +1330,7 @@ request.loop = function()
room = config.data.room,
send = request.send,
can_warelock = can_warelock,
request_warelock = request.warelock
request_warelock = request.warelock,
rand = os.clock()
}
request.send = {}
@ -1390,6 +1400,19 @@ request.handler = function(text)
end
end
end
--> warelock
if info["response_warelock"] ~= nil and info["response_warelock"] ~= "" then
addChatMessage(info["response_warelock"])
end
--> can_warelock
if info["can_warelock"] ~= nil and info["can_warelock"] then
get_guns.warelock_send = {
{ os.time(), false },
{ os.time() + config.data.get_guns.warelock_time, true }
}
end
end
return true
end

Loading…
Cancel
Save