[RELEASE] [ESX] Diamond Casino Lucky Wheel

Hello guys,

  • My server is off so I’ll release this casino script. It can sync to everyone who in casino and only 1 player can roll the wheel.
  • Reward is random and send from server. (No client cheat :slight_smile:)
  • If you have any improvement to this please make a pull request.

Bugs:

  • Sometime wheel roll does not show correct reward( About +5 to 10 rad). This is error in calculate wheel speed and stop time. This is not effect gift result.
  • Do not restart this resource (It require to complete server restart)

Download:
Download link (Github)

Car reward:
About car reward you have to put this in client. You can change NetEvent name “esx_tpnrp_luckywheel:winCar” to anything to prevent LUA Executor

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)

Screenshot & Video:

https://drive.google.com/file/d/1sZXe2InUlBy0KBbkvmB1RzYlOttt8WOW/view

32 Likes

Loading…

1 Like

it!s work or not bro?

Yes. You can watch the video

Hello I have a bug SCRIPT ERROR: @ esx_tpnrp_luckywheel / server / server.lua: 112: attempt to index a nil value (field ‘Math’)

It require ESX

1 Like

ESX is available to me

Can you remove this function and test again? ESX.Math.GroupDigits()

without the command it works

1 Like

wich interieur did you use ?

finally someone knows were to stick the spinner wheel lol… good job bro

Bandicam

The roulette stays like that, you know how I could put it back in its place?

its not working as well
not spawning as well

what ymap use you for the casino?

A Self Coded Innterior is the Diamond Casino & Resort nothing els

There is a guy share diamond casino pack. I don’t know what his link.

2 issues ive discovered so far:Sometimes when you walk up to the wheel it doesnt show the “press E to spin” notification but you are still able to spin, second issue: the wheel bugs out and you cant spin if you try to spin and dont have enough money the wheel just stop working until server has been restarted (or the resource but then it creates a duplicate of the wheel so server restart is necessary) other then that this is super cool! :black_heart:

1 Like
  1. I didn’t get this bug. I’ll find more
  2. It will work again if other player spin the wheel.

Hi i have a problem with the wheel all is good but when i spin, the heading of wheel change to 0.0 how can i set this to work https://streamable.com/ogj8a

1 Like