I’m excited to share my latest FiveM resource, Backpack Attachments! This script allows players to visually attach weapons and items to their characters’ backs, enhancing immersion and adding a new layer of customization to your roleplay server.
It’s standalone but works fine with:
qb-inventory
ox-inventory
esx-inventory
codem-inventory
Features:
Automatically attaches specified weapons and items to a player’s back.
Supports both weapons and non-weapon items, with customizable attachment points and positions.
Fully configurable via a simple configuration file.
Optimized and lightweight, ensuring minimal impact on server performance.
Open source: You can convert it to any framework you like and remove the QBCore/ESX requirement.
Component and tint support: All weapon components and tints are preserved when attached.
Low usage: The script has minimal performance impact.
No bugs: Eliminates issues such as vehicle explosions or bullets passing through objects.
How It Works:
Weapons and items are automatically detected in the player’s inventory.
The script attaches the item or weapon to the player’s back based on predefined configurations.
Supports custom positioning, rotation, and bone attachment for each item.
Installation:
Download the script and place it in your resources folder.
Add ensure w-backitemdisplay to your server.cfg.
Customize the configuration file to fit your server’s needs.
It seems that some users may not have the necessary knowledge to convert the script to other frameworks like ESX. I understand the challenge, and I’m considering adding this option in a future update. If you’re using a specific framework or inventory system, please let me know so I can ensure compatibility. While I initially mentioned that there would be no support in the script’s description, due to the positive response and since this is my first script, I’m willing to make these adjustments.
Just an idea you probaly want to add in option to enable/disable showing items/weapons trogh event or export. There probaly wil be some use cases where this would be nice, first thing comes to mind would be clothing stores etc.
I still don’t understand how I can use your script for standalone. Make a standalone version so that other servers can use this seemingly cool script as well
In this script, several updates have been added for the Backpack Attachments:
exports["w-backitemdisplay"]:active(state):
This function allows you to toggle the visibility of weapons on the back of all players. If the state is set to true, the function will activate and start monitoring the players to hide their weapons. If set to false, it will stop hiding the weapons.
When called, it checks if the current state matches the requested state. If they are the same, the function does nothing (return). If the state changes to true, it activates a function to monitor active players and hide their weapons.
exports["w-backitemdisplay"]:showmyweapons(state):
This function controls whether your own weapons are visible to other players. By triggering a server event, it updates the display of your weapons for other players based on the state you pass in.
When called, it sends a request to the server to either show or hide your weapons from other players.
New features in this update:
Framework Independence: The script no longer requires any specific framework or inventory system to function and can now work independently.
Custom Props: There’s now an option to set a separate prop for items like a katana, making them more visually appealing and customizable.
This update enhances your control over the visibility of weapons and introduces new customization options to improve the visual experience.
You have made the script standalone. That’s very cool. Question. Is there any way to add addon weapons to the config? Maybe I read something wrong, but after trying different names and different methods I could not add my weapon. Can you tell me how exactly?