|
|
|
@ -66,8 +66,6 @@ request.loop = function() |
|
|
|
|
addChatMessage("Сервер 'mafia-tools' не отвечает!") |
|
|
|
|
break |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
addChatMessage("pezdqa") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
@ -79,25 +77,20 @@ request.handler = function(text) |
|
|
|
|
msk_time.time = info["time"] |
|
|
|
|
end |
|
|
|
|
if info["result"] == "ok" then |
|
|
|
|
setClipboardText(inspect(info)) |
|
|
|
|
for sender, sender_data in pairs(info["data"]) do |
|
|
|
|
for key, v in pairs(sender_data) do |
|
|
|
|
if ammo_timer.data[key] ~= nil then |
|
|
|
|
if ammo_timer.data[key]["time"] < v["time"] then |
|
|
|
|
ammo_timer.data[key]["time"] = v["time"] |
|
|
|
|
if ammo_timer.data[key]["text"] ~= nil then |
|
|
|
|
ammo_timer.data[key]["text"] = v["text"] |
|
|
|
|
else |
|
|
|
|
|
|
|
|
|
end |
|
|
|
|
ammo_timer.data[key]["text"] = v["text"] |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
return true |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-->> AMMO TIMER |
|
|
|
|
ammo_timer = {} |
|
|
|
|
ammo_timer.last_ammo = "" |
|
|
|
@ -111,6 +104,28 @@ ammo_timer.onServerMessage = function(color, message) |
|
|
|
|
request.wait = 0 |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if message:find("Задание будет доступно через: ") then |
|
|
|
|
local p1, p2, p3 = string.match(message, "Задание будет доступно через: (%d+):(%d+):(%d+)") |
|
|
|
|
if(p3 == nil)then |
|
|
|
|
p1, p2 = string.match(message, "Задание будет доступно через: (%d+):(%d+)") |
|
|
|
|
end |
|
|
|
|
if(p1 ~= nil and p2 ~= nil)then |
|
|
|
|
local mhTimer = 0 |
|
|
|
|
if(p3 ~= nil)then |
|
|
|
|
mhTimer = tonumber(p1) * 3600 |
|
|
|
|
mhTimer = mhTimer + (tonumber(p2) * 60) |
|
|
|
|
mhTimer = mhTimer + tonumber(p3) |
|
|
|
|
else |
|
|
|
|
mhTimer = mhTimer + (tonumber(p1) * 60) |
|
|
|
|
mhTimer = mhTimer + tonumber(p2) |
|
|
|
|
end |
|
|
|
|
request.send[#request.send + 1] = { |
|
|
|
|
key = "mhcars", |
|
|
|
|
second = mhTimer |
|
|
|
|
} |
|
|
|
|
request.wait = 0 |
|
|
|
|
end |
|
|
|
|
end --> by Richard_Holmes |
|
|
|
|
end |
|
|
|
|
ammo_timer.data = { |
|
|
|
|
ls = { time = 0, text = "00:00:00" }, |
|
|
|
|