added getgun not arm

update
rubin 2 years ago
parent bd2a445140
commit 29463537b6
  1. 29
      mafia-tools.lua

@ -811,13 +811,7 @@ armoff.loop = function()
end end
end end
if os.time() - armoff.time < 3 and #config.data.armoff > 0 then if os.time() - armoff.time < 3 and #config.data.armoff > 0 then
local result = false if armoff.check() then
for i = 1, #config.data.armoff do
if config.data.armoff[i] == armoff.id then
result = true
end
end
if result then
local arm = getCharArmour(PLAYER_PED) local arm = getCharArmour(PLAYER_PED)
if arm > 0 and (armoff.antiflood == nil or os.time() - armoff.antiflood > 3) then if arm > 0 and (armoff.antiflood == nil or os.time() - armoff.antiflood > 3) then
armoff.antiflood = os.time() armoff.antiflood = os.time()
@ -827,6 +821,17 @@ armoff.loop = function()
end end
end end
end end
armoff.check = function()
local result = false
if os.time() - armoff.time < 3 then
for i = 1, #config.data.armoff do
if config.data.armoff[i] == armoff.id then
result = true
end
end
end
return result
end
-- HEALME -- HEALME
@ -1226,7 +1231,9 @@ get_guns.start_get = function()
if config.data.get_guns.list[i][2] > 0 then if config.data.get_guns.list[i][2] > 0 then
if get_guns.weapon[config.data.get_guns.list[i][3]] == nil or get_guns.weapon[config.data.get_guns.list[i][3]] < (config.data.get_guns.list[i][4] * config.data.get_guns.list[i][2]) then if get_guns.weapon[config.data.get_guns.list[i][3]] == nil or get_guns.weapon[config.data.get_guns.list[i][3]] < (config.data.get_guns.list[i][4] * config.data.get_guns.list[i][2]) then
for n = 1, config.data.get_guns.list[i][2] do for n = 1, config.data.get_guns.list[i][2] do
get_guns.list[#get_guns.list+1] = i - 1 if i ~= 7 or (i == 7 and not armoff.check()) then
get_guns.list[#get_guns.list+1] = i - 1
end
end end
end end
end end
@ -1428,13 +1435,12 @@ request.loop = function()
request.wait = 0 request.wait = 0
while true do while true do
wait(0) wait(0)
if os.time() - request.wait >= 5 then if isPlayerInMafia() and os.time() - request.wait >= 5 then
--> Может ли игрок открыть склад? --> Может ли игрок открыть склад?
local can_warelock = false local can_warelock = false
if config.data.stats.rank >= 8 and config.data.get_guns.warelock_auto then if config.data.stats.rank >= 8 and config.data.get_guns.warelock_auto then
can_warelock = true can_warelock = true
end end
request.wait = os.time() request.wait = os.time()
local request_table = { local request_table = {
sender = getLocalPlayerNickname(), sender = getLocalPlayerNickname(),
@ -1443,7 +1449,8 @@ request.loop = function()
send = request.send, send = request.send,
can_warelock = can_warelock, can_warelock = can_warelock,
request_warelock = request.warelock, request_warelock = request.warelock,
rand = os.clock() rand = os.clock(),
frac = config.data.stats.frac
} }
request.send = {} request.send = {}
request.warelock = false request.warelock = false

Loading…
Cancel
Save