Documentation
Quasar Diamond Casino includes a public developer API that allows other resources to interact with casino systems such as chips, casino doors, blackjack integrations, and gameplay features. These exports are designed for advanced integrations, allowing developers to connect external scripts with the casino economy and create custom gameplay experiences.
Player server ID |
Returns
numberReturns the player's current chip balance.
Adds casino chips to a player's account.
local success = exports['qs-diamondcasino']:GiveChipsToMember(source, amount)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| number | Amount of chips to give |
Returns
booleanReturns false if the player does not have a valid casino membership.
Removes casino chips from a player.
exports['qs-diamondcasino']:RemoveChipsFromMember(
source,
amount,
'admin'
)Parameters
Parameter | Type | Description |
|---|---|---|
| number | Player server ID |
| number | Amount of chips to remove |
| string | Removal reason ( |
Always provide a reason when removing chips for external systems. Removals without a reason are treated as casino bets and contribute to the global jackpot.
Locks or unlocks all casino doors.
exports['qs-diamondcasino']:ToggleLockCasino(true)Parameters
Parameter | Type | Description |
|---|---|---|
| boolean |
|
Developers can override the default blackjack chip handling system by using custom callbacks.
exports['qs-diamondcasino']:SetTakeChipsCallback(function(source, amount)
-- Your custom logic here
end)Called when blackjack needs to remove chips from a player.
exports['qs-diamondcasino']:SetGiveChipsCallback(function(source, amount)
-- Your custom logic here
end)Called when blackjack rewards chips to a player.
Returns the internal scaleform helper used by casino interfaces.
local Scaleforms = exports['qs-diamondcasino']:Scaleforms()This export is mainly intended for advanced UI integrations and custom casino modifications.
Developers can register custom actions during blackjack seating events.
exports['qs-diamondcasino']:SetSatDownCallback(function()
end)exports['qs-diamondcasino']:SetStandUpCallback(function()
end)exports['qs-diamondcasino']:SetLeaveCheckCallback(function()
end)exports['qs-diamondcasino']:SetCanSitDownCallback(function()
return true
end)Example: rewarding casino chips from an event, mission, or custom activity.
local success = exports['qs-diamondcasino']:GiveChipsToMember(
source,
500
)
if success then
print('Casino chips added successfully')
endExample: locking the casino during a server event.
exports['qs-diamondcasino']:ToggleLockCasino(true)Servers with custom economy systems can replace the default blackjack chip handling:
exports['qs-diamondcasino']:SetTakeChipsCallback(function(source, amount)
-- Remove chips using your own system
end)
exports['qs-diamondcasino']:SetGiveChipsCallback(function(source, amount)
-- Give chips using your own system
end)