thiscall = function(fn, arg)
return function(...)
return fn(arg, ...)
end
end
local sound_client = ffi.cast("uintptr_t**", utils.create_interface("engine.dll", "IEngineSoundClient003"))
local play_local = thiscall(ffi.cast(
"void*(__thiscall*)(void*, const char*, float, int, int, float)",
sound_client[0][12]
), sound_client)
function morgenjump(e)
if ozvuchka:get() then
gandon_index = entity.get(e.userid, true)
if (gandon_index == entity.get_local_player()) then
play_local("nl/morgenshtern/jumpsound/" .. jumpsound[utils.random_int(1, #jumpsound)] .. ".wav", 1, 100, 0, 0)
end
end
end