Installation
Install the table game and configure its database, framework, locale and build settings.
Required dependencies
Required for Lua 5.4 and escrow support.
Required for the casino DLC assets.
Installation steps
- 01
Extract the resource
Choose the required version and copy its folder into your server resources directory.
- 02
Configure locales
Edit or create the translation file for your server language.
translations.lua - 03
Configure card suits
Adjust the suit settings for your server.
config.lua - 04
Configure player chips
Connect the chip getter and setter functions to your framework.
server/sv_main.lua
Important file locations
translations.luaPlayer-facing locale strings.
config.luaCard suit and gameplay settings.
server/sv_main.luaFramework and player chip integration.
caution
Add your framework getter at the beginning of server/sv_main.lua.
You can use any framework.
Chip storage configuration
Use inventory items
Store poker chips as inventory items and update the player balance after every transaction.
function getPlayerChips(source)
local Amount = 0
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
local Item = xPlayer.getInventoryItem('chips')
if Item then
Amount = Item.count
end
end
return Amount
end
function giveChips(source, amount)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
xPlayer.addInventoryItem('chips', amount)
updatePlayerChips(source)
end
end
function removeChips(source, amount)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
xPlayer.removeInventoryItem('chips', amount)
updatePlayerChips(source)
end
end
Use accounts or cash
Store poker chips in a framework account and handle balance changes through account functions.
function getPlayerChips(source)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
return xPlayer.getAccount('chips').money
else
return 0
end
end
function giveChips(source, amount)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
xPlayer.addAccountMoney('chips', amount)
updatePlayerChips(source)
end
end
function removeChips(source, amount)
local xPlayer = ESX.GetPlayerFromId(source)
if xPlayer then
xPlayer.removeAccountMoney('chips', amount)
updatePlayerChips(source)
end
end