Вопрос помагите как написать custom hitsound на нл :)

Статус
В этой теме нельзя размещать новые ответы.
  • 36
  • 15
У нла есть такая штука под названием "маркет" и там есть луашки с открытым сурсом, собственно говоря, клаву в руки и погнал искать опен сурс hitsound(Там есть)
 
  • 81
  • 23
dd:
local ui_text = Menu.Text('Hitsound', 'Filepath: /csgo/sound/hitsounds | Note: Make sure file type is .wav')
local ui_enabled = Menu.Switch('Hitsound', 'Enabled', false)
local ui_sound_one = Menu.TextBox('Hitsound', 'Head shot', 64, 'Sound')
local ui_sound_two = Menu.TextBox('Hitsound', 'Body aim', 64, 'Sound')

Cheat.RegisterCallback('registered_shot', function(shot)
    local enabled = ui_enabled:Get()
    local headshot = ui_sound_one:Get()
    local bodyaim = ui_sound_two:Get()

    if not enabled then return end

    local hitbox = shot.hitgroup
    local reason = shot.reason

    if shot.reason ~= 0 then return end

    if hitbox == 1 then
        EngineClient.ExecuteClientCmd(string.format('playvol hitsounds/%s 1', headshot))
    else
        EngineClient.ExecuteClientCmd(string.format('playvol hitsounds/%s 1', bodyaim))
    end
end)
 
Статус
В этой теме нельзя размещать новые ответы.
Активность
Пока что здесь никого нет
Сверху Снизу