I have the wheel lined up but when I spin it the wheel goes out of rotation. How do i keep it in the right rotation when I spin the wheel? I can’t find the right setting for it.
This fix was a pain. But I finally got it for you.
RegisterNetEvent(“qb-luckywheel:doRoll”)
AddEventHandler(“qb-luckywheel:doRoll”, function(_priceIndex)
_isRolling = true
SetEntityHeading(_wheel, 328.41)
SetEntityRotation(_wheel, 0.0, 0.0, 0.0, 328.41, true)
Citizen.CreateThread(function()
local speedIntCnt = 1
local rollspeed = 1.0
-- local _priceIndex = math.random(1, 20)
local _winAngle = (_priceIndex - 1) * 18
local _rollAngle = _winAngle + (360 * 8)
local _midLength = (_rollAngle / 2)
local intCnt = 0
while speedIntCnt > 0 do
local retval = GetEntityRotation(_wheel, 1)
if _rollAngle > _midLength then
speedIntCnt = speedIntCnt + 1
else
speedIntCnt = speedIntCnt - 1
if speedIntCnt < 0 then
speedIntCnt = 0
end
end
intCnt = intCnt + 1
rollspeed = speedIntCnt / 10
local _y = retval.y - rollspeed
_rollAngle = _rollAngle - rollspeed
-- if _rollAngle < 5.0 then
-- if _y > _winAngle then
-- _y = _winAngle
-- end
-- end
SetEntityRotation(_wheel, 0.0, _y, 328.41, 2, true) --58.32
Citizen.Wait(0)
end
end)
end)
I was looking at the changes you made and damn I was so close! Thanks for the help!
I’m using Gabz casino MLO. I got everything right except when I go to spin and press “E”… it forces me to walk far away from the wheel and I get stuck walking into a wall… any ideas?
I fixed it. had to changed the coords of the animation on line 162 and the heading on line163 in client.lua
So now my issue is that it says I won a car. but the car isn’t in the garage or assigned to me. Any ideas? I get this error: SCRIPT ERROR: @qb-vehicleshop/server.lua:38: attempt to call a nil value (global ‘GeneratePlate’)
Gotta get this, hopefully I can make it work first try
does this work yet or is people still getting bugs?
How can i disable or remove the chance of winning a car but just keep the cash?
anyone figure out how to edit the win rates? ive tried everything, best i can do is i get it so u barely ever win but when i try to adjusted it again it goes back to winning the car everytime
Hello, what does this part meen?
Add a new garage named ‘casinovalet’ or change ‘casinovalet’ to your garage of choice.
is garage like a car shop or like the place you store your car like qb-garage?
the rotation doesn’t have any effect on my wheel ![]()
