Giter Club home page Giter Club logo

qb-luckywheel's Introduction

esx_tpnrp_luckywheel to qb-luckywheel

Created by Sn0wBiT & converted to QB Framework by Nathan#8860 Alterations made to payouts & .ytd for the lucky wheel

Require:

  • QBCore
  • Server Running Build 2189
  • Stream the Diamond Casino for placement or change co-ords

BT-TARGET CONFIG

["casinowheel"] = { name = "casinowheel", coords = vector3(1109.7, 229.03, -49.64), debugPoly = false, useZ = true, radius = 1.5, options = { { type = "client", event = "casino:spinwheel", parameters = {}, icon = "fas fa-coins", label = "Spin the wheel $500", job = {"all"}, }, { type = "client", event = "casino:turbowheel", parameters = {}, icon = "fas fa-coins", label = "Turbo Spin $5000", job = {"all"}, }, { type = "client", event = "casino:luckyticket", parameters = {}, icon = "fas fa-coins", label = "Spin the wheel [Ticket]", job = {"all"}, }, }, distance = 1.5 },

PED SPAWN

-- LUCKY WHEEL CASINO LADY { model = u_f_m_casinoshop_01, -- Model name as a hash. coords = vector4(1109.7, 229.03, -49.64, 185.62), -- (X, Y, Z, Heading) gender = 'female', -- The gender of the ped, used for the CreatePed native. scenario = 'WORLD_HUMAN_STAND_IMPATIENT', -- Task Scenario },

KNOWN ISSUE

Sometimes it will land on "CAR" but not payout this is an error within my math I believe, I have added a server side print so you can see what the person landed on if a complaint occurs.

qb-luckywheel's People

Contributors

nathan-fivem avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

qb-luckywheel's Issues

Wheel Invisible, Not Loading

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?

Would like to modify prizes, what am I doing wrong?

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)

image

`

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.