Commands & Exports
Player Commands
/throwWeapon
Throws your currently equipped weapon. The weapon physically lands at a real position and becomes a lootable ox_inventory drop for other players.
| Property | Value |
|---|---|
| Default keybind | K |
| Rebindable | ✅ Yes — via GTA V keybind settings |
| Configurable command name | MBT.Throw["Command"] in config.lua |
| Configurable key | MBT.Throw["Key"] in config.lua |
Conditions:
- Player must have a weapon equipped
- Player must not be in a vehicle
- Weapon group must be set to
Allowed = trueinMBT.Throw["Groups"]
If the weapon group is not allowed (e.g. GROUP_SNIPER), the player receives the no_allowed_throw notification and nothing happens.
Client Exports
dropCurrentWeapon()
Manually drops the player's currently equipped weapon at their position. The weapon is removed from inventory and a physical drop is created at the player's hand bone location.
exports["mbt_malisling"]:dropCurrentWeapon()This export is intended for other scripts that need to disarm a player programmatically — for example, during arrest, restrain or custom death sequences.
Behaviour:
- Creates a temporary visual weapon object at the player's hand
- Waits for the object to land (physics simulation)
- Removes the weapon from
ox_inventory - Creates an
ox_inventorydrop at the landing coordinates
This export runs client-side. Call it from a client script in the context of the player you want to disarm, not from the server.
Developer Reference
The following events are used internally by the script. You generally do not need to trigger these manually, but they are documented here for integration purposes.
Server → Client events
| Event | Description |
|---|---|
mbt_malisling:syncScope | Notifies a client that a player has entered or left their scope, triggering weapon prop creation or deletion |
mbt_malisling:syncDeletion | Instructs clients to delete a weapon prop for a specific player |
mbt_malisling:syncPlayerRemoval | Removes a disconnected player from all tracking tables |
mbt_malisling:checkWeaponProps | Sends the client their full inventory to re-sync weapon props after reconnect |
mbt_malisling:stopWaitingForPlayer | Cancels a pending scope-wait loop when a player leaves |
Client → Server events
| Event | Payload | Description |
|---|---|---|
mbt_malisling:syncSling | { slot, type, components, ... } | Syncs the equipped weapon state to the server |
mbt_malisling:syncDeletion | { type } | Requests removal of a weapon prop type |
mbt_malisling:checkInventory | — | Requests inventory re-check after spawn |
mbt_malisling:dropWeapon | { slot, hash } | Triggers death drop on the server |
mbt_malisling:createWeaponDrop | { WeaponInfo, Coords } | Creates a throw drop at specified coordinates |
These events are protected by FiveM's network model — only authenticated clients can trigger them. Do not trigger them from external resources unless you fully understand the payload format.
