Advanced Auction System [ESX/QBCore]

Description

Elevate your FiveM server’s auction experience with HG-Auction. Featuring a real-time bidding system synced with server time, this script ensures seamless and secure auctions. With a user-friendly interface, comprehensive logging, and robust security, it’s a reliable choice. The standout feature is the automatic prize system, streamlining and enhancing overall efficiency. HG-Auction – the ultimate FiveM auction script.

Features

Framework support:

  • New/Old ESX
  • New/Old QBCore

Real time bidding

Our script provides real time updates on all the auctions. This allows players to do bidding wars without having to refresh the interface every few seconds.

Server side time sync

Our server time syncing system ensures that all players have equal bidding odds. The system makes sure that all players have the exact same time no matter their region / computer clock / ping.

Security Measures

Besides the Server-Sider time sync feature, our script provides a time extension system which extends the bidding time by a configurable amount when someone bets before the auction ends. This makes sure that any last-second desync issues don’t occur. We have tested this in a server with 100+ concurrent players. This option is configurable and can be disabled in the config.

Private Auctions

When adding an auction, you can set it to private, meaning it will only show up for players with certain jobs (Configurable). This can be useful if you want to auction off police vehicles and work vehicles.

User Interface

Main interface

Player View:

  • Black money auctions have a red money bag icon on them. These can only be bid on with black/dirty money

Auction Manager View:

Add/Edit modal:

  • Each category has its own fields. You can change the name of these fields and you can change their function in the automated rewarding system

Place bid modal:

Themes

We provide 4 predefined themes you can pick from. You can add your own by editing the CSS file. Read more here

Default:

Ocean:

Purple:

Space:

Discord logs

The discord webhook sends an embeded message on discord when an auction is added/when an auction ends

Config

If you want a detailed explanation of all the options, along a customization/translation tutorial, check out the documentation for this script.

Config = {}

-------------------------
---- General settings ---
-------------------------

Config.Framework = "newesx" -- "newesx" || "oldesx" || "newqb" || "oldqb" 
Config.Theme = "default" -- "ocean" || "space" || "purple" 
Config.OpenCommand = "auc" -- or false
Config.Categories = {
    "all",
    "car",
    "home",
    "item",
    "weapon",
    "other"
} 
Config.discordlog = "" -- webhook

-------------------------
--- Language settings ---
-------------------------

Config.Lang = "en" -- check web/assets/locale

-------------------------
--- Database settings ---
-------------------------

Config.Mysql = "oxmysql"  -- "mysql-async" , "ghmattimysql" , "oxmysql"
Config.MysqlTableName = "hg-auction" -- sql table
Config.MysqlTableName2 = "hg-auction_demand" -- sql history table

-------------------------
---   General Rules   ---
-------------------------

Config.ServerWait = 120000 -- 2 mins // for give back money loop
Config.MinBet = 100 -- min bid to add
Config.EnableAuctionDelete = true  -- enable auction delete
Config.EnableAnimation = true -- Enable tablet animation
Config.EnablePrivateAuction = true -- private auction
Config.EnableBlackMoneyAuction = true -- black money (forced to false for qbcore)
Config.RequiredItem = "phone" -- or false for no required item

-------------------------
---   Time Expansion  ---
-------------------------

Config.ExpandDuration = true -- expand auction time
Config.ExpandWhenLeft = 60 -- 60 seconds remaining then expand
Config.ExpandTime = 60 -- 60 secs to add

-------------------------
---      Rewards      ---
-------------------------

Config.ReturnMoneyIfLost = true -- return money to lost players
Config.AutoGiveReward = true -- auto give reward to winner player (Functions.lua)

-------------------------
----  Notifications  ----
-------------------------

Config.EnableGlobalNotification = true -- Send global notifs when auction ends (Functions.lua)
Config.EnableNewAuctionNotif = true -- new auction global notif (Functions.lua)
-- You can change/translate the notifications/Text that show up.
Config.NoBidder = "No one"
Config.AuctionAdded = "Auction Added"
Config.AuctionAdded = "Auction Added"
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: "
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: "
Config.RefundDirtyMoney = "You have been refunded from the last auction, Amount: "
Config.itemrecieved = "Auction Item Recieved"
Config.weaponrecieved = "Auction Weapon Recieved"
Config.vehrecieved = "Auction Vehicle recieved in Garage"
Config.houserecieved = "Auction House recieved"
Config.otherrecieved = "" 

-- Notification Event:
Config.Notification = function(message, type) -- You can change here events for notifications
    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
        -- put your notification event here
        -- or use gta default
        SetNotificationTextEntry("STRING")
        AddTextComponentString(message)
        DrawNotification(false, false)
    end
end

-------------------------
---- Access Settings ----
-------------------------

Config.AuctionJob = 'police' -- Auction job // or false for admin
Config.AdminPermissions = {
    "owner",
    "superadmin",
    "admin",
    "mod",
}
Config.LeoJobs = {
    -- jobs for private auction
    'police',
    'sheriff',
    'ambulance'
} 

Exports

We provide client side exports that allow you to interact with the system programmatically. You can read more about these in the developer docs

exports['hg-auction']:ToggleAuction()
exports['hg-auction']:CloseAuction()
exports['hg-auction']:RefreshAuction()



Preview: Video

Buy-here: Tebex




Gearbox system featured in the video

Also Check

Code is accessible No
Subscription-based No
Lines (approximately) 4k+
Requirements SQL
Support Yes
2 Likes

Hey all, developer here.

Update:

We’ve added a function to do a check before adding an auction. You can modify this function and add your own logic (read more in our docs).

1 Like

tems on the shelves are free for all players to put on the shelves, but administrator permissions are required to do so.

You can make it work with a job ID or with admin permissions. Normal players without the job ID or admin permissions cannot add Auctions, they can only place bids.

Update:

Fixed an NUI issue for old Qbcore users.

Bug script dont Buy

Hello! We’re sorry to hear you’re experiencing issues with our Auction System. However, we noticed that you haven’t reported any problems through our Discord ticket system. You opened ticket #0143 to request specific information, and our developer responded promptly, addressing your inquiry, but we never received a reply from you.

To ensure that we can assist you effectively, please report any issues through the same ticket so our development team can provide support. Instead of commenting here and discouraging others from purchasing a fully functional script, we’d appreciate the opportunity to resolve any problems you’re facing. Thank you! :blush: