[Release] Diamond Casino Blackjack

How you change all stuff ?

First of all you need custom interior that has blackjack tables. Easiest way is to use codewalker to place those in your custom interor. After that if i remember right you need to change location of dealer and chairs

In cl_blackjack.lua

Dealers at line 39-44

casinoBlackjackDealerPositions = {

 [0] = {1149.3828125,269.19174194336,-52.020873718262,46.0},

 [1] = {1151.28,267.33,-51.840,222.2},

 [2] = {1128.862,261.795,-51.0357,315.0},

 [3] = {1143.859,246.783,-51.035,313.0}

}

Then Chair locations line 335 to make closetocasino = true

local closestChairDist = #(vec(playerCoords.x,playerCoords.y,playerCoords.z) - vec(1146.9212646484,266.33749389648,-51.840839385986))

Change those to your coords and it should work.

oh and i almost forgot line 1608

function blackjack_func_70(id)

--Local_198f_257 == 1 only when penthouse?

local Local_198f_257 = 0

print("[blackjack_func_70] id is " .. tostring(id))

if Local_198f_257 == 1 then

    return 967.33, 32.0191, 115.1742

elseif id == 0 then

    return 1148.837, 269.747, -52.8409

elseif id == 1 then

    return 1151.84, 266.747, -52.8409

elseif id == 2 then

    return 1129.406, 262.3578, -52.041

elseif id == 3 then

    return 1144.429, 247.3352, -52.041

end

return 0.0,0.0,0.0

end

Position for tables

2 Likes

Is it normal to bet on fictitious chips? I can bet myself forever. There is no token counter.

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.

I’m getting that error, i am using vrp 1.0 U can help me?

Hello, i tried to install this mod, but first get that error,

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.

Ok, to solve this problem i renamed sv_blackjack.lua to server
Don’t get this error, ok.
But when i enter in casino, cl_blackjack.lua give me this error

MainThrd/ ^1SCRIPT ERROR: @vrp_blackjack/cl_blackjack.lua:351: attempt to call a nil value (global 'blackjack_func_348')^7
 MainThrd/ ^1SCRIPT ERROR: @vrp_blackjack/cl_blackjack.lua:105: attempt to call a nil value (global 'setBlackjackDealerPedVoiceGroup')^7

Its caused bcuz i renamed sv_blackjack.lua or bcuz i’m using VRP 1.0? Someone can help-me to make it work on my VRP 1.0?

Where can i move the Your hand is # , Dealer is #. becuase its stack with my hud.

Beautiful :smiley: . But there’s no Casio maps. Somebody send it?
Thank you in advance for your help!

not sure what im doing wrong… the script is working for me cuz i can see the teleport on the entrance… so its working for sure… but i´ve set the coordinates of the blackjack dealers and i cant see them in… im using the MLO version so the coordinates are diferent from the one it cames with the script … anyone that can help pls ?! ty <3

how to get it work ? i can`t run it !

maybe u install wrong src

i download it from the top post and the teleport is working even tough im using MLO map… so it should be fine… not sure why the npc’s arent showing with the proper coordinates…

make sure ur src is in the diamondblackjack folder

I enter the casino but the casino map is not loaded.

the teleport is ok

Update:

refactor: tables now dynamically configurable, so now compatibly with other casino maps like MrBrown’s & anywhere else you want to place a blackjack table.
removed: lots some dead code
optimize: lots of optimizations,
added: /getcasinotable to give you more information on adding your own tables,
removed: some debug lines
tweak: correctly named some functions
fix: dealer don’t stand on < 17 if he wins anyway

Update to latest from git & please report any issues via GitHub thanks!

I used Mr Brown’s interior. When I tried /getcasinotable command. Nothing happen and nothing spawn.

help cards now showing

What interior is best used with this? I tried 2 and neither worked.

Was working a week or two ago, stopped working suddenly with no changes made. Did a reinstall of the resource to no avail :frowning:

I need help, im getting this error and the table don’t work…

Some one can help me?

1 Like

I get an error where I can’t sit down. Because seat is already taken.