soggy.Documentation Back to Soggy ↗

aim_hit

Description

Fired when the rage aimbot hit a shot at a player.

Example

local hitgroup_names = {"generic", "head", "chest", "stomach", "left arm", "right arm", "left leg", "right leg", "neck", "?", "gear"}

local function aim_hit(e)
    local group = hitgroup_names[e.hitgroup + 1] or "?"

    print(string.format(
        "Hit %s in the %s for %d damage (%d health remaining)",
        entity.get_player_name(e.target), group, e.damage,
        entity.get_prop(e.target, "m_iHealth")
    ))
end

client.set_event_callback("aim_hit", aim_hit)

Arguments

IndexNameType
0Argument #0table

#0 - Properties

NameDescription
idShot ID, the corresponding aim_fire event has the same ID
targetTarget player entindex
hit_chanceActual hit chance the shot had
hitgroupHit group that was hit. This is not the same thing as a hitbox
damageActual damage the shot did

Type to search guides, functions and events.