Skip to content
Documentation
Free3Anti Hitbox

r_antihitbox Configuration

r_antihitbox config: what happens to a caught player, check timing, permissions, the command and the checked models.

All settings live in shared/config.lua. Restart the resource after changing it.

Actions

R.Debug = false               -- print every check to the server console

R.Action = 'kick'             -- what happens to a player with changed hitboxes: 'log', 'kick' or 'custom' (Custom.Punish in server/sv_custom.lua)
R.NoResponse = 'log'          -- what happens to a player whose game never answers the check: 'log', 'kick' or 'custom'
OptionDefaultWhat it does
R.DebugfalsePrints every answered check to the server console.
R.Action'kick'What happens to a player with changed hitboxes.
R.NoResponse'log'What happens to a player whose game never answers.

Both take the same three values:

ValueWhat it does
'log'Console line, admin alert and Discord log. The player stays.
'kick'The same, and the player is kicked with R.Text.kick.
'custom'The same, and Custom.Punish in server/sv_custom.lua runs.

A player is reported once for each reason, not on every check.

Check timing

R.Check = {
    interval = { 20, 40 },    -- seconds between checks, random inside this range for every player
    timeout = 20,             -- seconds a player has to answer one check
    strikes = 3,              -- unanswered checks in a row before R.NoResponse runs
    joinGrace = 120,          -- seconds after joining before the first check
}

R.Tolerance = 0.001           -- how far a size may be from the expected one
OptionDefaultWhat it does
interval{ 20, 40 }Seconds between checks, random for every player.
timeout20Seconds a player has to answer one check.
strikes3Missed checks in a row before R.NoResponse runs.
joinGrace120Seconds after joining before the first check. Raise it if players load slowly.
R.Tolerance0.001How far a size may be from the expected one. Leave it.

Permissions

R.AdminAce = 'r_antihitbox.admin'   -- can use the command and gets the alerts
R.BypassAce = 'r_antihitbox.bypass' -- never checked
R.NotifyAdmins = true         -- tell online admins when someone is caught

Give them in server.cfg:

add_ace group.admin r_antihitbox.admin allow
add_ace group.admin r_antihitbox.bypass allow

Command

R.Command = 'antihitbox'      -- /antihitbox save [name] | remove | list (admins only)
CommandWhat it does
/antihitbox save [name]Saves the size of the ped you are standing as. It is checked on every player from then on.
/antihitbox removeRemoves the ped you are standing as, if it was saved with the command.
/antihitbox listLists the checked models.

Models

R.Models = {                  -- expected model sizes. Add your own peds in game with /antihitbox save
    ['mp_m_freemode_01'] = { min = vec3(-0.6095175, -0.25, -1.3), max = vec3(0.6099811, 0.25, 0.945) },
    ['mp_f_freemode_01'] = { min = vec3(-0.6095175, -0.25, -1.3), max = vec3(0.6099811, 0.25, 0.945) },
}

Only listed models are checked. The two freemode models are in the config. Add any other player ped with /antihitbox save while standing as it. Saved peds are kept over restarts and updates, and a saved size wins over the config.

Save a ped only on a clean game with no hitbox mods. The size you save becomes the expected one.

The server console prints the saved sizes, so you can copy them into R.Models if you want them in the config.

Texts

Every message is in R.Text: the kick reason, the admin alerts and the command replies.

Custom file

server/sv_custom.lua is open:

FunctionWhat it's for
Custom.Kick(src, reason)Runs on 'kick'. reason is 'hitbox' or 'silent'.
Custom.Punish(src, reason, detail)Runs on 'custom'. Put your ban here. detail is the model name.
Custom.Notify(src, message)Admin alerts and command replies. Chat by default.
Custom.Log(src, message)The Discord log. The webhook is on the first line of the file.

Example ban with your own admin script:

function Custom.Punish(src, reason, detail)
    exports['your_admin']:Ban(src, 'Changed hitboxes')
end