[Release] Diamond Casino Blackjack

Hope to see those done. I got curious about that cause in the casino we are using we dont have those tables

How can I get it to use chips?

to add chips/money into your framework/gamemode complete the two functions named tryTakeChips and giveChips at the top of sv_blackjack.lua

It´s in the main post. You have to edit those functions of the sv-blackjack.lua to give or take chips from the player

Can’t figure out why its not taking/giving chips. :frowning:

https://gyazo.com/b0921b262dfc8aba85af6a3d11b055b9

Cant help. I´m using ESX

can someone please set this to work with The Diamond Casino Enterable MLO
i tried but it won’t show the start menu :frowning:

4 Likes

Hey @Robbster I think i found a small bug.
on line #364 you have something like

  if highestPlayerHand < dealerHand  then

This causes dealer to stand at any number, below 17, if the players highest card is below 17.
How I replicated this bug while playing solo:

  1. I drawn a card and made a stand at 13
  2. Dealer came up with 14 and stood.
  3. Dealer won the round.

I removed that extra if highestPlayerHand < dealerHand then function and kept only the while loop and it seems to work fine.

ITs not really a bug. I doubt that any dealer in real life will risk to lose if have already beaten the player. If a 14 is enough he wont risk to draw a card and get 24. He wont work again in that casino XD

It’s not a bug I made it like that on purpose, though after some research in most casinos the dealer will hit anyway even if they’ve already won if below 17

When i boot this on my test server on a windows version of fivem it starts up and runs amazing. i deployed it to my live server running a linux version of fivem and when i start the script i get

Nevermind this works now. he had a git.ignore folder ignoring SRC in there that did not allow me to push it to git and deploy it to my main server on our private repo… i fixed it thanks.

Awesome Resource! Looking forward to your other projects!

1 Like

That applies in a non-casino dealer who acts as another player.
Nvm, still love the resource, I understand now why you kept it like that, i just though that because is a casino dealer, it should always stand for 17 and above.
Thank you again

Error loading script sv_blackjack.lua in resource vRP_blackjack: @vRP_blackjack/sv_blackjack.lua:4: attempt to call a nil value (global 'module')
stack traceback:
        @vRP_blackjack/sv_blackjack.lua:4: in main chunk
Failed to load script sv_blackjack.lua.

Anyone know how to fix this with the vrp version made by @DocWeird

are you using vrp 0.5?

Thank you for this!

1 Like

it’s work but why say “The sit is token” ?

Hello, how can I move it to another location

@Robbster
I downloaded this a few days ago and added it onto my server the script works great!

but… it causes a few errors with the map such as adding random walls that block off the tunnel on olympic fwy? is there a fix for this?

Anyone got code to make this work with the version of the Casino where you can walk in? Browns version?

1 Like