🥦 Weed Laboratory
Access a comprehensive guide that includes a detailed installation process, examples of code, previews of configurations.
INSTALLATION GUIDE
Step 0 - First Steps
1. Download your resource from FiveM's Keymaster
2. Unzip the is-weed
folder and place this folder in your server's resource folder.
3. Add the resource to your server start config (server.cfg): ensure is-weed
If you are using a framework, it must be placed anywhere below your framework resource e.g., es_extended, not above.
ensure es_extended ensure is-weed
Step 1 - Configure Resource
You MUST read all configurable options inside the[is-weed/config.lua]
file and configure them to suit your server's needs.
Step 2 - Adding Items
For the script to function correctly, it's essential to add specific items to your game's database. This section guides you through adding these items, particularly focusing on the phone item and new drugs.
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 theitems
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.
- 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
shared
folder ofqb-core
, customizing the properties. Setuseable
tofalse
for drugs, unless they have a specific use case in the game.Image Addition: Place the drug image in the
qb-inventory
directory. - 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
To set up your database for the game, you'll need to create table: weed_laboratories. Use the following SQL commands to create these tables:
Step 4 - Install Dependencies
For the script to function properly, it requires the resources listed below.
To avoid any issues with the script's performance, ensure that you're using the Latest Version of the Framework or Previous Versions that include the same features.
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
clientNotify
andserverNotify
, replaceQBCore:Notify
oresx: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.
Last updated