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

chevron-rightCan I add my own objects?hashtag

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 arrow-up-rightto find them.

chevron-rightCan players hold more than one object at a time?hashtag

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

chevron-rightDoes this work inside vehicles?hashtag

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

chevron-rightCan I integrate this with my inventory syste, (OX/QS/etc)?hashtag

Absolutely. Use the export:

…and combine it with inventory checks or item usage in your own code.

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

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

Last updated