Skip to main content
Three Card Poker

Installation

Install the table game and configure its database, framework, locale and build settings.

Required dependencies

FiveM artifact 4752+

Required for Lua 5.4 and escrow support.

Game build 2060+

Required for the casino DLC assets.

Installation steps

  1. 01

    Extract the resource

    Choose the required version and copy its folder into your server resources directory.

  2. 02

    Configure locales

    Edit or create the translation file for your server language.

    translations.lua
  3. 03

    Configure card suits

    Adjust the suit settings for your server.

    config.lua
  4. 04

    Configure player chips

    Connect the chip getter and setter functions to your framework.

    server/sv_main.lua

Important file locations

Translations
translations.lua

Player-facing locale strings.

Configuration
config.lua

Card suit and gameplay settings.

Server bridge
server/sv_main.lua

Framework 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

Inventory integration

Use inventory items

Store poker chips as inventory items and update the player balance after every transaction.

server/sv_main.lua
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
Account integration

Use accounts or cash

Store poker chips in a framework account and handle balance changes through account functions.

server/sv_main.lua
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