🥦 Weed Laboratory
Access a comprehensive guide that includes a detailed installation process, examples of code, previews of configurations.
Last updated
Access a comprehensive guide that includes a detailed installation process, examples of code, previews of configurations.
Last updated
Adding a New Item to ESX Framework
To add a new items, to your ESX server, follow these steps:
Access the Database: Log in to your server's database management tool (like phpMyAdmin).
Navigate to the items
Table: In your database, find the items
table. This is where all the items for the game are defined.
SQL Command for Adding Items: To quickly add the items, execute the following SQL command:
Adding a New Item to QB-Core Framework
To add a new items, to your QB-Core server, follow these steps:
Edit the QB-Core Shared File:
Navigate to the qb-core
folder.
Open the shared
folder.
Add a line for the new items in the items list. For example:
This line defines the item's properties like name, label, weight, and image file.
Add Images to QB-Inventory:
Go to the qb-inventory
folder.
Place the image for the items in the appropriate directory (usually in html/img
).
Ensure the image file name matches the one specified in the shared file.
Restart the Server:
After making these changes, restart your FiveM server.
This is necessary for the server to recognize and load the new item configuration.
For ESX:
Database Entry: Using an SQL command. Adjust the name
, label
, and other properties for the drug items.
For QB-Core:
Shared File Update: Add your drug item in the shared
folder of qb-core
, customizing the properties. Set useable
to false
for drugs, unless they have a specific use case in the game.
Restart the Server: After making these changes in either framework, restart your server to implement the new items.
inside-weed-models - You receive it with your purchase.
inside-interactions - You receive it with your purchase.
To properly set up the clientNotify
and serverNotify
functions in your FiveM script, follow these steps:
Identify Your Notification System: First, determine the notification system your server uses.
Learn How to Trigger Notifications: Once you've identified the notification system, find out how to trigger these notifications. Look for documentation or examples in your existing scripts. Pay attention to the format and arguments required for triggering notifications.
Modify the Notification Functions:
In clientNotify
and serverNotify
, replace QBCore:Notify
or esx:showNotification
with the appropriate event or function call from your notification system.
Ensure you fill in the arguments correctly. Each notification system has its specific requirements for message text, notification type, duration, and possibly other parameters.
Test Your Notifications: After setting up, test the notifications in various scenarios to confirm they work correctly. This helps ensure that players receive the right messages at the right time.
Image Addition: Place the drug image in the qb-inventory
directory.
-
- For time management in the interior Also required: FiveM build 2802+ or higher