The resource allows players to manage weapon sling positions in the game, dynamically reflecting the weapons they have in their inventory. This enhances immersion and adds a realistic touch to your FiveM server. Documentation Forum
- Debug Mode: Enable or disable debug mode for troubleshooting.
- Locale Support: Set the locale for the resource.
- Admin Configuration: Manage admin commands and permissions.
- Framework Support: Compatible with ESX, QBCore, and custom frameworks.
- Inventory System: Supports various inventory systems including qs-inventory, qb-inventory, core_inventory, and ox_inventory.
- Weapon Attachments: Enable or disable weapon attachments.
- Command Configuration: Customize commands for configuring weapon positions.
- Preset Commands: Use preset configurations for weapon positions.
- Bone Configuration: Configure player bones where the weapon can be attached.
- Editable Weapons: Manage configurations for editable weapons.
Before setting up the resource, ensure that you have the following dependency installed:
- ox_lib: This library is required for the resource to function correctly.
- GitHub Repository: ox_lib
- Documentation: ox_lib Documentation
-
Download and Install
- Clone or download this repository to your
resources
folder in your FiveM server.
- Clone or download this repository to your
-
Install ox_lib
- Ensure that you have
ox_lib
installed. You can find it on GitHub or refer to the ox_lib Documentation for installation instructions.
- Ensure that you have
-
Configure
- Open the
config.lua
file and modify settings to fit your server’s framework and preferences. - Example:
Config.Locale = "en" -- Change to your preferred language (e.g., "fr", "es", "ru"). Config.Framework.name = "esx" -- Set to your framework: "esx", "qbcore", or "custom". Config.Inventory = "ox_inventory" -- Match your inventory system: "auto", "qs_inventory", etc.
- Open the
-
Add to Server Config
- Add the following line to your
server.cfg
:ensure ox_lib ensure force-sling
- Add the following line to your
-
Start Your Server
- Restart your server or the resource to load the resource.
The resource includes a config.lua file to customize functionality:
- Debug Mode:
- Enable or disable debug logging.
- Locale:
- Set the language for the system.
- Supported languages:
ar
,en
,es
,fr
,pt
,de
,nl
,pl
,ru
,se
, orauto
.
- Admin Tools:
- Add admin player identifiers under the
Config.Admin.Global.players
array.
- Add admin player identifiers under the
- Framework Support:
- Supports ESX, QBCore, or custom frameworks.
- Inventory Integration:
- Compatible with popular inventory systems like
ox_inventory
andqb_inventory
.
- Compatible with popular inventory systems like
Refer to the Configuration section for detailed information on each setting.
The resource provides several commands to manage weapon positions:
-
/sling
- Description: Configure weapon positions.
- Permission: Any player can use this command.
-
/resetsling
- Description: Reset personal sling position to global.
- Permission: Any player can use this command.
-
/slingpreset
- Description: Configure global weapon positions.
- Permission: Only admins are allowed to use this by default.
Refer to the Commands section for a list of available commands and their usage.
This project is licensed under the GPL License. See the LICENSE file for more details.
We appreciate contributions! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add feature'
- Push to the branch:
git push origin feature-name
- Create a pull request.
For questions, issues, or feature requests, please open an issue or reach out on our Discord.
Thank you for using the resource. We hope this documentation helps you get the most out of the resource.