Подведи собственные итоги года совместно с YOUGAME и забери ценные призы! Перейти

Lua-скрипт Ищу LUA для аимвара

  • Автор темы Автор темы kibitka
  • Дата начала Дата начала
как же хочется крашика
Забаненный
Забаненный
Статус
Оффлайн
Регистрация
13 Янв 2019
Сообщения
1,549
Реакции
401
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
кр4 киньте мне луа для поляквара чтобы оно показывало миссы и попадания (в случае с ав будет hits:0 misses:999) ну да похуй
вот как это выглядит:
unknown (4).png
 
А такое вообще возможно в ав сделать?)


И лучше
Пожалуйста, авторизуйтесь для просмотра ссылки.
запость (noad)
 
А такое вообще возможно в ав сделать?)


И лучше
Пожалуйста, авторизуйтесь для просмотра ссылки.
запость (noad)
Я не думаю что там настолько хуёвый АПИ чтобы такое нельзя было сделать,это же не новый ресольвер,хотя это ав,там и это нельзя будет добавит:roflanzdarova:
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
не делают на ав это луа т.к misses будет зашкаливать
 
ну если кому-нибудь понадобится, то вot
Код:
Expand Collapse Copy
local hmr_reference = gui.Reference("VISUALS", "MISC", "Assistance")
local hmr_checkbox_enable = gui.Checkbox(hmr_reference, "hmr_checkbox_enable", "[HMR] Hit/Miss ratio", false)
local hmr_checkbox_reset = gui.Checkbox(hmr_reference, "hmr_checkbox_reset", "[HMR] Reset on round start", false)


local x,y = 80, 420
local font_scale = 20
local font = draw.CreateFont("Verdana", font_scale, 800)

local gun_fired = false

local tbl_other_weapons =
{
    "knife",
    "knife_t",
    "hegrenade",
    "smokegrenade",
    "molotov",
    "incgrenade",
    "flashbang",
    "decoy",
    "taser"
}

local tbl_shots =
{
    fired = 0,
    hit = 0,
    missed = 0,
    hit_chance = 0,
    miss_chance = 0
}

local function reset_shots()

    for index, shot in pairs(tbl_shots) do

        tbl_shots[index] = 0

    end

end

local function is_gun(weapon_name)

    for index, weapon in ipairs(tbl_other_weapons) do
      
        if(weapon_name == "weapon_"..weapon) then

            return false

        end

    end

    return true

end

local function update_shots(event)

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        reset_shots()

        return -1

    end

    local event_name = event:GetName()
  
    local local_player_index = client.GetLocalPlayerIndex()
    local local_player_info = client.GetPlayerInfo(local_player_index)


    if(event_name == "weapon_fire") then

        local player_id = event:GetInt("userid")
        local player_weapon = event:GetString("weapon")

        if(local_player_info["UserID"] == player_id and is_gun(player_weapon)) then

            tbl_shots.fired = tbl_shots.fired + 1
            gun_fired = true

        end

    elseif(event_name == "player_hurt") then

        local attacker_id = event:GetInt("attacker")
        local attacker_weapon = event:GetString("weapon")

        if( local_player_info["UserID"] == attacker_id and is_gun(attacker_weapon) and gun_fired) then

            tbl_shots.hit = tbl_shots.hit + 1
            gun_fired = false

        end

    elseif( event_name == "round_prestart" and hmr_checkbox_reset:GetValue() ) then

        reset_shots()

    end
end

local function main()

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        return -1

    end

    tbl_shots.missed = tbl_shots.fired - tbl_shots.hit
    tbl_shots.hit_chance = ( (tbl_shots.hit / tbl_shots.fired) * 100 )
    tbl_shots.miss_chance = ( (tbl_shots.missed / tbl_shots.fired) * 100 )

    draw.SetFont(font)

    draw.Color(255, 255, 255)
    draw.Text(x, y, "total: "..tbl_shots.fired)

    draw.Color(30, 190, 40)
    draw.Text(x, y + font_scale, "hit: "..tbl_shots.hit)

    draw.Color(200, 60, 40)
    draw.Text(x, y + font_scale*2, "miss: "..tbl_shots.missed)

    if(tbl_shots.fired > 0) then

        draw.Color(30, 95, 190)
        draw.Text(x, y + font_scale*3, tbl_shots.hit.." / "..tbl_shots.fired .." = "..string.format("%.2f", tbl_shots.hit_chance).."%" )

        draw.Color(25,175,115)
        draw.Text(x, y + font_scale*4, tbl_shots.missed.." / "..tbl_shots.fired .." = "..string.format("%.2f",  tbl_shots.miss_chance).."%" )

    end

end


client.AllowListener("weapon_fire")
client.AllowListener("player_hurt")
client.AllowListener("round_prestart")

callbacks.Register("FireGameEvent", update_shots)
callbacks.Register("Draw",  main)
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ну если кому-нибудь понадобится, то вot
Код:
Expand Collapse Copy
local hmr_reference = gui.Reference("VISUALS", "MISC", "Assistance")
local hmr_checkbox_enable = gui.Checkbox(hmr_reference, "hmr_checkbox_enable", "[HMR] Hit/Miss ratio", false)
local hmr_checkbox_reset = gui.Checkbox(hmr_reference, "hmr_checkbox_reset", "[HMR] Reset on round start", false)


local x,y = 80, 420
local font_scale = 20
local font = draw.CreateFont("Verdana", font_scale, 800)

local gun_fired = false

local tbl_other_weapons =
{
    "knife",
    "knife_t",
    "hegrenade",
    "smokegrenade",
    "molotov",
    "incgrenade",
    "flashbang",
    "decoy",
    "taser"
}

local tbl_shots =
{
    fired = 0,
    hit = 0,
    missed = 0,
    hit_chance = 0,
    miss_chance = 0
}

local function reset_shots()

    for index, shot in pairs(tbl_shots) do

        tbl_shots[index] = 0

    end

end

local function is_gun(weapon_name)

    for index, weapon in ipairs(tbl_other_weapons) do
     
        if(weapon_name == "weapon_"..weapon) then

            return false

        end

    end

    return true

end

local function update_shots(event)

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        reset_shots()

        return -1

    end

    local event_name = event:GetName()
 
    local local_player_index = client.GetLocalPlayerIndex()
    local local_player_info = client.GetPlayerInfo(local_player_index)


    if(event_name == "weapon_fire") then

        local player_id = event:GetInt("userid")
        local player_weapon = event:GetString("weapon")

        if(local_player_info["UserID"] == player_id and is_gun(player_weapon)) then

            tbl_shots.fired = tbl_shots.fired + 1
            gun_fired = true

        end

    elseif(event_name == "player_hurt") then

        local attacker_id = event:GetInt("attacker")
        local attacker_weapon = event:GetString("weapon")

        if( local_player_info["UserID"] == attacker_id and is_gun(attacker_weapon) and gun_fired) then

            tbl_shots.hit = tbl_shots.hit + 1
            gun_fired = false

        end

    elseif( event_name == "round_prestart" and hmr_checkbox_reset:GetValue() ) then

        reset_shots()

    end
end

local function main()

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        return -1

    end

    tbl_shots.missed = tbl_shots.fired - tbl_shots.hit
    tbl_shots.hit_chance = ( (tbl_shots.hit / tbl_shots.fired) * 100 )
    tbl_shots.miss_chance = ( (tbl_shots.missed / tbl_shots.fired) * 100 )

    draw.SetFont(font)

    draw.Color(255, 255, 255)
    draw.Text(x, y, "total: "..tbl_shots.fired)

    draw.Color(30, 190, 40)
    draw.Text(x, y + font_scale, "hit: "..tbl_shots.hit)

    draw.Color(200, 60, 40)
    draw.Text(x, y + font_scale*2, "miss: "..tbl_shots.missed)

    if(tbl_shots.fired > 0) then

        draw.Color(30, 95, 190)
        draw.Text(x, y + font_scale*3, tbl_shots.hit.." / "..tbl_shots.fired .." = "..string.format("%.2f", tbl_shots.hit_chance).."%" )

        draw.Color(25,175,115)
        draw.Text(x, y + font_scale*4, tbl_shots.missed.." / "..tbl_shots.fired .." = "..string.format("%.2f",  tbl_shots.miss_chance).."%" )

    end

end


client.AllowListener("weapon_fire")
client.AllowListener("player_hurt")
client.AllowListener("round_prestart")

callbacks.Register("FireGameEvent", update_shots)
callbacks.Register("Draw",  main)
самое главное это помочь вовремя
 
Обратите внимание, пользователь заблокирован на форуме. Не рекомендуется проводить сделки.
ну если кому-нибудь понадобится, то вot
Код:
Expand Collapse Copy
local hmr_reference = gui.Reference("VISUALS", "MISC", "Assistance")
local hmr_checkbox_enable = gui.Checkbox(hmr_reference, "hmr_checkbox_enable", "[HMR] Hit/Miss ratio", false)
local hmr_checkbox_reset = gui.Checkbox(hmr_reference, "hmr_checkbox_reset", "[HMR] Reset on round start", false)


local x,y = 80, 420
local font_scale = 20
local font = draw.CreateFont("Verdana", font_scale, 800)

local gun_fired = false

local tbl_other_weapons =
{
    "knife",
    "knife_t",
    "hegrenade",
    "smokegrenade",
    "molotov",
    "incgrenade",
    "flashbang",
    "decoy",
    "taser"
}

local tbl_shots =
{
    fired = 0,
    hit = 0,
    missed = 0,
    hit_chance = 0,
    miss_chance = 0
}

local function reset_shots()

    for index, shot in pairs(tbl_shots) do

        tbl_shots[index] = 0

    end

end

local function is_gun(weapon_name)

    for index, weapon in ipairs(tbl_other_weapons) do
     
        if(weapon_name == "weapon_"..weapon) then

            return false

        end

    end

    return true

end

local function update_shots(event)

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        reset_shots()

        return -1

    end

    local event_name = event:GetName()
 
    local local_player_index = client.GetLocalPlayerIndex()
    local local_player_info = client.GetPlayerInfo(local_player_index)


    if(event_name == "weapon_fire") then

        local player_id = event:GetInt("userid")
        local player_weapon = event:GetString("weapon")

        if(local_player_info["UserID"] == player_id and is_gun(player_weapon)) then

            tbl_shots.fired = tbl_shots.fired + 1
            gun_fired = true

        end

    elseif(event_name == "player_hurt") then

        local attacker_id = event:GetInt("attacker")
        local attacker_weapon = event:GetString("weapon")

        if( local_player_info["UserID"] == attacker_id and is_gun(attacker_weapon) and gun_fired) then

            tbl_shots.hit = tbl_shots.hit + 1
            gun_fired = false

        end

    elseif( event_name == "round_prestart" and hmr_checkbox_reset:GetValue() ) then

        reset_shots()

    end
end

local function main()

    if( entities.GetLocalPlayer() == nil or not hmr_checkbox_enable:GetValue() ) then

        return -1

    end

    tbl_shots.missed = tbl_shots.fired - tbl_shots.hit
    tbl_shots.hit_chance = ( (tbl_shots.hit / tbl_shots.fired) * 100 )
    tbl_shots.miss_chance = ( (tbl_shots.missed / tbl_shots.fired) * 100 )

    draw.SetFont(font)

    draw.Color(255, 255, 255)
    draw.Text(x, y, "total: "..tbl_shots.fired)

    draw.Color(30, 190, 40)
    draw.Text(x, y + font_scale, "hit: "..tbl_shots.hit)

    draw.Color(200, 60, 40)
    draw.Text(x, y + font_scale*2, "miss: "..tbl_shots.missed)

    if(tbl_shots.fired > 0) then

        draw.Color(30, 95, 190)
        draw.Text(x, y + font_scale*3, tbl_shots.hit.." / "..tbl_shots.fired .." = "..string.format("%.2f", tbl_shots.hit_chance).."%" )

        draw.Color(25,175,115)
        draw.Text(x, y + font_scale*4, tbl_shots.missed.." / "..tbl_shots.fired .." = "..string.format("%.2f",  tbl_shots.miss_chance).."%" )

    end

end


client.AllowListener("weapon_fire")
client.AllowListener("player_hurt")
client.AllowListener("round_prestart")

callbacks.Register("FireGameEvent", update_shots)
callbacks.Register("Draw",  main)
для ав?
 
Назад
Сверху Снизу