Casino Card Games for FiveM
A comprehensive FiveM resource that brings card games to your server. Features Blackjack with full game logic, betting system, and beautiful UI.
Features
-
Blackjack: Classic 21 game with hit, stand, and double down options
-
Player Hosting: Players can host their own games using a "deckofcards" item
-
Join Games: Players can find and join nearby hosted games
-
Framework Support: Works with ESX and QBcore
-
Beautiful UI: Modern, responsive interface with card animations
-
Betting System: Configurable min/max bets with server-side validation
-
Money Management: Integrated with your framework's money system
Installation
1. Download and place the graze_cardgames folder in your server's resources directory
2. Add `ensure graze_cardgames to your server.cfg
3. Configure the resource in config.lua to match your server settings
4. Restart your server or start the resource manually
Configuration
Edit config.lua to customize:
-
Deck of Cards Item: Set the item name required to host games (default: "deckofcards")
-
Casino Location: Set the coordinates where players can access the casino (optional, can be disabled)
-
Game Settings: Configure min/max bets for each game
-
Deck Settings: Adjust number of decks and shuffle threshold
-
Hosted Game Settings: Configure max games, timeout, player limits, and detection radius
-
UI Settings: Customize UI scale and sound options
Usage
Hosting a Game
- Use the deckofcards item (or use /casino or /cards command)
2. Select "Host Game" for Blackjack
3. Set your bet amount
4. Wait for other players to join
5. Click "Start Game" when ready
Joining a Game
- Use the deckofcards item (or use /casino or /cards command)
2. View the "Nearby Games" section
3. Click "Join" on any available game
4. Wait for the host to start the game
Solo Play (if casino location enabled)
-
Use the command /casino to open the casino menu
-
Select Blackjack
-
Place your bet
-
Play the game using the on-screen buttons
Exports
exports['graze_cardgames']:OpenCasinoMenu()
exports['graze_cardgames']:HostGame('blackjack', 1000)
exports['graze_cardgames']:JoinHostedGame('game_123')
Game Rules
Blackjack
-
Beat the dealer without going over 21
-
Face cards (J, Q, K) are worth 10
-
Aces can be 1 or 11
-
Blackjack (21 with 2 cards) pays 3:2
-
Regular wins pay 1:1
-
Dealer must stand on 17 or higher
Dependencies
-
FiveM Server
-
QBCore or ESX
Customization
Changing Casino Location
Update the coordinates in config.lua:
Config.CasinoLocation = {
x = 1088.65,
y = 206.92,
z = -49.0,
heading = 0.0
}
Support
For issues or feature requests, please make a ticket in my discord