🥦 Weed Laboratory
Access a comprehensive guide that includes a detailed installation process, examples of code, previews of configurations.
INSTALLATION GUIDE
Step 0 - First Steps
Step 1 - Configure Resource
Step 2 - Adding Items
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
itemsTable: In your database, find theitemstable. 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:
INSERT INTO `items` (`name`, `label`, `weight`, `rare`, `can_remove`) VALUES ('ventilation', 'Ventilation', 1, 0, 1), ('ventilation_plus', 'Ventilation Plus', 1, 0, 1), ('heater', 'Heater', 1, 0, 1), ('heater_plus', 'Heater Plus', 1, 0, 1), ('pot', 'Pot', 1, 0, 1), ('pot_plus', 'Pot Plus', 1, 0, 1), ('watering_can', 'Watering Can', 1, 0, 1), ('water_bottle_big', 'Water Bottle', 1, 0, 1);
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-corefolder.Open the
sharedfolder.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-inventoryfolder.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.
- Adding a Drugs Items
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
sharedfolder ofqb-core, customizing the properties. Setuseabletofalsefor drugs, unless they have a specific use case in the game.Image Addition: Place the drug image in the
qb-inventorydirectory. - Download the Images Here.
Restart the Server: After making these changes in either framework, restart your server to implement the new items.
Step 3 - SQL Database
Step 4 - Install Dependencies
inside-weed-models - You receive it with your purchase.
inside-interactions - You receive it with your purchase.
cd_easytime - For time management in the interior Also required: FiveM build 2802+ or higher
How can I change my notifications?
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
clientNotifyandserverNotify, replaceQBCore:Notifyoresx:showNotificationwith 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.
Last updated