|
|
|
@ -600,16 +600,6 @@ 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"] = { |
|
|
|
@ -969,14 +959,11 @@ get_guns.onServerMessage = function(color, message) |
|
|
|
|
if message:find("^ %d+/%d+ Матов | %d+/%d+ Аптечек") and os.time() - get_guns.check_warehouse_time < 2 then |
|
|
|
|
return false |
|
|
|
|
end |
|
|
|
|
if message:find("^ .+%[%d+%]: (.+)") and color == 33357823 then |
|
|
|
|
get_guns.messages[#get_guns.messages+1] = message:match("^ .+%[%d+%]: (.+)") |
|
|
|
|
end |
|
|
|
|
if message:find("^ .+ открыл%(а%) склад с оружием$") then |
|
|
|
|
get_guns.warehouse = true |
|
|
|
|
if not message:find(getLocalPlayerNickname()) then |
|
|
|
|
get_guns.warelock_send = {} |
|
|
|
|
if config.data.get_guns.auto_get_guns and get_guns.enter_textdraw then |
|
|
|
|
if config.data.get_guns.auto_get_guns and get_guns.enter_textdraw and isPlayerInWarehouse() then |
|
|
|
|
get_guns.start_get() |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
@ -1069,34 +1056,19 @@ get_guns.loop = function() |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if isPlayerInMafia() then |
|
|
|
|
if get_guns.enter_textdraw and isKeyCanBePressed() and isKeysPressed(config.data.get_guns.key) and not get_guns.getgun then |
|
|
|
|
get_guns.start_get() |
|
|
|
|
if get_guns.enter_textdraw and isPlayerInWarehouse() and isKeyCanBePressed() and isKeysPressed(config.data.get_guns.key) and not get_guns.getgun then |
|
|
|
|
if not get_guns.warehouse and config.data.stats.rank < 8 then |
|
|
|
|
request.warelock = true |
|
|
|
|
request.wait = 0 |
|
|
|
|
msg.add("Отправлен запрос") |
|
|
|
|
else |
|
|
|
|
get_guns.start_get() |
|
|
|
|
end |
|
|
|
|
else |
|
|
|
|
if isKeysPressed(config.data.get_guns.key) and get_guns.getgun then |
|
|
|
|
msg.add("Выполняется взятие ганов") |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if #get_guns.messages > 0 then |
|
|
|
|
if config.data.get_guns.warelock_auto and not get_guns.warehouse and config.data.stats.rank >= 8 then |
|
|
|
|
local result = false |
|
|
|
|
local text = split(get_guns.messages[1], " ") |
|
|
|
|
for i = 1, #config.data.get_guns.warelock_text do |
|
|
|
|
for p = 1, #text do |
|
|
|
|
if text[p] == config.data.get_guns.warelock_text[i] then |
|
|
|
|
result = true |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
if result then |
|
|
|
|
local rand = math.random(1, 5) |
|
|
|
|
get_guns.warelock_send = { |
|
|
|
|
{ os.time() + rand, false }, |
|
|
|
|
{ os.time() + config.data.get_guns.warelock_time + rand, true } |
|
|
|
|
} |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
table.remove(get_guns.messages, 1) |
|
|
|
|
end |
|
|
|
|
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 |
|
|
|
@ -1979,6 +1951,22 @@ function setKeys() |
|
|
|
|
until #key_combo > 0 and not isPress |
|
|
|
|
return key_combo |
|
|
|
|
end |
|
|
|
|
function isPlayerInWarehouse() |
|
|
|
|
local position = { |
|
|
|
|
{ 1379.8171, -20.1072, 1000.9240 }, |
|
|
|
|
{ 254.3029, 10.9711, 1504.5144 }, |
|
|
|
|
{ -225.0700, -74.8219, 1497.3340 } |
|
|
|
|
} |
|
|
|
|
local result = false |
|
|
|
|
for i = 1, #position do |
|
|
|
|
local x, y, z = getCharCoordinates(PLAYER_PED) |
|
|
|
|
local dist = getDistanceBetweenCoords3d(x, y, z, position[i][1], position[i][2], position[i][3]) |
|
|
|
|
if dist < 20.0 then |
|
|
|
|
result = true |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
return result |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
-->> UPDATE MODULE |
|
|
|
|
function openURL(url, fpath, message_off) |
|
|
|
|