Commands & Exports
Player Commands
/throwWeapon
Throw the currently equipped weapon. It physically lands and becomes a lootable drop.
| Property | Value |
|---|---|
| Default key | K |
| Configurable | MBT.Throw.Key / MBT.Throw.Command |
| Conditions | Weapon equipped, not in a vehicle, weapon group must be allowed |
/pose [n]
Enter a showcase idle pose. Running the command again (or /pose 2, /pose 3...) cycles through poses. Moving, shooting or entering a vehicle exits the pose.
| Property | Value |
|---|---|
| Default key | none (command only by default) |
| Configurable | MBT.ShowcasePoses.Key / MBT.ShowcasePoses.Command |
/mbtLowReady
Toggle between back-sling and chest-ready (low ready) position for long guns.
| Property | Value |
|---|---|
| Default key | HOME |
| Configurable | MBT.LowReady.Key / MBT.LowReady.Command |
| Eligible types | back, back2 (configurable in MBT.LowReady.Types) |
/mbtSafety
Toggle the safety on the held firearm.
| Property | Value |
|---|---|
| Default key | END |
| Configurable | MBT.Safety.Key / MBT.Safety.Command |
/weaponname <name>
Engrave a custom name on the held weapon (stored in metadata, shown in inspect).
| Property | Value |
|---|---|
| Default key | none (command only by default) |
| Configurable | MBT.WeaponName.Key / MBT.WeaponName.Command |
| Permission | MBT.WeaponName.Permission (everyone / job / ace) |
| Max length | MBT.WeaponName.MaxLength (default 24) |
/mbtcharge (key: INSERT)
Rack the slide / charge the weapon. Animation and sound broadcast to nearby players.
| Property | Value |
|---|---|
| Default key | INSERT |
| Configurable | MBT.ChargeWeapon.Key / MBT.ChargeWeapon.Command |
/mbtsling
Open the admin NUI dashboard. Requires ACE permission command.mbtsling (or the configured MBT.Admin.Permission).
Features:
- Live toggle of all feature modules (no restart needed)
- Weapon positions editor
- No-draw zone manager
- Trunk rack offset tuner
- Dashboard reflects the mbt_shooting companion connection status
/mbt_trunktune
In-game trunk prop offset tuner. Opens a nudge UI to adjust the weapon prop position inside the vehicle trunk in real time. Press ENTER to save the offset for the current vehicle model to oxmysql.
The saved offset is keyed to the vehicle model name. It applies to all vehicles of the same model. If oxmysql is not installed, edits are session-only.
Keys (no commands)
| Action | Default key | Config key |
|---|---|---|
| Confirm holster | RMOUSE | MBT.HolsterControls.Confirm |
| Cancel holster | BACKSPACE | MBT.HolsterControls.Cancel |
| Concealed carry toggle | U | MBT.ConcealedCarry.Key |
| Weapon handoff | G | MBT.Handoff.Key |
| Ammo sharing | H | MBT.AmmoSharing.Key |
| Pat down (LEO only) | Y | MBT.PatDown.Key |
| Weapon inspect (hold) | I | MBT.Inspect.Key |
All keys are rebindable from GTA Settings → Key Bindings → FiveM / Malibu Tech.
Client Exports
dropCurrentWeapon()
Manually drop the player's currently equipped weapon at their position. Removes the weapon from inventory and creates a physical drop at the player's hand bone location.
exports['mbt_malisling']:dropCurrentWeapon()Client-side export. Call it from within the context of the player you want to disarm, not from the server.
ResetWeaponsOnBack()
Force-refresh all weapon props for the local player. Useful after custom clothing changes or multicharacter relog flows that skip the normal inventory refresh.
exports['mbt_malisling']:ResetWeaponsOnBack()IsWeaponSafetyOn()
Returns true if the held weapon's safety is currently engaged.
local isSafe = exports['mbt_malisling']:IsWeaponSafetyOn()The same state is also available via statebag mbt_weaponSafety for server-side reads.
GetWeaponSerial()
Returns the serial of the currently held weapon (from inventory metadata), or nil if none.
local serial = exports['mbt_malisling']:GetWeaponSerial()Intended for use by companion resources (e.g. mbt_shooting).
GetWeaponCondition([serial])
Returns the condition tier (1–5, where 5 = pristine) for the held weapon, or nil.
local tier = exports['mbt_malisling']:GetWeaponCondition()Pass the held weapon's serial to verify it matches, or omit to query the held weapon directly.
RegisterShootingBridge(resourceName)
Register a companion resource as the shooting bridge. The companion resource receives lifecycle hooks (OnWeaponFired, OnJamCheck, OnHolster, OnUnholster) via its own exports. See modules/shooting_bridge/client.lua for the full hook signatures.
-- Call this once from your companion resource at startup:
exports['mbt_malisling']:RegisterShootingBridge(GetCurrentResourceName())Returns true on success, false if the resource name is invalid.
Developer Reference
Local events (client → same resource)
| Event | Description |
|---|---|
mbt_malisling:onHolster | Fired when the local player holsters a weapon |
mbt_malisling:onUnholster | Fired when the local player unholsters a weapon |
Net events (server → client)
| Event | Description |
|---|---|
mbt_malisling:syncScope | Notifies a client to create or remove weapon props for a player entering/leaving scope |
mbt_malisling:syncDeletion | Instructs a client to delete a specific weapon prop |
mbt_malisling:syncPlayerRemoval | Clears all tracking for a disconnected player |
mbt_malisling:checkWeaponProps | Re-syncs the client's weapon props after reconnect |
mbt_malisling:sendWeaponsData | Broadcasts the weapon type/config table on resource start |
Net events (client → server)
| Event | Payload | Description |
|---|---|---|
mbt_malisling:syncSling | { slot, type, components, ... } | Syncs equipped weapon state |
mbt_malisling:syncDeletion | { type } | Requests weapon prop removal |
mbt_malisling:checkInventory | — | Requests inventory re-check after spawn |
Net events are protected by FiveM's network model — only authenticated clients can trigger them. Do not trigger them from external resources without fully understanding the payload format.