nathan-fivem / qb-luckywheel Goto Github PK
View Code? Open in Web Editor NEWLucky Wheel converted and altered from esx_tpnrp_luckywheel
Lucky Wheel converted and altered from esx_tpnrp_luckywheel
I've set the coordinates to multiple different locations, every single coordinate value available has been changed in an attempt to get it to spawn in front of me, and it still doesn't for whatever reason; server version is set to 2545, which, if it works for 2189, than it should work for this setting?
Hello!
I like your script, but I would like to modify the prizes.
Problem is I am doing someting wrong, but don't know what.
Can you help me please? Thank you very much!
`local QBCore = exports['qb-core']:GetCoreObject()
isRoll = false
amount = 5000
RegisterServerEvent('esx_tpnrp_luckywheel:getLucky', showCar)
AddEventHandler('esx_tpnrp_luckywheel:getLucky', function(showCar)
local _source = source
local xPlayer = QBCore.Functions.GetPlayer(_source)
local PlayerData = xPlayer.PlayerData
local carname = showCar
local _randomPrice = _priceIndex[math.random(1, 20)]
if not isRoll then
if xPlayer ~= nil then
if PlayerData.money['bank'] >= amount then
xPlayer.Functions.RemoveMoney('bank', amount)
isRoll = true
if _priceIndex == 1 then
_money = 5000
elseif _priceIndex == 2 then
_money = 2500
elseif _priceIndex == 3 then
_money = 20000
elseif _priceIndex == 4 then
_money = 10000
elseif _priceIndex == 5 then
_money = 75000
elseif _priceIndex == 6 then
_money = 5000
elseif _priceIndex == 7 then
_money = 30000
elseif _priceIndex == 8 then
_money = 15000
elseif _priceIndex == 9 then
_money = 5000
elseif _priceIndex == 10 then
_money = 7500
elseif _priceIndex == 11 then
_money = 20000
elseif _priceIndex == 12 then
_randomPrice
elseif _priceIndex == 13 then
_money = 5000
elseif _priceIndex == 14 then
_money = 10000
elseif _priceIndex == 15 then
_money = 40000
elseif _priceIndex == 16 then
_money = 25000
elseif _priceIndex == 17 then
_money = 5000
elseif _priceIndex == 18 then
_money = 15000
elseif _priceIndex == 19 then
_money = 150000
elseif _priceIndex == 20 then
_money = 50000
end
xPlayer.Functions.AddMoney('bank', _money)
TriggerClientEvent('QBCore:Notify', _source, 'Lucky Wheel: You won a total of $' .. _money .. '!', 'success')
end
end
end)
`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.