Login to your keymaster account, check Granted Assets section and download script you bought from us
Script Start Order
To correctly start the mechanic script in your server.cfg, ensure to start the scripts in the following order. Failure to do so may result in various error codes
Go to _installation folder, you can find item images there. For item codes, firstly choose your framework, after that insert required items in your items file or sql
If you using ox_inventory ONLY use items_ox
If you using qb_inventory or qs-inventory use items_qb
If you using chezza_inventory use items.sql
Create New Mechanics
Owner of the mechanic identifier or citizenid must be determined at the bossIdentifier section
id value cant be same with other mechanics
job value must be different from other mechanics, otherwise it will be glitched
---------------------PLAYER MECHANICS-------------------------------------------------------------------------------------------[[ You can add additional items to specified shop from here. id = Unique id for mechanic shop bossIdentifier = Identifier / Citizenid of mechanic owner !! IMPORTANT job = Which job will work for this mechanic modify = { -- vector3(x, y, z) -- Create new vehicle customization locations } flatbed = { model = Towing vehicle model name coords = Determine location for towing vehicle spawn heading = Heading }]]Config.Mechanics = { [1] = { id =1, --- @param WARNING!!! id has to be a value between 1 and 99 bossIdentifier ="", -- citizenid or identifier job = "mechanic1", --- @param WARNING!!! job value cant be same with other mechanics, you have to use another job for another mechanic
bossMenu =vector3(-206.648, -1331.58, 34.894), modify = {vector3(-221.982, -1329.93, 30.890), }, flatbed = { model ="flatbed", coords =vector3(-190.143, -1290.53, 31.295), heading =266.0 } }, [2] = { id =2, --- @param WARNING!!! id has to be a value between 1 and 99 bossIdentifier ="", -- citizenid or identifier job = "mechanic2", --- @param WARNING!!! job value cant be same with other mechanics, you have to use another job for another mechanic
bossMenu =vector3(-347.355, -133.625, 39.009), modify = {vector3(-323.233, -132.452, 38.957),vector3(-326.517, -144.650, 39.060), }, flatbed = { model ="flatbed", coords =vector3(-367.893, -108.809, 38.679), heading =65.1 } },}
👨🔧 How can I set myself as boss to a mechanic?
Assigning Yourself as the Boss of a Mechanic Shop
To accomplish this, you will need to locate your assigned identifier or citizenid. Here's how you can find this information:
Navigate to your FiveM server's database where your user information is stored.
Look for the table that contains user data, often labeled as users or players.
Within this table, find your user entry. It should contain fields for your identifier and possibly citizenid, among other personal details.
Note down the identifier or citizenid value associated with your entry; this is the information you will need to input into the mechanic shop's configuration.
Once you have your identifier or citizenid, follow these steps to set yourself as the boss:
Open the mechanic shop script configuration (config.lua)
Scroll down to the Config.Mechanics section of the configuration.
Choose the mechanic shop entry (e.g., [1], [2], etc.) you wish to own.
Replace the empty string "" next to bossIdentifier with your noted identifier or citizenid.
Save the configuration file and restart your server for the changes to take effect.
You are now set as the boss for the selected mechanic shop.
Tuning Tablet
Tuning Tablet Usage Options
You have various options for using the Tuning Tablet. By setting TuningAsItem to true, you can attach the tablet to an in-game item, or if it's set to false, it will be accessible via a command. If you decide to leave TuningAsItem as false, you can customize the command to open the tuning interface by editing TuningCommand to your preference.
Configuring the Tuning Tablet:
TuningAsItem: Set to true if you want to use the tablet as an inventory item, or false to use it with a command.
TuningCommand: If TuningAsItem is false, customize this command to your liking for opening the tuning interface.
Additional Options
MinimumGrade Setting
To adjust who can use the Tuning Tablet, change the Config.MinimumGrade value. This number represents the minimum required employee rank to access the tablet.
Config.MinimumGrade =0-- All employees can useConfig.MinimumGrade =1-- Only employees with rank 1 or higher can use
Speed Settings
The IncreaseSpeed and MaxSpeed options help you control the maximum acceleration and top speed that can be set using the tablet for vehicle modifications.
Config.IncreaseSpeed =35.0-- Amount each tuning step increases speedConfig.MaxSpeed =999.0-- The maximum speed limit after tuning
-------------------------TUNING TABLET----------------------------------------------------------------------------------------Config.TuningAsItem = false -- true / false -- If its true, tuner tablet will be attached to tuningtablet item otherwise it will work with command
Config.TuningCommand ='tuning'Config.MinimumGrade =1-- Define a min grade level for who can use Config.IncreaseSpeed =35.0Config.MaxSpeed =999.0
Crafting
To activate and customize the production table, several modifications are required:
prop: Defines the object for the table, which can be accessed from forge plebmaster.
job: Determines which jobs can access the table.
workarea:Within workarea, the length and wide values set the range of accessibility for the table.
coords:Use coords to place the production table in the desired location.
In the CraftItems section, you can add or remove items:
prop: Specifies the object to be previewed.
img: Change img to modify the menu image.
For the requirements section:
Define new items by setting name and item.
Do not alter the owned value.
Adjust count to specify the required quantity of items.
To set the prices for each part, you can perform the following steps in config.lua:
Use Ctrl+F to locate the Config.Menus section within the file.
There you will find various upgrades and customizations like brakes, transmission, etc., along with their prices.
basePrice represents the base price of a part, and increaseBy determines the incremental value based on the part's quality.
You can adjust these values accordingly to set your prices.
Remember, individual mechanic shops can establish their discount rates for all parts, so consider this factor when setting your economy. Adjust your prices with this in mind to maintain a balanced economy.
To ensure that our script operates harmoniously with other scripts, you will need to adjust the following settings.
Vehicle Keys
Key Integration for Custom Vehicle Key Plugins
If you're not using one of the pre-integrated vehicle key scripts like dusa, jaksam, qbcore, wasabi or quasar and need to integrate your own, follow these steps:
Open bridge/framework/client.lua file.
Use Ctrl+F to find the function dusa.integrateKey.
Insert the integration code provided for your key script into the located code block.
For example, if you're using a plugin called x and they provide a function that looks like:
exports['x']:AddKey(vehicle, vehicleplate)
You will need to replace vehicle with your vehicle variable and vehicleplate with your plate variable as per your script.
If you encounter any difficulties while performing these steps, don't hesitate to open a support ticket for assistance.
API
The details for operations in this category have not been provided extensively, as anyone with basic knowledge can perform the necessary actions. Therefore, it is recommended to reserve this part more for your developers. Developers can refer to the provided snippets and integrate them into your scripts for extended functionality.
client
Triggering the Mechanic Menu from Anywhere Similar to Admin Menus
To invoke the mechanic menu from various locations, similar to how you would with admin menus, you can integrate the following code snippet into your scripts:
-- Function to open mechanic menu at everywhere (especially for admin menu)exports['dusa_mechanic']:openMechanic()
Triggering the Craft Menu
Integrate the following code snippet into your scripts:
-- Function to open mechanic menu at everywhere (especially for admin menu)exports['dusa_mechanic']:openCraft()
Enabling the Tuning Tablet Menu
To enable the Tuning Tablet menu in other script, you'll need to use this event:
Snippet:
-- Function to open the Tuning Tablet menuTriggerEvent('dusa_mechanic:cl:useTuning') -- event is client sided
Clearing Existing Vehicle Lifts
To remove any vehicle lifts that have been previously placed on the server, follow the instructions below:
Navigate to data>lifts.lua
LOcate the vehicle lift you want to delete by finding its coordinates or by using the owner's job, citizen ID (or identifier) as a filter
Delete or comment out the entry of the specific vehicle lift
Save the lifts.lua file after modification
Restart the script
Note: Ensure you have a backup of your configuration files before making any changes. If you encounter any issues, revert to the backup file and contact support.
Monitoring Vehicle Stancer Settings Changes
To track changes to a vehicle's stancer settings, follow these steps:
AddStateBagChangeHandler('stancer' --[[key filter]], nil --[[bag filter]], function(bagName, key, value, _unused, replicated)
Wait(0)ifnot value thenreturnendlocal vehicle =GetEntityFromStateBagName(bagName) -- Getting vehicle idifnotDoesEntityExist(vehicle) thenreturnendlocal plate =GetVehicleNumberPlateText(vehicle) -- Getting vehicle plate-- Add code here to handle the change-- value['wheel'] -- Equals to wheels camber and offsets-- value['width'] -- Wheel width-- value['height'] -- Wheel suspension height-- value['size'] -- Wheel sizeend)
Retrieving Current Stancer Settings of Vehicles
To obtain the current stancer settings of a vehicle, use this callback:
local stances = lib.callback.await('dusa_mechanic:stancers', false, plate)
Common Problems
For the error you are experiencing, you might not need to wait for us by opening a ticket. Here, you can find the most common errors encountered:
1. Applying Chameleon Colors
Issue: When I try to remove my car from the garage, the chameleon colors are not being applied.
Solution: This issue stems from your core script not supporting the chameleon color palette. However, you can solve this problem with two small pieces of code.
The functions that need modifications and the code sections to be added are specified below.
if props.chameleon thenSetVehicleColours(vehicle, props.chameleon[1], props.chameleon[1])end
If you don't know how to do it or are hesitant, replace your entire code block with the following. (If there have been prior modifications related to this function on your server, this method is not recommended.)