Before starting, you must log in to the CFX portal to download the asset. You will be able to download it as many times as you want on the official CFX page. Just as you download it the first time, you will also download it multiple times in the future to get updates.
1
Logging in to the CFX Portal
First, log in to the official CFX portal by clicking here.
2
Finding Your Assets
Once logged in, navigate to the Granted Assets section to access your purchased assets. You can download them by clicking the "Download" button.
Remember, if you encounter any issues or errors when starting the asset, you can check here to see if the problem is related.
Downloading Dependencies
The dependencies for this asset are mandatory, so please follow the dependency guide completely and use all required files.
When downloading a dependency, ensure the file is properly unzipped and does not include "-main" at the end of its name. If it does, please remove it.
1
progressbar
2
meta_libs
3
bob74_ipl
Update artifacts and gamebuild
Updating to the latest artifacts and gamebuild is essential to avoid common server issues. Here's how to do it properly:
1
Update Artifacts
Completely replace your current artifacts with the latest version. Download the appropriate artifacts for your operating system from the official links:
Using the latest gamebuild is critical to take advantage of the newest features and avoid compatibility errors.
Edit the server.cfg file and add the following line:
sv_enforceGameBuild 3258
You can see the complete guide to update your server here:
Server.cfg Positioning
This asset must always be started below your framework and inventory. Failure to do so may result in functionality issues or critical errors. To ensure smooth operation and proper initialization, it is recommended to start the entire download folder using "ensure [drugs]" in your server configuration.
Dispatch Configuration
The notifyCops.lua file in the configuration folder allows you to notify law enforcement when suspicious activities, such as drug sales, occur. The dispatch system can be configured to use either client-side or server-side logic depending on your preferences.
Set the desired dispatch method in the notifyCops.lua file using the Config.Dispatch variable. Two options are available:
1
Client-side Dispatch
Enables notifications to be handled directly on the player's client.
2
Server-side Dispatch
Handles notifications centrally on the server.
You can configure it via client or server with the following examples:
1
Client-Side Configuration
When Config.Dispatch = 'client', use the following setup:
Config.Dispatch = 'client'
function DispatchNotify(coords)
local playerData = exports['qs-dispatch']:GetPlayerInfo()
TriggerServerEvent('qs-dispatch:server:CreateDispatchCall', {
job = { 'police', 'sheriff', 'traffic', 'patrol' },
callLocation = playerData.coords,
callCode = { code = '10-15', snippet = 'Drug sell' },
message = "A ".. playerData.sex.. " is selling drug in ".. playerData.street_1.. "",
flashes = false,
image = image or nil,
blip = {
sprite = 488,
scale = 1.5,
colour = 1,
flashes = true,
text = 'High Speed',
time = (20 * 1000), -- 20 seconds
}
})
end
This configuration retrieves player information using qs-dispatch and sends a dispatch call with details such as the location, street name, and other relevant data.
2
Server-Side Configuration
When Config.Dispatch = 'server', notifications are processed server-side. Use the following example: