Config
-- ============================================================
-- config.lua — Liar's Deck
-- All settings are configured here. Lua and React NUI read
-- this file via shared_scripts.
-- ============================================================
Config = {}
-- -------------------------------------------------------
-- FRAMEWORK
-- "newqb" → Modern QBCore (exports["qb-core"])
-- "oldqb" → Legacy QBCore (TriggerEvent based)
-- "esx" → ESX (exports["es_extended"])
-- -------------------------------------------------------
Config.Framework = "newqb"
-- -------------------------------------------------------
-- CLIENT NOTIFY
-- Customize this to use your own notification system.
-- Default uses QBCore/ESX built-in notifications.
-- -------------------------------------------------------
Config.Notify = function(text, notifType)
QBCore.Functions.Notify(text, notifType)
end
-- -------------------------------------------------------
-- INTERACT KEY
-- 38 = E | 47 = G | 74 = H
-- -------------------------------------------------------
Config.InteractKey = 38
-- -------------------------------------------------------
-- TABLE SETTINGS
-- -------------------------------------------------------
Config.MaxPlayersPerTable = 4 -- Max players per table (2-4)
Config.MinPlayersToStart = 1 -- Min players to start (set to 2 for production)
-- -------------------------------------------------------
-- ROULETTE / CHAMBER SETTINGS
-- -------------------------------------------------------
Config.ChamberSize = 6 -- Chamber slots (standard revolver: 6)
Config.BulletCount = 1 -- Loaded bullets (1 = classic Russian Roulette)
-- -------------------------------------------------------
-- GAME RULES
-- -------------------------------------------------------
Config.CardsPerHand = 5 -- Cards dealt per player per round
Config.TurnTimerSec = 60 -- Seconds per turn before auto-play
Config.AutoRetryDelay = 10 -- Seconds before auto-starting new game after game over (0 = disabled)
-- Deck composition (how many of each card type)
Config.Deck = {
ace = 6,
king = 6,
queen = 6,
joker = 2,
}
Config.TableCardOptions = { "ace", "king", "queen" } -- Possible table cards each round
-- Allowed values for host game settings (lobby)
Config.SettingOptions = {
cardsPerHand = { 3, 4, 5 },
turnTimerSec = { 30, 45, 60, 90 },
chamberSize = { 4, 5, 6 },
}
-- -------------------------------------------------------
-- TIMING (milliseconds)
-- -------------------------------------------------------
Config.Timing = {
-- Round / game flow
RoundStartDelay = 3500, -- Wait after round intro before dealing cards
PostEliminationDelay = 1000, -- Wait after elimination before new round
AllCardsPlayedDelay = 1500, -- Wait when all cards played before new round
GameOverResetDelay = 5000, -- Wait before resetting table after game over
BotNuiNotifyDelay = 500, -- Wait for NUI card notification before bot acts
-- Sit / stand
SitDuration = 2000, -- Wait during sit animation
StandDuration = 3000, -- Wait during stand animation
WalkTimeout = 5000, -- Max walk time to chair
-- Roulette animations
RoulettePreDelay = 3500, -- Wait before roulette starts client-side
RouletteRaise = 700, -- Gun raising to head
RouletteTension = 1500, -- Tension pause before shot
RouletteDeathFreeze = 1500, -- After bang, freeze death pose
RouletteClickWait = 500, -- After click sound
RouletteGunLower = 800, -- Lowering gun after survival
RouletteAnimSpeed = 0.15, -- Slow-mo gun raise speed (0.0-1.0)
-- Card play / liar call
CardThrowDuration = 1200, -- Card throw animation
TableSlamDuration = 2000, -- Table slam animation (liar call)
TableSlamRecovery = 500, -- Recovery after slam
-- Server-side roulette result waits
DeathAnimWait = 5000, -- Server wait for death animation
SurviveAnimWait = 4000, -- Server wait for survival animation
}
-- -------------------------------------------------------
-- BOT SETTINGS
-- -------------------------------------------------------
Config.Bot = {
Models = { "a_m_y_business_01", "a_m_y_hipster_01", "s_m_y_dealer_01", "a_m_y_stwhi_02" },
NamePrefix = "Bot #", -- Bot names: "Bot #1", "Bot #2", etc.
LiarChance = 30, -- Percent chance bot calls liar (0-100)
TurnDelay = 2000, -- ms before bot plays its turn
RouletteDelay = 3500, -- ms before bot pulls trigger
MaxCardsPerPlay = 2, -- Max cards bot plays at once
CooldownSec = 1, -- Rate limit for add/remove bot (seconds)
}
-- -------------------------------------------------------
-- PROP MODELS
-- -------------------------------------------------------
Config.TableModel = "ch_prop_table_casino_tall_01a"
Config.ChairModel = "vw_prop_casino_chair_01a"
-- Chair offsets relative to table center (rotated by table heading)
-- x, y = offset in metres from table center
-- heading = character facing direction
Config.ChairOffsets = {
{ x = 0.0, y = 0.85, heading = 180.0 }, -- Seat 1: North
{ x = -0.85, y = 0.0, heading = 270.0 }, -- Seat 2: West
{ x = 0.0, y = -0.85, heading = 0.0 }, -- Seat 3: South
{ x = 0.85, y = 0.0, heading = 90.0 }, -- Seat 4: East
}
-- Card props (placed on table when cards are played)
Config.CardPropClosed = "vw_prop_vw_lux_card_01a"
Config.CardPropOpen = "vw_prop_casino_cards_single"
-- Card prop placement on table
Config.CardSurfaceZ = 1.05 -- Table surface height offset from prop origin
Config.CardSpread = 0.06 -- Distance between card props (metres)
Config.CardRandomRot = 15 -- Random rotation range for placed cards (degrees)
-- Weapon prop (roulette revolver)
Config.WeaponModel = "w_pi_pistol"
Config.WeaponBone = 57005 -- Right hand bone ID
Config.WeaponOffset = { x = 0.1, y = 0.02, z = -0.02, rx = -80.0, ry = 0.0, rz = 0.0 }
-- -------------------------------------------------------
-- PROXIMITY / 3D TEXT
-- -------------------------------------------------------
Config.Proximity = {
RenderDist = 8.0, -- Distance to show table label (metres)
InteractDist = 3.0, -- Distance to show sit prompt (metres)
IdleWait = 500, -- ms wait when player is far from all tables
LabelHeight = 1.5, -- Table label Z offset above table
PromptHeight = 1.2, -- Sit prompt Z offset above table
NameTagHeight = 1.1, -- Player/bot name tag Z offset above head
}
-- 3D Text rendering style
Config.Text3D = {
Scale = 0.35,
Font = 4,
Color = { r = 255, g = 255, b = 255, a = 215 },
}
-- -------------------------------------------------------
-- CAMERA SETTINGS
-- -------------------------------------------------------
Config.Camera = {
InterpMs = 800, -- Transition time between cameras (ms)
DefaultFov = 50.0, -- Default field of view
OrbitSpeed = 8.0, -- Orbit rotation speed (degrees/second)
OrbitRadius = 2.0, -- Orbit camera distance from table (metres)
OrbitHeight = 1.8, -- Orbit camera height above table surface
OrbitLookOffZ = 0.2, -- Look-at point Z offset
EnterTransition = 1000, -- Gameplay-to-camera transition (ms)
ExitTransition = 800, -- Camera-to-gameplay transition (ms)
}
-- Camera presets (Q/Z to cycle)
-- offsetX/Y = distance from table center (rotated by table heading)
-- offsetZ = height above table surface
Config.CameraPresets = {
{ label = "Overhead", offsetX = 0.0, offsetY = -0.2, offsetZ = 2.0, fov = 60.0, lookOffZ = 0.5 },
{ label = "Seat 1", offsetX = 0.0, offsetY = 1.4, offsetZ = 0.8, fov = 55.0, lookOffZ = 0.4 },
{ label = "Seat 2", offsetX = -1.4, offsetY = 0.0, offsetZ = 0.8, fov = 55.0, lookOffZ = 0.4 },
{ label = "Seat 3", offsetX = 0.0, offsetY = -1.4, offsetZ = 0.8, fov = 55.0, lookOffZ = 0.4 },
{ label = "Seat 4", offsetX = 1.4, offsetY = 0.0, offsetZ = 0.8, fov = 55.0, lookOffZ = 0.4 },
}
-- -------------------------------------------------------
-- TABLE LOCATIONS (set by server admin)
-- coords : vector3 — world coordinates
-- heading : float — table rotation (0-360)
-- label : string — shown on minimap blip and proximity text
-- -------------------------------------------------------
Config.Tables = {
{
id = 1,
label = "Liar's Table #1",
coords = vector3(-554.9, 287.46, 82.18),
heading = 0.0,
},
{
id = 2,
label = "Liar's Table #2",
coords = vector3(-555.72, 282.96, 82.18),
heading = 0.0,
},
-- Add more tables by copying this block:
-- { id = 3, label = "Casino Table #3",
-- coords = vector3(935.0, 45.0, 81.0), heading = 270.0 },
}
-- -------------------------------------------------------
-- HUD POSITIONS (adjust if overlapping with your HUD)
-- Values: CSS position strings (top/bottom/left/right)
-- -------------------------------------------------------
Config.HudPositions = {
playersPanel = { top = "20px", left = "20px" }, -- Players list (game)
controlsPanel = { top = "20px", right = "20px" }, -- Controls guide (game)
statusPanel = { bottom = "20px", left = "260px" }, -- Chamber status (game)
}
-- -------------------------------------------------------
-- BLIP SETTINGS (minimap marker)
-- Single area blip instead of per-table blips.
-- Set enabled = false to disable, or set your own coords.
-- sprite: https://docs.fivem.net/game-references/blips/
-- color : https://docs.fivem.net/game-references/blips/#blip-colors
-- -------------------------------------------------------
Config.Blip = {
enabled = true,
coords = vector3(-564.09, 268.43, 82.47),
label = "Liar's Bar",
sprite = 680, -- Casino Table Games
color = 5,
scale = 0.7,
}
-- -------------------------------------------------------
-- TRANSLATIONS / LOCALIZATION
-- All in-game text strings. Change these to translate.
-- -------------------------------------------------------
Config.Translate = {
-- Proximity / 3D text
sitDown = "Press ~y~E~w~ to sit",
-- Turn indicators (above player heads)
turnIndicator = ">> TURN <<",
deadIndicator = "DEAD",
-- Notifications
tableFull = "This table is full.",
gameInProgress = "A game is already in progress.",
notEnoughPlayers = "Need at least %s players to start.",
kicked = "You were kicked from the table by the host.",
hostLeft = "Host left. New host: %s",
playerEliminated = "%s has been eliminated!",
playerWon = "%s wins the round!",
-- Gameplay
yourTurn = "Your turn!",
waitTurn = "Wait for your turn...",
bluffCalled = "%s called LIAR on %s!",
cardsRevealed = "%s played %s — claim was %s",
rouletteTime = "Pull the trigger...",
blank = "BLANK — You survive!",
bang = "BANG! — You are eliminated.",
-- Server callback reasons
invalidTable = "Invalid table.",
alreadySeated = "You are already seated.",
cannotLeaveDuringGame = "Cannot leave during a game.",
notHost = "You are not the host.",
targetNotFound = "Target player not found.",
cannotKickDuringGame = "Cannot kick during a game.",
playerNotFound = "Player not found.",
useRemoveBot = "Use remove bot instead.",
onlyHostCanStart = "Only the host can start the game.",
gameAlreadyStarted = "Game already started.",
notYourTurn = "Not your turn.",
noCardsSelected = "No cards selected.",
noPlayToChallenge = "No play to challenge.",
notYourRouletteTurn = "Not your roulette turn.",
tooFast = "Too fast.",
notAtTable = "Not at a table.",
onlyInLobby = "Only in lobby.",
tableIsFull = "Table is full.",
noBotsToRemove = "No bots to remove.",
cannotLeaveNow = "Cannot leave now.",
-- Ready system
notAllReady = "Not all players are ready.",
ready = "READY",
notReady = "NOT READY",
-- Session stats
statsWins = "W",
statsRounds = "R",
statsEliminations = "E",
-- Host game settings
settingsTitle = "GAME SETTINGS",
settingCardsPerHand = "Cards",
settingTurnTimer = "Timer",
settingChamberSize = "Chamber",
seconds = "s",
-- How to play
howToPlay = "How to Play",
hideRules = "Hide Rules",
rulesTitle = "HOW TO PLAY",
rulesCardSystem = "Each round, a table card is chosen (Ace, King, or Queen). You receive cards and must play 1 or more face-down, claiming they match the table card.",
rulesClaiming = "You may lie about your cards. Play any cards and claim they are the table card.",
rulesLiarCall = "The next player can call LIAR. Cards are revealed — if the player lied, they face the revolver. If honest, the caller does.",
rulesRoulette = "The revolver has one bullet in a random chamber. Pull the trigger — survive or be eliminated.",
rulesWinning = "The last player standing wins. A new game starts automatically.",
-- Chat
chatPlaceholder = "Type a message...",
chatSend = "Send",
}
Last updated