model_context_t

model context can only be retrieved via the DRAW_MODEL callback in all examples below ctx is the player esp context

local function on_draw_model(ctx)
    if ctx.entity == nil then
        return
    end

    -- prevent all models from drawing
    ctx.override_original = true
end

callbacks.add(e_callbacks.DRAW_MODEL, on_draw_model)

Fields

FieldDescription

entity entity_t

entity that is being rendered right now, can be nil

model_name string

model name

override_original bool

prevents the original model code from running

Functions

draw_material

draws the model with the specified material

void draw_material(<material_t> material, [optional] <color_t> color)

draw_original

draws the model with the original material

void draw_original([optional] <color_t> color)

Last updated