[RELEASE] [ESX] Diamond Casino Lucky Wheel

I like your HUD. Can you share it?

can someone help please ive tried everything i can and still nothing

Where does this go please @ChieF-TroN

in client.lua

Hi.
I can use my luckywheel but i can"t see, anyone know for what please ?

1 Like

HI guys i have this bug,
i have good mapping but idk why i cant see the wheel and how its spinning .

Hi, nice script. I´m using it in my server.
I have some issues. First when the player wins the car it doesnt asign it to the winner. It doesnt give any error. The vehicle spawns, you get warped in it but it belongs to no one.
My second problem is that the music that must sound with this script doesnt sound at all. When the script get started it loads the files of the sound but nothing. Any idea?
Thanks

did you add this?
esx_vehicleshop\client\main.lua

Put this code in

--- LUCKYWHEEL
RegisterNetEvent("esx_tpnrp_luckywheel:winCar")
AddEventHandler("esx_tpnrp_luckywheel:winCar", function() 
    
    ESX.Game.SpawnVehicle("lp700r", { x = 933.29,y = -2.82, z = 78.76 }, 144.6, function (vehicle)
        TaskWarpPedIntoVehicle(playerPed, vehicle, -1)

        local newPlate     = GeneratePlate()
        local vehicleProps = ESX.Game.GetVehicleProperties(vehicle)
        vehicleProps.plate = newPlate
        SetVehicleNumberPlateText(vehicle, newPlate)

        TriggerServerEvent('esx_vehicleshop:setVehicleOwned', vehicleProps)

        ESX.ShowNotification("Bạn đã nhận được siêu xe Lambo 700R!")
    end)

    FreezeEntityPosition(playerPed, false)
    SetEntityVisible(playerPed, true)
end)

I have to add it in vehicleshop client??
I added it in the client of LuckyWheel. Thought that the “TriggerServerEvent(‘esx_vehicleshop:setVehicleOwned’,” will call to vehicleshop properly
I´ll give it a try. Hope it works. If it´s that the problem im gonna hit my head to the wall XD

That was exactly the problem. Thats what happen when you dont follow instructions… THANKS!!!

3 Likes

me too, i fixed it

Has anyone fixed the issue with the wheel object not showing whatsoever? Other then that the script works.

too many people pm ask me how to fix it, so i post it here

here’s success screen

just change the wheel position

this my wheel postion
_wheel = CreateObject(model, 1111.05, 229.81, -50.38, false, false, true)
SetEntityHeading(_wheel, 0.0000)
SetEntityRotation(_wheel, 0.0, _y, 0.0000, 2, true)

You need to test the right place

i used this dc map

Its missing one damn =

before -> local baseWheelModel GetHashKey(‘vw_prop_vw_luckywheel_01a’)
after -> local baseWheelModel = GetHashKey(‘vw_prop_vw_luckywheel_01a’)

Line 23

8 Likes

Mee to, please help me!

So you are relying on the client to tell the server which car model the player has won ? That is the most insecure way of handling winnings. Why not handle it serverside like the rest of the winnings ??

1 Like

Hello guys!
I have a problem with the wheel display, I tried several mapping present above or on the internet but nothing does so I allow myself to leave you a video to show you the current mapping that I have and what I encounter as worries

hey have you released that hud i really like it

my car flying

Ok got mine working but looks like u can play forever if u have money, is there any way to make it playable like once per day ?!

PS: Ok after playing it 5 or 6 times mine stopped working with this error from server

es_extended/server/classes/player.lua321:attemp to index a nil value (local ‘item’) ?! any help with this ?!

and does this translation means ?! “đã thắng được 1 mũ 1, giáp 1” even with google translater couldnt figure it out