dZp dealership
dZp Dealership allows players to have their own vehicle dealerships - manage them, control sotck, track sales, buy cars from other players or from server, then resell them to other players and more. This is a great addition if you want to enhance your economics and late game players experience in your server. Below you can see graphical model of the system:
city
can be created if you don’t want to give responsibility of them to players. In such case server staff can manage the stock and prices;For smoother delivery join Discord Server before placing an order.
After you have placed an order you will be granted with a role on daZepelin discord server which will allow you to use bot commands for this script.
If for any reason you did not get the role automatically please contact daZepelin#6380
.
After purhcase (if you are in the discord server) you will receive a direct message from Discord bot with your license key which you will have to paste to Config.LicenseKey
. If it happened that you did not receive the license key or you forgot it you can write +license
. Other bot commands can be found by writing +help
to the bot.
To get download link use +download dzp_dealership
and send it to the bot.
PlateFormat
- allows you to adjust how license plates will be generated. The following characters will be replaced with randomly generated character: n
- number, c
- letter, x
- either, other characters will stay. Max 8 characters. E.g possible plates for PlateFormat 0nllxx
: 06AG9A, 05TY05.NewESX
- If true then method(-s) (add-/give-)AccountMoney() instead of method(-s) (add-/give-)Money() will be used.AccountToCharge
- Name of account which gets charged (only has effect if NewESX is enabled).MaxLogsAmount
, MaxDataAmount
- Maximum amount of charts/logs data to be fetched from database.OrderAddonMultiplier
- Multiplier added if player orders car to his dealership instead of delivering it.DeliveryPickUpPoints
- Coords to pickup car for delivery.ReturnFromPreviewButton
- Button to return from car preview.AdminGroups
- ESX groups that can access management commands for dealerships.ShowHelpNotification
, ShowNotification
- Functions to be called for notifications.Markers
, Blips
- Markers and blips parameters.
Server staff can give can use command /dzp_giveowner <shopId> <playerId>
(adjust player groups needed for commands in commands.lua
)
shopId
- dealership id (fom databse dzp_dealerships
table);playerId
- player server Id, if entered -1
dealership will be given to the city.
In order to add more cars to be available for dealerships owners to buy you need to add them to database table dzp_cars
manually or by using staff command /dzp_addglobal <model> <amount> <label> <basePrice> <priceAddon>
where:
model
- car spawn model (not hash);amount
- amount cars available;label
- car name to be shown in UI;basePrice
- base price which can be increased by priceAddon
if stock gets lower;priceAddon
- price added to basePrice
if cars left in stock is equal to 1.To add more cars any dealership you can do it manually in database table dzp_carsstock
or by using staff (adjust player groups needed for commands in commands.lua
) command /dzp_addlocal <shopId> <model> <price> <label>
where:
shopId
- id of dealership you want to add the car;model
- car spawn model (not hash);price
- price for which car will be listed;label
- car name to be shown in UI.If you want to create more dealerships you will need to do it manually in database table dzp_dealerships
. Explanation of table columns:
id
- id key of dealership;owner
- dealership owner’s identifier. If not owned by any player should be set to city
;label
- dealership name;management
- management marker coords (json);customer
- customer marker coords (json);carDeliver
- coords at which car has to be delivered(json);carSpawn
- coords at which car will be spawned after buying it(json);carPreview
- coords at which car spawn to be previewed(json);displayData
- cars display data (json). Display data can be added using the following example:[
{"x":-35.56, "y":-1100.8, "z":25.5, "h":20.0, "id": 1}
]
[
{"x":-35.56, "y":-1100.8, "z":25.5, "h":20.0, "id": 1},
{"x":-38.56, "y":-1090.8, "z":25.5, "h":185.0, "id": 2},
]
MySQL-async ESX (tested with EXM and ESX 1.1)
If any of yours from these are different than the ones in ESX 1.1 you might face issues, but you should be able to solve them easily. Will most likely work with any new version.
ESX.Game.DeleteVehicle()
ESX.Game.SpawnLocalVehicle()
ESX.Game.SpawnVehicle()
ESX.Game.SetVehicleProperties()
ESX.Game.GetVehicleProperties()
ESX.GetPlayerFromIdentifier()
ESX.GetPlayerFromId()
xPlayer.getAccount().money
or xPlayer.getMoney()
xPlayer.removeAccountMoney()
or xPlayer.removeMoney()
xPlayer.addAccountMoney()
or xPlayer.addMoney()
xPlayer properties:
xPlayer.identifier
xPlayer.source