Loading and using LUA Scripts written by other people: {% page-ref page="overview/using_lua_scripts.md" %}
Writing your own LUA Scripts:# gamesense.pub documentation
Loading and using LUA Scripts written by other people: {% page-ref page="overview/using_lua_scripts.md" %}
Writing your own LUA Scripts: {% page-ref page="development/getting_started.md" %} {% page-ref page="development/getting-started.md" %} {% page-ref page="development/getting_started" %} {% page-ref page="development/getting-started" %}
This website documents the configuration options, usage and LUA API of gamesense.pub.
{% page-ref page="https://github.com/h4xrOx/gamesense_docs/find/4f920eb67e2809c4e68dc64b0726c8ee4f6a625e" %}
- Home: {% page-ref page="./docs/docs/index..md" %}
- Getting Started: {% page-ref page="./for_users/getting_started.md" %}
- Features:
- Legitbot: {% page-ref page="./for_users/features/data/legitbot.md" %}
- Ragebot: {% page-ref page="./for_users/features/data/ragebot.md" %}
- Antiaim: {% page-ref page="./for_users/features/data/antiaim.md" %}
- Visuals: {% page-ref page="./for_users/features/data/visuals.md" %}
- Misc: {% page-ref page="./for_users/features/data/misc.md" %}
- Settings: {% page-ref page="./for_users/features/data/settings.md" %}
- Skinchanger: {% page-ref page="./for_users/features/data/skinchanger.md" %}
- Playerlist: {% page-ref page="./for_users/features/data/playerlist.md" %}
- Common issues & Troubleshooting: {% page-ref page="./for_users/common_issues_and_troubleshooting.md" %}
- Getting Started: {% page-ref page="./for_developers/getting_started.md" %}
- About: {% page-ref page="./for_developers/api/about.md" %} #Some basic info about api
- List: - _G: {% page-ref page="./for_developers/api/data/_G.md" %}
- bit: {% page-ref page="./for_developers/api/data/bit.md" %}
- client: {% page-ref page="./for_developers/api/data/client.md" %}
- config: {% page-ref page="./for_developers/api/data/config.md" %}
- cvar{}: {% page-ref page="./for_developers/api/data/cvar{}.md" %}
- database: {% page-ref page="./for_developers/api/data/database.md" %}
- entity: {% page-ref page="./for_developers/api/data/entity.md" %}
- globals: {% page-ref page="./for_developers/api/data/globals.md" %}
- json: {% page-ref page="./for_developers/api/data/json.md" %}
- materialsystem: {% page-ref page="./for_developers/api/data/materialsystem.md" %}
- materialsystem{}: {% page-ref page="./for_developers/api/data/materialsystem{}.md" %}
- ffi: {% page-ref page="./for_developers/api/data/ffi.md" %}
- vector{}: {% page-ref page="./for_developers/api/data/vector{}.md" %}
- panorama: {% page-ref page="./for_developers/api/data/panorama.md" %}
- plist: {% page-ref page="./for_developers/api/data/plist.md" %}
- renderer: {% page-ref page="./for_developers/api/data/renderer.md" %}
- ui: {% page-ref page="./for_developers/api/data/ui.md" %}
- Events: - About: {% page-ref page="./for_developers/events/about.md" %} #Some basic info about events - List: - Cheat Events: {% page-ref page="./for_developers/events/data/cheat_events.md" %}
- Source Events: {% page-ref page="./for_developers/events/data/source_events.md" %}
- "Counter-Strike: Global Offensive Events": {% page-ref page="./for_developers/events/data/csgo_events.md" %}
- Netprops: - About: {% page-ref page="./for_developers/netprops/about.md" %} - List: - DT_AnimTimeMustBeFirst: {% page-ref page="./for_developers/netprops/data/DT_AnimTimeMustBeFirst.md" %}
- DT_BaseEntity: {% page-ref page="./for_developers/netprops/data/DT_BaseEntity.md" %}
- Tips & Tricks: {% page-ref page="./for_developers/tips_and_tricks.md" %}
- name: material
- palette:
- scheme: gamesense
- navigation.instant
- navigation.tabs
- stylesheets/extra.css
- admonition
- pymdownx.snippets
- pymdownx.highlight
- pymdownx.superfences
- pymdownx.tabbed
- pymdownx.details
Documentation of the gamesense lua api
- Writing lua scripts
- [API Documentation]
- [Netprops]
-
- CAK47
- CBaseCSGrenade
- CBaseGrenade
- CBreachCharge
- CBumpMine
- CC4
- CDEagle
- CDecoyGrenade
- CEconEntity
- CFists
- CFlashbang
- CHEGrenade
- CIncendiaryGrenade
- CItem_Healthshot
- CItemCash
- CItemDogtags
- CKnife
- CKnifeGG
- CMelee
- CMolotovGrenade
- CSCAR17
- CSensorGrenade
- CSmokeGrenade
- CSnowball
- CTablet
- CWeaponAug
- CWeaponAWP
- CWeaponBaseItem
- CWeaponBizon
- CWeaponCSBase
- CWeaponCSBaseGun
- CWeaponCycler
- CWeaponElite
- CWeaponFamas
- CWeaponFiveSeven
- CWeaponG3SG1
- CWeaponGalil
- CWeaponGalilAR
- CWeaponGlock
- CWeaponHKP2000
- CWeaponM249
- CWeaponM3
- CWeaponM4A1
- CWeaponMAC10
- CWeaponMag7
- CWeaponMP5Navy
- CWeaponMP7
- CWeaponMP9
- CWeaponNegev
- CWeaponNOVA
- CWeaponP228
- CWeaponP250
- CWeaponP90
- CWeaponSawedoff
- CWeaponSCAR20
- CWeaponScout
- CWeaponSG550
- CWeaponSG552
- CWeaponSG556
- CWeaponShield
- CWeaponSSG08
- CWeaponTaser
- CWeaponTec9
- CWeaponTMP
- CWeaponUMP45
- CWeaponUSP
- CWeaponXM1014
- CWeaponZoneRepulsor
- ParticleSmokeGrenade
-
- CTEArmorRicochet
- CTEBaseBeam
- CTEBeamEntPoint
- CTEBeamEnts
- CTEBeamFollow
- CTEBeamLaser
- CTEBeamPoints
- CTEBeamRing
- CTEBeamRingPoint
- CTEBeamSpline
- CTEBloodSprite
- CTEBloodStream
- CTEBreakModel
- CTEBSPDecal
- CTEBubbles
- CTEBubbleTrail
- CTEClientProjectile
- CTEDecal
- CTEDust
- CTEDynamicLight
- CTEEffectDispatch
- CTEEnergySplash
- CTEExplosion
- CTEFireBullets
- CTEFizz
- CTEFootprintDecal
- CTEFoundryHelpers
- CTEGaussExplosion
- CTEGlowSprite
- CTEImpact
- CTEKillPlayerAttachments
- CTELargeFunnel
- CTEMetalSparks
- CTEMuzzleFlash
- CTEParticleSystem
- CTEPhysicsProp
- CTEPlantBomb
- CTEPlayerAnimEvent
- CTEPlayerDecal
- CTEProjectedDecal
- CTERadioIcon
- CTEShatterSurface
- CTEShowLine
- CTESmoke
- CTESparks
- CTESprite
- CTESpriteSpray
- CTEWorldDecal
-
- CBaseAnimating
- CBaseAnimatingOverlay
- CBaseAttributableItem
- CBaseButton
- CBaseCombatCharacter
- CBaseCombatWeapon
- CBaseDoor
- CBaseEntity
- CBaseFlex
- CBaseParticleEntity
- CBasePlayer
- CBasePropDoor
- CBaseTeamObjectiveResource
- CBaseTempEntity
- CBaseToggle
- CBaseTrigger
- CBaseViewModel
- CBaseVPhysicsTrigger
- CBaseWeaponWorldModel
-
- CAI_BaseNPC
- CBeam
- CBeamSpotlight
- CBoneFollower
- CBRC4Target
- CBreakableProp
- CBreakableSurface
- CCascadeLight
- CChicken
- CCSRagdoll
- CCSTeam
- CDangerZone
- CDrone
- CDronegun
- CDynamicLight
- CDynamicProp
- CEconWearable
- CEmbers
- CEntityDissolve
- CEntityFlame
- CEntityFreezing
- CEntityParticleTrail
- CFEPlayerDecal
- CFireCrackerBlast
- CFireSmoke
- CFireTrail
- CFish
- CFunc_Dust
- CFunc_LOD
- CFuncAreaPortalWindow
- CFuncBrush
- CFuncConveyor
- CFuncLadder
- CFuncMonitor
- CFuncMoveLinear
- CFuncOccluder
- CFuncReflectiveGlass
- CFuncRotating
- CFuncSmokeVolume
- CFuncTrackTrain
- CGameRulesProxy
- CGrassBurn
- CHandleTest
- CHostage
- CHostageCarriableProp
- CInferno
- CInfoLadderDismount
- CInfoMapRegion
- CInfoOverlayAccessor
- CLightGlow
- CMovieDisplay
- CParadropChopper
- CParticleFire
- CParticlePerformanceMonitor
- CParticleSystem
- CPhysBox
- CPhysBoxMultiplayer
- CPhysicsProp
- CPhysicsPropMultiplayer
- CPhysMagnet
- CPhysPropAmmoBox
- CPhysPropLootCrate
- CPhysPropRadarJammer
- CPhysPropWeaponUpgrade
- CPlantedC4
- CPlasma
- CPlayerPing
- CPlayerResource
- CPointCamera
- CPointCommentaryNode
- CPointWorldText
- CPrecipitation
- CPrecipitationBlocker
- CPredictedViewModel
- CProp_Hallucination
- CPropCounter
- CPropDoorRotating
- CPropJeep
- CPropVehicleDriveable
- CRagdollManager
- CRagdollProp
- CRagdollPropAttached
- CRopeKeyframe
- CSceneEntity
- CSlideshowDisplay
- CSmokeStack
- CSnowballPile
- CSpatialEntity
- CSpotlightEnd
- CSprite
- CSpriteOriented
- CSpriteTrail
- CStatueProp
- CSteamJet
- CSurvivalSpawnChopper
- CTesla
- CTest_ProxyToggle_Networkable
- CTestTraceline
- CTriggerPlayerMovement
- CTriggerSoundOperator
- CVGuiScreen
- CWaterBullet
- CWorld
- CWorldVguiText
- DustTrail
- MovieExplosion
- RocketTrail
- SmokeTrail
- SporeExplosion
- SporeTrail
Fired every time the game renders a frame while being connected to a server. Can be used to draw to the screen using the renderer.* functions
Examples:
{% code-tabs %} {% code-tabs-item %}
client.set_event_callback("paint", function()
renderer.text(15, 15, 255, 255, 255, 255, nil, 0, "hello world")
end)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired every time the game renders a frame, even if you're in the menu. Can be used to draw to the screen using the renderer.* functions
Fired every time the game runs a command (usually 64 times a second, equal to tickrate) while you're alive. This is the best event for processing data that only changes when the game receives an update from the server, like information about other players.
Key | Description |
---|---|
chokedcommands | Amount of commands that the client has choked |
command_number | Current command number |
Fired every time the game prepares a move command that's sent to the server. This is ran before cheat features like antiaim and can be used to modify user input (view angles, pressed keys, movement) how it's seen by the cheat. For example, setting in_use = 1
will disable antiaim the same way pressing use key ingame does. This is the preferred method of setting user input and should be used instead of client.exec
whenever possible
Key | Description |
---|---|
chokedcommands | Amount of commands that the client has choked |
command_number | Current command number |
pitch | Pitch view angle |
yaw | Yaw view angle |
forwardmove | Forward / backward speed (-450 to 450) |
sidemove | Left / right speed (-450 to 450) |
move_yaw | Yaw angle that's used for movement. If not set, view yaw is used |
allow_send_packet | Set to false to make the cheat choke the current command (when possible) |
in_attack | IN_ATTACK Button |
in_jump | IN_JUMP Button |
in_duck | IN_DUCK Button |
in_forward | IN_FORWARD Button |
in_back | IN_BACK Button |
in_use | IN_USE Button |
in_cancel | IN_CANCEL Button |
in_left | IN_LEFT Button |
in_right | IN_RIGHT Button |
in_moveleft | IN_MOVELEFT Button |
in_moveright | IN_MOVERIGHT Button |
in_attack2 | IN_ATTACK2 Button |
in_run | IN_RUN Button |
in_reload | IN_RELOAD Button |
in_alt1 | IN_ALT1 Button |
in_alt2 | IN_ALT2 Button |
in_score | IN_SCORE Button |
in_speed | IN_SPEED Button |
in_walk | IN_WALK Button |
in_zoom | IN_ZOOM Button |
in_weapon1 | IN_WEAPON1 Button |
in_weapon2 | IN_WEAPON2 Button |
in_bullrush | IN_BULLRUSH Button |
in_grenade1 | IN_GRENADE1 Button |
in_grenade2 | IN_GRENADE2 Button |
in_attack3 | IN_ATTACK3 Button |
weaponselect | |
weaponsubtype |
Lets you override the camera position and angles
Key | Description |
---|---|
x | Camera X position |
y | Camera Y position |
z | Camera Z position |
pitch | Pitch view angle |
yaw | Yaw view angle |
fov | Field of view |
Fired every time the user types something in the game console and presses enter. Return true from the event handler to make the game not process the input
Property | |
---|---|
1 | console input text |
Examples:
{% code-tabs %} {% code-tabs-item %}
client.set_event_callback("console_input", function(text)
client.log("entered: '", text, "'")
end)
{% endcode-tabs-item %} {% endcode-tabs %}
This event lets you override the text drawn in the top left. There can only be one callback for this event. This event callback is invoked from print, client.log, client.color_log, "Missed due to spread" message, etc.
Key | Description |
---|---|
text | Drawn text |
r | Drawn color: Red 0-255 |
g | Drawn color: Green 0-255 |
b | Drawn color: Blue 0-255 |
a | Alpha 0-255 |
This event lets you lets you override how indicators are drawn. There can only be one callback for this event. This event callback is invoked from renderer.indicator and indicators like "DT".
Key | Description |
---|---|
text | Drawn text |
r | Drawn color: Red 0-255 |
g | Drawn color: Green 0-255 |
b | Drawn color: Blue 0-255 |
a | Alpha 0-255 |
Fired when a player sends a message to chat
Key | Description |
---|---|
teamonly | true if the message was sent to team chat |
entity | Entity index of the player sending the message |
name | Name of the player sending the message |
text | Chat message text |
Fired before a string command (chat messages, weapon inspecting, buy commands) is sent to the server.
Property | |
---|---|
1 | string command |
Fired before the game processes entity updates from the server. (FrameStageNotify FRAME_NET_UPDATE_START
) Be careful when using this event to modify entity data, some things have to be restored manually as not even a full update will update them
Fired after an entity update packet is received from the server. (FrameStageNotify FRAME_NET_UPDATE_END
)
Fired when the game prediction is ran
Key | Description |
---|---|
command_number | Command number of the predicted command |
Fired before a frame is rendered
Fired after a frame is rendered
Fired when the rage aimbot shoots at a player
Key | Description |
---|---|
id | Shot ID, this can be used to find the corresponding aim_hit / aim_miss event |
target | Target player entindex |
hit_chance | Chance the shot will hit, depends on spread |
hitgroup | Targeted hit group, this is not the same thing as a hitbox |
damage | Predicted damage the shot will do |
backtrack | Amount of ticks the player was backtracked |
boosted | True if accuracy boost was used to increase the accuracy of the shot |
high_priority | True if the shot was at a high priority record, like on shot backtrack |
interpolated | Player was interpolated |
extrapolated | Player was extrapolated |
teleported | Target player was teleporting (breaking lag compensation) |
tick | Tick the shot was fired at. This can be used to draw the hitboxes using client.draw_hitboxes |
x | X world coordinate of the aim point |
y | X world coordinate of the aim point |
z | Z world coordinate of the aim point |
Examples:
{% code-tabs %} {% code-tabs-item %}
local function time_to_ticks(t)
return floor(0.5 + (t / globals.tickinterval()))
end
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), time_to_ticks(e.backtrack), table.concat(flags)))
end
client.set_event_callback('aim_fire', aim_fire)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired when the rage aimbot hit a shot at a player
Key | Description |
---|---|
id | Shot ID, the corresponding aim_fire event has the same ID |
target | Target player entindex |
hit_chance | Actual hit chance the shot had |
hitgroup | Hit group that was hit. This is not the same thing as a hitbox |
damage | Actual damage the shot did |
Examples:
{% code-tabs %} {% code-tabs-item %}
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)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired when the rage aimbot missed a shot at a player
Key | Description |
---|---|
id | Shot ID, the corresponding aim_fire event has the same ID |
target | Target player entindex |
hit_chance | Actual hit chance the shot had |
hitgroup | Hit group that was missed. This is not the same thing as a hitbox |
reason | Reason the shot was missed. This can be 'spread', 'prediction error', 'death' or '?' (unknown / resolver) |
Examples:
{% code-tabs %} {% code-tabs-item %}
local hitgroup_names = {'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', '?', 'gear'}
local function aim_miss(e)
local group = hitgroup_names[e.hitgroup + 1] or '?'
print(string.format('Missed %s (%s) due to %s', entity.get_player_name(e.target), group, e.reason))
end
client.set_event_callback('aim_miss', aim_miss)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired before a config will be loaded
Fired after a config has been loaded
Fired before a config will be saved
Fired after a config has been saved
Fired every time the game renders a frame while being connected to a server. Can be used to draw to the screen using the renderer.* functions
Examples:
{% code-tabs %} {% code-tabs-item %}
client.set_event_callback("paint", function()
renderer.text(15, 15, 255, 255, 255, 255, nil, 0, "hello world")
end)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired every time the game renders a frame, even if you're in the menu. Can be used to draw to the screen using the renderer.* functions
Fired every time the game runs a command (usually 64 times a second, equal to tickrate) while you're alive. This is the best event for processing data that only changes when the game receives an update from the server, like information about other players.
Key | Description |
---|---|
chokedcommands | Amount of commands that the client has choked |
command_number | Current command number |
Fired every time the game prepares a move command that's sent to the server. This is ran before cheat features like antiaim and can be used to modify user input (view angles, pressed keys, movement) how it's seen by the cheat. For example, setting in_use = 1
will disable antiaim the same way pressing use key ingame does. This is the preferred method of setting user input and should be used instead of client.exec
whenever possible
Key | Description |
---|---|
chokedcommands | Amount of commands that the client has choked |
command_number | Current command number |
pitch | Pitch view angle |
yaw | Yaw view angle |
forwardmove | Forward / backward speed (-450 to 450) |
sidemove | Left / right speed (-450 to 450) |
move_yaw | Yaw angle that's used for movement. If not set, view yaw is used |
allow_send_packet | Set to false to make the cheat choke the current command (when possible) |
in_attack | IN_ATTACK Button |
in_jump | IN_JUMP Button |
in_duck | IN_DUCK Button |
in_forward | IN_FORWARD Button |
in_back | IN_BACK Button |
in_use | IN_USE Button |
in_cancel | IN_CANCEL Button |
in_left | IN_LEFT Button |
in_right | IN_RIGHT Button |
in_moveleft | IN_MOVELEFT Button |
in_moveright | IN_MOVERIGHT Button |
in_attack2 | IN_ATTACK2 Button |
in_run | IN_RUN Button |
in_reload | IN_RELOAD Button |
in_alt1 | IN_ALT1 Button |
in_alt2 | IN_ALT2 Button |
in_score | IN_SCORE Button |
in_speed | IN_SPEED Button |
in_walk | IN_WALK Button |
in_zoom | IN_ZOOM Button |
in_weapon1 | IN_WEAPON1 Button |
in_weapon2 | IN_WEAPON2 Button |
in_bullrush | IN_BULLRUSH Button |
in_grenade1 | IN_GRENADE1 Button |
in_grenade2 | IN_GRENADE2 Button |
in_attack3 | IN_ATTACK3 Button |
weaponselect | |
weaponsubtype |
Lets you override the camera position and angles
Key | Description |
---|---|
x | Camera X position |
y | Camera Y position |
z | Camera Z position |
pitch | Pitch view angle |
yaw | Yaw view angle |
fov | Field of view |
Fired every time the user types something in the game console and presses enter. Return true from the event handler to make the game not process the input
Property | |
---|---|
1 | console input text |
Examples:
{% code-tabs %} {% code-tabs-item %}
client.set_event_callback("console_input", function(text)
client.log("entered: '", text, "'")
end)
{% endcode-tabs-item %} {% endcode-tabs %}
This event lets you override the text drawn in the top left. There can only be one callback for this event. This event callback is invoked from print, client.log, client.color_log, "Missed due to spread" message, etc.
Key | Description |
---|---|
text | Drawn text |
r | Drawn color: Red 0-255 |
g | Drawn color: Green 0-255 |
b | Drawn color: Blue 0-255 |
a | Alpha 0-255 |
This event lets you lets you override how indicators are drawn. There can only be one callback for this event. This event callback is invoked from renderer.indicator and indicators like "DT".
Key | Description |
---|---|
text | Drawn text |
r | Drawn color: Red 0-255 |
g | Drawn color: Green 0-255 |
b | Drawn color: Blue 0-255 |
a | Alpha 0-255 |
Fired when a player sends a message to chat
Key | Description |
---|---|
teamonly | true if the message was sent to team chat |
entity | Entity index of the player sending the message |
name | Name of the player sending the message |
text | Chat message text |
Fired before a string command (chat messages, weapon inspecting, buy commands) is sent to the server.
Property | |
---|---|
1 | string command |
Fired before the game processes entity updates from the server. (FrameStageNotify FRAME_NET_UPDATE_START
) Be careful when using this event to modify entity data, some things have to be restored manually as not even a full update will update them
Fired after an entity update packet is received from the server. (FrameStageNotify FRAME_NET_UPDATE_END
)
Fired when the game prediction is ran
Key | Description |
---|---|
command_number | Command number of the predicted command |
Fired before a frame is rendered
Fired after a frame is rendered
Fired when the rage aimbot shoots at a player
Key | Description |
---|---|
id | Shot ID, this can be used to find the corresponding aim_hit / aim_miss event |
target | Target player entindex |
hit_chance | Chance the shot will hit, depends on spread |
hitgroup | Targeted hit group, this is not the same thing as a hitbox |
damage | Predicted damage the shot will do |
backtrack | Amount of ticks the player was backtracked |
boosted | True if accuracy boost was used to increase the accuracy of the shot |
high_priority | True if the shot was at a high priority record, like on shot backtrack |
interpolated | Player was interpolated |
extrapolated | Player was extrapolated |
teleported | Target player was teleporting (breaking lag compensation) |
tick | Tick the shot was fired at. This can be used to draw the hitboxes using client.draw_hitboxes |
x | X world coordinate of the aim point |
y | X world coordinate of the aim point |
z | Z world coordinate of the aim point |
Examples:
{% code-tabs %} {% code-tabs-item %}
local function time_to_ticks(t)
return floor(0.5 + (t / globals.tickinterval()))
end
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), time_to_ticks(e.backtrack), table.concat(flags)))
end
client.set_event_callback('aim_fire', aim_fire)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired when the rage aimbot hit a shot at a player
Key | Description |
---|---|
id | Shot ID, the corresponding aim_fire event has the same ID |
target | Target player entindex |
hit_chance | Actual hit chance the shot had |
hitgroup | Hit group that was hit. This is not the same thing as a hitbox |
damage | Actual damage the shot did |
Examples:
{% code-tabs %} {% code-tabs-item %}
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)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired when the rage aimbot missed a shot at a player
Key | Description |
---|---|
id | Shot ID, the corresponding aim_fire event has the same ID |
target | Target player entindex |
hit_chance | Actual hit chance the shot had |
hitgroup | Hit group that was missed. This is not the same thing as a hitbox |
reason | Reason the shot was missed. This can be 'spread', 'prediction error', 'death' or '?' (unknown / resolver) |
Examples:
{% code-tabs %} {% code-tabs-item %}
local hitgroup_names = {'generic', 'head', 'chest', 'stomach', 'left arm', 'right arm', 'left leg', 'right leg', 'neck', '?', 'gear'}
local function aim_miss(e)
local group = hitgroup_names[e.hitgroup + 1] or '?'
print(string.format('Missed %s (%s) due to %s', entity.get_player_name(e.target), group, e.reason))
end
client.set_event_callback('aim_miss', aim_miss)
{% endcode-tabs-item %} {% endcode-tabs %}
Fired before a config will be loaded
Fired after a config has been loaded
Fired before a config will be saved
Fired after a config has been saved