HG-Auction Configuration Documentation
Config.lua
General Settings
Config.Framework = "newesx" --(1)!
Config.Theme = "default" --(2)!
Config.OpenCommand = "auc" -- (Command or `#!lua false` to disable it)
Config.Categories = { --(3)!
"all",
"car",
"home",
"item",
"weapon",
"other"
}
Config.discordlog = "" --(4)!
- Framework to use: "newesx", "oldesx", "newqb", or "oldqb"
- Change the color theme of the interface. Set the name to the
data-theme
attribute in yourtheme.css
file. Read more here -
Available Categories
all car home item weapon other -
Discord webhook URL
Note
You can only remove categories. You cannot add more.
Language Settings
Change the language to any of the provided locales
You can add a language or modify an existing one very easily. Simply navigate to theweb/assets/locale
directory:
.
βββ hg-auction/
βββ web/
βββ assets/
βββ locale/
βββ en.json
βββ *.json
en.json
) and rename it to something else (ex: fr.json
for French) And change the text.
Example:
Next, simply change the value to whatever you named the file
SQL Settings
Config.Mysql = "oxmysql" --(1)!
Config.MysqlTableName = "hg-auction" --(2)!
Config.MysqlTableName2 = "hg-auction_demand" --(3)!
- Available options:
- mysql-async
- ghattimysql
- oxmysql
- Change the SQL Table's name (For auctions).
- Change the SQL Table's name (For auction history).
Warning
Only change the SQL Table's name if you understand the implications!
Auction Rules Settings
General rules
Config.ServerWait = 120000 --(1)!
Config.MinBet = 100 --(2)!
Config.EnableAuctionDelete = true --(3)!
Config.EnableAnimation = true -- (4)!
Config.EnablePrivateAuction = true -- (5)!
Config.EnableBlackMoneyAuction = true --(6)!
Config.RequiredItem = "phone" --(7)!
- Amount of time between auction money refunding checks. Recommended > 30000 (In milliseconds)
- Minimum amount above the last bid.(Minimum value is 1)
- Allow auction deletion. (
true
orfalse
) - Enable tablet animation when opening the interface. (
true
orfalse
) - Enable private auctions (Only people with certain jobs can see private auctions. See Access Settings)
- Enable black money auctions. This option is forced to false for qbcore.
- Item required to open the interface (item name or
false
to disable it)
Time Expansion settings
The time expansion system extends the time by a configurable amount when someone bets before the auction ends. This setting is highly recommended for servers with over 64 concurrent players as it prevents any player lag/desyncing issues.
- Enable the time expansion feature when someone bids before the specified duration. (
true
orfalse
) - The duration (in seconds) before the end of an auction when bidding triggers time extension.
- The amount of time (in seconds) to extend when someone bids before the specified duration.
Rewards
- Automatically give the won artice to the winning players. (Functions.lua)
- Refund the money to players after an auction ends. (
true
orfalse
)
Notifications
Config.EnableGlobalNotification = true --(1)!
Config.EnableNewAuctionNotif = true --(2)!
-- You can change/translate the notifications/Text that show up.
Config.NoBidder = "No one" --(3)!
Config.AuctionAdded = "Auction Added"
Config.AuctionNotAdded = "Error Adding Auction"
Config.AuctionUpdated = "Auction Updated"
Config.AuctionDeleted = "Auction Deleted"
Config.NotEnoughMoney1 = "You Do not have enough dirty money to place this bid"
Config.NotEnoughMoney2 = "You Do not have enough money to place this bid"
Config.BidPlaced = "Bid successfully placed"
Config.AmountDebited = "Amount Debited: " -- (4)!
Config.NotEnoughMargin = "Bid Amount should be at least " .. Config.MinBet .. " higher than the last bid."
Config.AmountLow = "Amount too low"
Config.RefundMoney = "You have been refunded from the last auction, Amount: " --(5)!
Config.RefundDirtyMoney = "You have been refunded from the last auction, Amount: " --(6)!
Config.itemrecieved = "Auction Item Recieved"
Config.weaponrecieved = "Auction Weapon Recieved"
Config.vehrecieved = "Auction Vehicle has been delivered to your Garage"
Config.houserecieved = "Auction House recieved"
Config.otherrecieved = ""
- Enable global auction announcements in chat. (
true
orfalse
) - Enable new auction announcements in chat. (
true
orfalse
) - Name to show when no one has bid.
- Amount removed from bank/dirty money account.
- Refund for bank money.
- Refund for dirty money.
Notification event:
Config.Notification = function(message, type) --(1)!
if Config.Framework == "newesx" or Config.Framework == "oldesx" then
TriggerEvent("esx:showNotification", message)
elseif Config.Framework == "newqb" or Config.Framework == "oldqb" then
TriggerEvent('QBCore:Notify', message, type, 1500)
elseif Config.Framework == "custom" then -- (2)!
SetNotificationTextEntry("STRING")
AddTextComponentString(message)
DrawNotification(false, false)
end
end
- Here you can change the events for notifications.
-
- Define your own notification event here.
- By default, this uses GTA's notification system.
Access Settings
Config.AuctionJob = 'police' -- (1)!
Config.AdminPermissions = { --(2)!
"owner",
"superadmin",
"admin",
"mod",
}
Config.LeoJobs = { --(3)!
'police',
'sheriff',
'ambulance'
}
- The job that has rights to add/edit/delete auctions (job name or
false
to disable it) - Admin roles that have the right to add/edit/delete auctions
- Jobs that see private auctions
Note
Admins have rights to add/edit/delete auctions by default
Customization
We include 4 themes: "Default","Ocean","Purple", "Space"
. You can put these in Config.Theme.
You can change/add Themes by changing the colors in the theme.css
file, found under web/
.
If the provided theme.css
file isn't formatted, you can use an online CSS formatter to make it readable.
Support
If you found anything unclear, or you have any questions, you can contact us on Discord by opening a ticket.