Skip to content

Configuration

All settings are in config.lua. Restart the resource after editing it.

Main game options

OptionDefaultDescription
Config.Locale"en"fr, en, pt-br, pt, ru or de.
MinBetChips / MaxBetChips2 / 10Minimum and maximum bet in chips.
MinBuyInChips / MaxBuyInChips2 / 50Allowed chip-stack purchase range.
DefaultBuyInChips20Preselected buy-in amount.
BuyInStepChips5Increment used by the buy-in prompt.
BetTime20000Bet phase duration (ms).
InsuranceTime10000Insurance phase duration (ms).
TurnTime25000Duration of one player turn (ms).
ShuffleBelow20Shuffle when fewer cards remain.

The cash value of a chip is set per table with chipValue (default 1.0).

Default tables

Edit Config.Blackjack.Tables to change, remove or add fixed tables:

lua
{
    id = 'blackwater',
    labelKey = 'tableBlackwater',
    coords = vector3(-813.2971, -1324.2848, 46.89),
    heading = 0.29,
    theme = 'bla',
    dealerModel = 's_m_m_valdealer_01',
    dealerVoice = 'AS_TOWNDEALER',
    chipValue = 1.0,
    blip = true,
}

id must remain unique. The included tables are Blackwater, Rhodes and Van Horn.

HUD integration

Set HudIntegration.Enabled to true and use callbacks for the most universal integration:

lua
HudIntegration = {
    Enabled = true,
    OnEnter = function()
        exports['your_hud']:SetVisible(false)
    end,
    OnLeave = function()
        exports['your_hud']:SetVisible(true)
    end,
}

You may alternatively fill the provided Exports or Events fields. Other client resources can react to lo_blackjack:client:playingChanged or call exports['lo_blackjack']:IsPlayingBlackjack().

Administrator tables

/createblackjack creates a persistent table; /blackjacktables opens the management menu. Configure both command names and the access rule in AdminTables:

lua
AdminTables = {
    Commands = { create = 'createblackjack', manage = 'blackjacktables' },
    RequiredGroup = 'admin',
    MaxTables = 100,
    MinSpacing = 3.0,
    MaxPlacementDistance = 30.0,
}

Grant the default ACE permission if required by your setup:

cfg
add_ace group.admin lo_blackjack.admin allow

The integrated placement gizmo needs no additional resource. Use its on-screen controls to move or rotate the complete table set, snap it to the ground, confirm or cancel.