🚗Used Cars Job

Ruxo Used Cars Dealership Job

Preview

How to Install

Copy the script folder in your server resource forlder, add the script in the server config file, then add the SQL to your DB

Requirements

  • ESX

  • ESX Context

Key

To open ingame menu use the default key "f6", you can change it in config:

	DefaultKey = "f6", --you can change this value for open menu ingame
F6 to open menu

Job Settings

Select the minimum grade to buy or sell a vehicle, they can be indipendent,

buyGrade = 1, --Minimum grade to buy a vehicle

sellGrade = 1, --Minimum grade to sell a vehicle

Also decide the zones, where you can open the menu with the selected job!

	Zone = {
		{
			job = "usato", -- job name
			coords = vec3(-1245.2511, -354.0174, 37.3329), --center of the zone
		},
	},

You can decide how much range a player have from the zone to open the menu:

	ZoneRange = 59000, --Max range to open the menu from coords position (suggest 30/50)

Logs

Put your Discord Webhook links in cofig, log when a vehicle is bought or sold

	WebhookBuy= "", --https://discord.com/api/webhooks/114040590

	WebhookSell= "", --You must put a link inside

Translations

Select from config your local

	Local = "en", -- it,es,fr,en,de Transaltion

You can change or add translations in config

	--EN
	TranslateEN = {
		used_vehicle = "Buy Vehicle",
		notify_error = "This vehicle does not belong to anyone!",
		notify_ok = "Vehicle successfully delivered!",
		garage_vehicle = "Garage",
		show_vehicle = "Show Vehicle",
		show_notify = "Vehicle locked",
		show_notify2 = "Vehicle unlocked",
		check_vehicle = "Check Modifications",
		check_engine = "Engine Modifications",
		check_brakes = "Brake Modifications",
		check_transmission = "Transmission Modifications",
		check_suspension = "Suspension Modifications",
		check_armor = "Armor Modifications",
		check_turbo = "Turbo Modifications",
		veh_error = "You need to be in a vehicle",
		sell_vehicle = "Sell Vehicle",
		store_vehicle = "Store Vehicle",
		owner_no = "Owner don't want to sell",
		sale_confirm = "Confirm",
		sale_cancell = "Cancell",
		grade_error = "Your grade is too low",

	},

Keys System

If you don't have a key system with your garage, disable it with KeySystem = false


KeySystem = true, --If you have a key system for vehicles based on plate, set true 

TriggerKeySystem = "daichiaviNOWL", --Your server trigger name to give keys, es: TriggerServerEvent("daichiaviNOWL", plate), for cd_garage use cd_garage:AddKeys

TriggerKeyType = "server", --Trigger type: server for TriggerServerEvent or client for TriggerEvent, for cd_garage is client

KeySystemRemove = true, --Set this false if you use cd_garage

TriggerKeyRemove = "rimuovichiaviNOWL", --Your server trigger name to remove keys

Change the triggers names in config with your keys-system triggers

Garage SQL

You can adapt this to any type of garage script

Change tables/fields name with your garage tables and fields

DBTable = "owned_vehicles", -- Your DB table name for garage system, to insert and delete cars

DBParking = "Legion", -- Your DB Garage name to store new swapped vehicle, cd_garage default is: MP

DBPlate = "plate", -- Your DB Garage plate field

DBOwner = "owner", -- Your DB Garage owner chardID field

DBGarageFields = "owner, plate, vehicle, stored, type, parking", --Your DB Garage fields
	
USEDdbGarageFields = "owner, plate, vehicle, stored, type, parking", --Script DB Garage fields

CdGaragePersistentVehicles = false, 

Notifications

Default ESX notification are already supported,

Notification = function(message, type) -- You can change here events for notifications
	--es client side
	TriggerEvent("esx:showNotification", message, type)-- type can be "info", "error", "success"
end,

ServerNotification = function(source, message, type) -- You can change here events for notifications
	--es server side
	TriggerClientEvent("esx:showNotification",source, message, type)-- type can be "info", "error", "success"
end

if you use a custom script for notification, just change the triggers:

TriggerEvent("your custom trigger", ?)-- 

Support

If you need support join:

✨Support

Last updated