[RELEASE] Program-casino, a casino pack for fivem esx servers

Not sure why. Most likely more JS issues and im not good at JS so we will need to find someone who is or get the OP to take a look at the systems.

for the pentahouse you have to edit this in your client/main.lua

remove line 42 :

--Show markers
--[[Citizen.CreateThread(function()
	while true do
		Citizen.Wait(0)

		if PlayerData.job and PlayerData.job.name == 'casino' then
			local coords, letSleep = GetEntityCoords(PlayerPedId()), true

			for k,v in pairs(Config.CasinoSites) do
				if v.Type ~= -1 and GetDistanceBetweenCoords(coords, v.Pos.x, v.Pos.y, v.Pos.z, true) < Config.DrawDistance then
					DrawMarker(v.Type, v.Pos.x, v.Pos.y, v.Pos.z, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, v.Size.x, v.Size.y, v.Size.z, v.Color.r, v.Color.g, v.Color.b, 100, false, true, 2, false, nil, nil, false)
					letSleep = false
				end
			end

			if letSleep then
				Citizen.Wait(2000)
			end
		else
			Citizen.Wait(2000)
		end
	end
end)]]--

in line 1558 and 1580 :
change both lines :

if IsJobTrue() then

to :

if PlayerData ~= nil then

and you should be good to let any one use teleport … :wink:

1 Like

Thanks you! ^^

no problem,

for blackjack and the restarting the resource that cuz a lot of crash for people joining server while table is open or some one is playing … the solution i did in my server is simple …

in your server/main.lua :
remove those 2 lines …

    --StopResource('pNotify')
    --StartResource('pNotify')

and in client/main.lua :
adjust timeout in pNotify trigger I put 10 sec :
line 241 :

	TriggerEvent("pNotify:SendNotification", {
		text = "<font style='font-size: 14px'><div style='height: 150px; width: 100px; min-width: 100px; min-height: 150px; border-radius:10px; background-image: url("..cards[card][3].."); background-color:white; background-size: contain; background-position: center;  background-repeat: no-repeat;'></div>",
		type = "cards",
		queue = "global",
		timeout = 10000,
		layout = "bottomRight"
	})

line 256 :

			TriggerEvent("pNotify:SendNotification", {
				text = "<font style='font-size: 14px'><div style='height: 150px; width: 100px; min-width: 100px; min-height: 150px; border-radius:10px; background-image: url("..cards[card][3].."); background-color:white; background-size: contain; background-position: center;  background-repeat: no-repeat;'></div>",
				type = "cards",
				queue = "global",
				timeout = 10000,
				layout = "bottomRight"
			})

and it is working for me just perfect … still trying to make 4 table playable but for now I can’t manage it if I do I will post it here … :slight_smile:

2 Likes

Yess on my server it was making a lot of crashes too. I fixed it in new version and soon ill update script on github master branch, But now im working on big update on my server couse i thing ill update this casino pack about 1 Sep.

how to fix the spam sound?

I would love you long time if you could make 4 tables work.

nope my friend I tried but program working on them now … so I will wait since I have a lot of other things on my mind :wink:

when i change images i get this error after click on spinn:
SCRIPT ERROR: @slotmachine_1/server/main.lua:42: attempt to index a nil value (local ‘societyAccount’)

can you help?

Did u find a solution?

How do i change the coordinates of the casino, and which is the correct coordinates

what are the coords and where do i put em?

Hello guys, on my server when I open slots I can only click on Bid higher and lower and I cant spin or exit, can anyone help me with that? Thx

no :confused:

The fridge doesnt work and i have all the casino society at the sql

Can we get the PSD files for the slot machine ?

English version?

open the files and translate it… you’re that lazy ? XD

https://www.google.com/search?q=google+translate&oq=&sourceid=chrome&ie=UTF-8

1 Like

Everything is working well besides the blackjack part. I can start a game and when a player attempt to join the game it throws attempt to index nil value in console.