Page cover

๐ŸฅŽHold and Throw

DH_Throw is a lightweight, standalone FiveM resource that lets players spawn, hold, throw, and pick up predefined objects with immersive animations and interaction.

๐Ÿงฑ How to Install

Follow instructions in Getting Started

๐Ÿ”ง Features

  • โœ… /hand [object] to spawn a predefined prop in hands

  • โœ… /throw command or keybind (default G) to throw the object

  • โœ… Realistic throw physics from hand or vehicle window

  • โœ… [E] Pickup interaction hint when near a thrown object

  • โœ… Modular config to enable/disable features

  • โœ… Scaleform hints with keybind awareness

  • โœ… Full export & event support for other resources

  • โœ… Fully client-side and framework-independent

๐Ÿ“œ Commands

Command
Description

/hand object

Spawns a prop from the config into your hand

/hand

Cancels current held object or shows usage

/throw

Throws the held object in a random direction

๐ŸŽฎ Keybind

Action
Default
Can Rebind In Settings?

Throw Object

G

โœ… Yes

To rebind, go to Settings โ†’ Key Bindings โ†’ FiveM โ†’ Throw Held Object

โš™๏ธ Config (config.lua)

๐Ÿ”น Predefined Objects

๐Ÿ”น Global Settings

๐Ÿงฉ Exports

๐Ÿงช Check if player is holding something

๐Ÿ“ฆ Get current held object

โŒ Remove the held object

๐ŸŽ Set an object via code (same as /hand)


๐Ÿช Events & Callbacks

๐Ÿ”” DH_Throw:ObjectPickedUp

Triggered when any object is picked up:

๐Ÿ” RegisterOnObjectPickup(callback)

Alternative method for pickup detection:


๐Ÿ’ก Tips

  • All objects thrown are synced and visible to all players

  • Throw direction is random when on foot, or based on seat position in vehicles

  • Melee, aiming, and weapon switching can all be disabled via config

  • Fully expandable โ€” drop in new objects, add sounds, integrate with inventory

โ“ Frequently Asked Questions

Can I add my own objects?

Yes! Just add them to the Config.Objects table in config.lua:

Youโ€™ll need the correct prop model name. Use tools like CodeWalker or plebmasters to find them.

Can players hold more than one object at a time?

No โ€” the script is designed so a player can only hold one object at a time. Calling /hand again will replace the current one.

Does this work inside vehicles?

Yes! If Config.Settings.AllowInVehicle = true, players can throw objects out of the left or right window based on seat position.

Can I integrate this with my inventory syste, (OX/QS/etc)?

Absolutely. Use the export:

โ€ฆand combine it with inventory checks or item usage in your own code.

Players are geting a warning: GetNetworkObject: no object by ID - What's up?

This means a player tried to pick up an object that no longer exists, and it's completely harmless.

Last updated