Script Install

Dependencies

Install Steps

  • Install Dependencies

  • Download [mk_utils] from Keymaster (access provided with script purchase)

  • add mk_utils to resource folder

  • add mk_vehicleshop to resource folder

  • add ensure mk_utils into server.cfg (It must be added BEFORE mk_vehicleshop)

  • add ensure mk_vehicleshopinto server.cfg

  • Make sure ox_lib ace permissions are in server.cfg

add_ace resource.ox_lib command.add_ace allow
add_ace resource.ox_lib command.remove_ace allow
add_ace resource.ox_lib command.add_principal allow
add_ace resource.ox_lib command.remove_principal allow

Your server.cfg should look similar to this when finished

  • Run mk_vehicleshop.sql or the following query into your database

CREATE TABLE `mk_vehicleshops` (
	`name` VARCHAR(50) NOT NULL COLLATE 'utf8_general_ci',
	`showroom` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`stock` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci',
	`restockQuery` LONGTEXT NULL DEFAULT NULL COLLATE 'utf16_general_ci',
	PRIMARY KEY (`name`) USING BTREE
)
COLLATE='utf8_general_ci'
ENGINE=InnoDB
;
  • Make the following edits based upon your used framework

Run qb.sql or the following query into your database

ALTER TABLE `player_vehicles` ADD COLUMN IF NOT EXISTS `vehicleData` LONGTEXT NULL DEFAULT NULL COLLATE 'utf8_general_ci';

If you are using the Luxury PDM provided with default qb-core Navigate to mk_vehicleshop/config/locations.lua and uncomment lines 269 through 395 to enable this shop

Navigate to qb-smallresources/config.lua and insert the following code to the end of this file:

function getBlacklistedVehs()
    return Config.BlacklistedVehs
end
exports('GetBlacklistedVehicles', getBlacklistedVehs)

Adding this will disallow any blacklisted vehicles from being put into any of the shops.

  • Default GTA vehicle images are pulled off github for the vehicle shop menu. If you have custom vehicles you want to add images for they need to be added to mk_utils/vehicleimages in .png format. If you store your vehicle images in another script you can edit the image path inside mk_vehicleshop/config/config.lua under the GetVehicleImageLink function

Last updated