Skip to main content

aim_fire

Description

Fired when the rage aimbot shoots at a player.

Example

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

local function aim_fire(e)
local flags = {
e.teleported and "T" or "",
e.interpolated and "I" or "",
e.extrapolated and "E" or "",
e.boosted and "B" or "",
e.high_priority and "H" or ""
}

local group = hitgroup_names[e.hitgroup + 1] or "?"
print(string.format(
"Fired at %s (%s) for %d dmg (chance=%d%%, bt=%2d, flags=%s)",
entity.get_player_name(e.target), group, e.damage,
math.floor(e.hit_chance + 0.5), globals.toticks(e.backtrack),
table.concat(flags)
))
end

client.set_event_callback("aim_fire", aim_fire)

Arguments

IndexNameType
0Argument #0table

#0 - Properties

NameDescription
idShot ID, this can be used to find the corresponding aim_hit / aim_miss event
targetTarget player entindex
hit_chanceChance the shot will hit, depends on spread
hitgroupTargeted hit group, this is not the same thing as a hitbox
damagePredicted damage the shot will do
backtrackAmount of ticks the player was backtracked
boostedTrue if accuracy boost was used to increase the accuracy of the shot
high_priorityTrue if the shot was at a high priority record, like on shot backtrack
interpolatedPlayer was interpolated
extrapolatedPlayer was extrapolated
teleportedTarget player was teleporting (breaking lag compensation)
tickTick the shot was fired at. This can be used to draw the hitboxes using client.draw_hitboxes
xX world coordinate of the aim point
yX world coordinate of the aim point
zZ world coordinate of the aim point