HG-Auction Developer guide
Exports
Toggle Auction Interface
Toggle the auction interface on and off
Force Close Auction Interface
If the auction interface is open, this forces it to close (Can be useful when a player is cuffed or dies etc...)
Refresh Auction List
Refreshes the auction list for the player
Functions.lua
Global notification settings
function AuctionGlobalNotification(auctionname--[[ (1)! ]], lastbetter--[[ (2)! ]], lastprice--[[ (3)! ]], identifier --[[ (4)! ]], img--[[ (5)! ]])
- String
- String
- Float
- String
- Array<String>
New auction notification settings
function NewAuctionNotify(auctionname--[[ (1)! ]], price--[[ (2)! ]], isPrivate--[[ (3)! ]], img--[[ (4)! ]])
- String
- Float
- boolean
- Array<String>
Give item Function
Function to give the winner of an item his item
- View Give Reward Function
- View Data Object
Give Weapon Function
- View Give Reward Function
- View Data Object
Give House Function
- View Give Reward Function
- View Data Object
Give Vehicle Function
- View Give Reward Function
- View Data Object
Give Other Function
- View Give Reward Function
- View Data Object
Give Reward Function
This is the function used to give out the rewards to the players and notify the winning player. Variable xPlayer is an object that represents the players (Dependant on the framerwork)
- Player object (Dependant on the framework used)
- View Data Object
Check before adding an auction
This function is called before an auction gets added. You can add any logic you want. Return false
to reject an auction.
- View Data Object
Data Object
data = {
id,--(1)!
auctionname,--(2)!
price,--(3)!
category,--(4)!
time,--(5)!
endTime,--(6)!
img,--(7)!
plate,--(8)!
itemname,--(9)!
propertyID,--(10)!
shellid,--(11)!
lastbetowner,--(12)!
lastbetidentifier,--(13)!
lastprice,--(14)!
isPrivate,--(15)!
isBlackMoney--(16)!
Itemcount--(17)!
}
- Auction ID (int)
- Auction name (String)
- Starting price (float)
- Category (string)
- Starting time (int)
- Ending time (int)
- Auction pictures (Array<String>)
- Plate number for vehicles (string)
- Item name (string)
- Property ID for houses (int)
- Shell ID for houses (int)
- Last bidder's name (string)
- Last bidder's identifier (string)
- Last bid price (float)
- Is auction private? (int, 0 or 1)
- Is auction black money? (int, 0 or 1)
- Item count (int)
Admin permission check
This function is used to check whether the current player is an administrator or not. You can set this function to return false to disable the admin's add/edit/delete permissions.
- Array<String>