Skip to content

twinded_weapon_autoreload

An automatic weapon reload script for RedM. Automatically reloads weapons from ammo boxes in the player's inventory when the magazine is empty.

Dependencies

ResourceRequiredNotes
vorp_coreYesFramework
vorp_inventoryYesInventory system
twinded_libsYesFree shared library

Compatibility

VORP Framework only — this script uses the VORP ammo API for bullet management.

Installation

bash
ensure twinded_libs
ensure twinded_weapon_autoreload

Config Files

FileDescription
settings.luaDebug mode, check interval, weapon list with ammo types

See the Configuration guide for how to override these files.

Configuration Reference

settings.lua

OptionTypeDefaultDescription
Config.DebugbooleanfalseEnable debug logging
Config.CheckIntervalnumber1000How often to check ammo (milliseconds)

Weapon List

Each weapon entry in Config.Weapons has:

FieldTypeDescription
weaponstringWeapon name (e.g., "WEAPON_REVOLVER_CATTLEMAN")
itemstring or tableInventory item name for ammo box. Table for dual-ammo weapons
typestring or tableAmmo type hash. Table for dual-ammo weapons
amountnumberAmmo per reload

Supported Weapons (29 total)

CategoryCountExamples
Revolvers9Cattleman, Schofield, Navy, Double Action, LeMat (dual-ammo)
Pistols4Volcanic, Mauser, Semi-Auto, M1899
Rifles4Bolt Action, Springfield, Varmint, Elephant
Snipers2Rolling Block, Carcano
Shotguns6Double Barrel, Double Barrel Exotic, Pump, Repeating, Semi-Auto, Sawed-Off
Repeaters4Evans, Henry, Carbine, Winchester

Dual-Ammo Example (LeMat Revolver)

The LeMat revolver uses both revolver and shotgun ammo:

lua
{
    weapon = "WEAPON_REVOLVER_LEMAT",
    item = { "ammorevolvernormal", "ammoshotgunnormal" },
    type = { "AMMO_REVOLVER", "AMMO_SHOTGUN" },
    amount = 12,
}

Features

  • Automatic reload — Ammo boxes from inventory are consumed to reload weapons automatically
  • 29 pre-configured weapons — Revolvers, pistols, rifles, snipers, shotguns, repeaters
  • Dual-ammo support — Weapons like the LeMat revolver that use two ammo types
  • Configurable interval — Adjust how often the script checks for empty weapons
  • Server-side validation — Rate limiting and weapon hash verification to prevent exploitation
  • Lightweight — Client sends only the weapon hash, server handles all logic

Troubleshooting

ProblemSolution
Script doesn't startMake sure twinded_libs is started before
Weapon not reloadingCheck the weapon is in Config.Weapons list and ammo item name matches your inventory
Ammo not consumedVerify the item field matches the exact inventory item name
Performance concernsIncrease Config.CheckInterval (e.g., 2000 for 2 seconds)

Premium RedM Scripts — Multi-Framework