🌐Useful resources

Calculating fov between two points

local function CalculateFov(Start, End, Angle)
    local Direction = (End - Start):normalize()
    local Forward, Right, Up = math.angle_vectors(Angle)
    return math.max(math.deg(math.acos(Forward:dot(Direction))), 0)
end

local fov = CalculateFov(eye_pos, point_in_world, math.vec3(pitch, yaw, 0))

Bit utilities

Setting specific bits

bit.bset = function(number, b, value)
    if value ~= 0 then
        return bit.bor(number, bit.lshift(1, math.log(b, 2)))
    else
        return bit.band(number, bit.bnot(bit.lshift(1, math.log(b, 2))))
    end
end

cmd:set_buttons(bit.bset(cmd:get_buttons(), csgo.in_jump, 1))

FFI utilities

vtable_bind

vtable_thunk

Follow relative x86

Follows relative address and returns the real address

Credit: Panzerfaust

Misc

Inline hex colors on text

Example

Fade percentage

Last updated