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
)
- 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