Wert Dev Docs
Tebex StoreDiscord
  • ℹ️About Us
  • Products
    • QBCore
      • Wert Pd Roster
      • Wert Jewel Robbery V2
      • Wert Jammer
      • Wert Gps V2
      • Wert Ammunation Jobs
      • Wert Jobs V2
      • Wert Contactless Payment
      • Wert GoPro (Watch vehicles with gopros)
      • Wert Shop Robbery
      • Wert Shops + Delivery Jobs (Buy and manage your shops)
      • Wert Houses
      • Wert Ambulance Job
      • Wert BodyCam (For civilians and jobs)
      • Wert Police Systems V2
      • Wert ChopShop V2
      • Wert Taboo (Play and enjoy)
      • Wert illegal house robbery
      • Wert Banking (Bank ui and system)
      • Wert Paleto Bank Robbery V2
      • Wert Car Arena (Death race, Death match, Arena war)
      • Wert Blackmarket Phone
      • Wert Gang Zone (Advanced Npc System)
      • Wert Fuel Stations (Job, Buy, Manage, Create and more ... )
      • Wert Craft System
      • Wert Merryweather Job
      • Wert Cleaning System And Jobs
      • Wert Weapon Racks (Deployable, Advanced)
      • Wert Water Dispensers (Coolers)
      • Wert Lucky Wheel
      • Wert Evidence System
      • Wert Give Money System
      • Wert Ems Roster System
      • Wert New Year Lottery
      • Wert Vending Machines
    • ESX
      • Wert Shop Robbery
      • Wert Jewel Robbery V2
      • Wert Gps V2
      • Wert Police Systems V2
      • Wert Jobs V2
      • Wert Contactless Payment
      • Wert GoPro (Watch vehicles with gopros)
      • Wert Ammunation Jobs
      • Wert BodyCam (For civilians and jobs)
      • Wert ChopShop V2
      • Wert Taboo (Play and enjoy)
      • Wert illegal house robbery
      • Wert Paleto Bank Robbery V2
      • Wert Jammer
      • Wert Car Arena (Death race, Death match, Arena war)
      • Wert Banking (Bank ui and system)
      • Wert Fuel Stations (Job, Buy, Manage, Create and more ... )
      • Wert Gang Zone (Advanced Npc System)
      • Wert Blackmarket Phone
      • Wert Craft System
      • Wert Merryweather Job
      • Wert Cleaning System And Jobs
      • Wert Weapon Racks (Deployable, Advanced)
      • Wert Water Dispensers (Coolers)
      • Wert Lucky Wheel
      • Wert Evidence System
      • Wert Give Money System
      • Wert Ems Roster System
      • Wert New Year Lottery
      • Wert Pd Roster
      • Wert Vending Machines
      • Wert Ambulance Job
    • Qbox
      • Wert Pd Roster
      • Wert Jewel Robbery V2
      • Wert Jammer
      • Wert Gps V2
      • Wert Ammunation Jobs
      • Wert Jobs V2
      • Wert Contactless Payment
      • Wert GoPro (Watch vehicles with gopros)
      • Wert Shop Robbery
      • Wert Shops + Delivery Jobs (Buy and manage your shops)
      • Wert Houses
      • Wert Ambulance Job
      • Wert BodyCam (For civilians and jobs)
      • Wert Police Systems V2
      • Wert-ChopShopV2
      • Wert Taboo (Play and enjoy)
      • Wert illegal house robbery
      • Wert Banking (Bank ui and system)
      • Wert Paleto Bank Robbery V2
      • Wert Car Arena (Death race, Death match, Arena war)
      • Wert Blackmarket Phone
      • Wert Gang Zone (Advanced Npc System)
      • Wert Fuel Stations (Job, Buy, Manage, Create and more ... )
      • Wert Craft System
      • Wert Merryweather Job
      • Wert Cleaning System And Jobs
      • Wert Weapon Racks (Deployable, Advanced)
      • Wert Water Dispensers (Coolers)
      • Wert Lucky Wheel
      • Wert Evidence System
      • Wert Give Money System
      • Wert Ems Roster System
      • Wert New Year Lottery
      • Wert Vending Machines
    • STANDALONE
      • Wert Npc Dialog System
      • Wert Racing Hud
Powered by GitBook
On this page
  • INSTALLATION
  • OX LIB OPTION
  • OPEN FILES
  1. Products
  2. Qbox

Wert Lucky Wheel

You can access the setup information you need about this product

PreviousWert Water Dispensers (Coolers)NextWert Evidence System

Last updated 10 months ago

INSTALLATION

1 - Upload the script folder to the location of your resources

2 - Check config file for your own settings

3 - Installation successful, have a good funs

OX LIB OPTION

There are many ox settings available in the files, if you want, you can configure them.

If you want to use ox_lib, please check if this link is enabled on fxmanifest.check it out from inside lua. this must be turned on before you can use ox_lib. After opening it, it will be enough to use the refresh and ensure commands.

OPEN FILES

Config = {}

Config.UseTarget = true
Config.TargetDistance = 1.5
Config.DebugPoly = false
Config.NoTargetDistance = 1.5
Config.NoTargetInteractionKey = 38 -- [E] | https://docs.fivem.net/docs/game-references/controls/
Config.OxLib = false

Config.WheelCoolDown = 30 -- 30

Config.WheelSoundSettings = {
    max_distance = 20,
    min_volume = 0.1,
    max_volume = 0.8,
}

Config.WheelModel = 'vw_prop_vw_luckywheel_02a'
Config.BorderModel = -1901044377
Config.BlueMarkerModel = 554774312

Config.TargetIcon = 'fa-solid fa-arrows-spin'
Config.InteractionIcon = '<i class="fa-solid fa-arrows-spin"></i>'

Config.RollAnim = {
    lib = 'anim_casino_a@amb@casino@games@lucky7wheel@male',
    anim = 'enter_right_to_baseidle',
    anim_two = 'enter_to_armraisedidle',
    anim_three = 'armraisedidle_to_spinningidle_high',
}



Config.RewardMultiple = {
    ['1'] = 2,
    ['3'] = 4,
    ['5'] = 6,
    ['10'] = 11,
    ['20'] = 21,
}

Config.RewardChances = {
    ['1'] = 50,
    ['3'] = 20,
    ['5'] = 15,
    ['10'] = 10,
    ['20'] = 5,
}

Config.CreateNpcZOffset = 1.0

Config.WheelSpinNowNotif = true
Config.WheelSpinNowNotifCoordCheck = true
Config.LoseNotif = true
Config.WinNotif = true
Config.WinSound = true
Config.WinSoundVolume = 0.3

Config.Locations = {
    {
        whell_pos = vector4(201.47, -928.48, 29.69, 57.86),
        ped_model = `s_f_y_casino_01`,
        ped_pos = vector4(200.76, -930.12, 30.69, 234.83),
        move_pos = vector4(200.66, -929.87, 30.69, 55.89),
    },
}
local QBCore = exports['qb-core']:GetCoreObject()

function CustomNotifVariation(text, style, time)
    if Config.OxLib then
        lib.notify({title = 'Notification', description = text, type = style})
    else
        QBCore.Functions.Notify(text, style, time)
    end
end

function CustomTargetFunction(data)
    exports["qb-target"]:AddTargetEntity(data.entity, {
        options = data.options,
        distance = data.distance
    })
end

function ShowTextUI(text, icon)
    if Config.OxLib then
        lib.showTextUI(text, {position = 'left-center', icon = icon})
    else
        exports['qb-core']:DrawText(text, 'left')
    end
end

function HideTextUI()
    if Config.OxLib then
        lib.hideTextUI()
    else
        exports['qb-core']:HideText()
    end
end

RegisterNetEvent('wert-luckywheel:client:custom-notif', function(text, style, time)
    CustomNotifVariation(text, style, time)
end)
local QBCore = exports['qb-core']:GetCoreObject()

local function getFirstLetterUppercase(str) return str:sub(1, 1):upper() end

function CheckPlayerAddBetMoney(src, amount)
    local ply = QBCore.Functions.GetPlayer(src)
    if not ply then return false end
    local money = ply.PlayerData.money.cash
    if (money - amount) >= 0 then return true else return false end
end

function RemovePlayerMoney(src, amount)
    local ply = QBCore.Functions.GetPlayer(src)
    if not ply then return end
    ply.Functions.RemoveMoney('cash', amount)
end

function AddPlayerMoney(src, amount)
    local ply = QBCore.Functions.GetPlayer(src)
    if not ply then return end
    ply.Functions.AddMoney('cash', amount)
end

function GetPlayerNameLetters(src)
    local ply = QBCore.Functions.GetPlayer(src)
    if not ply then return 'PR' end
    local firstname = ply.PlayerData.charinfo.firstname
    local lastname = ply.PlayerData.charinfo.lastname
    local one = getFirstLetterUppercase(firstname)
    local second = getFirstLetterUppercase(lastname)
    return one .. '' .. second
end

function GiveSpinReward(src, bet, multiple, percante)
    local ply = QBCore.Functions.GetPlayer(src)
    if not ply then return end
    local amount = bet * multiple
    ply.Functions.AddMoney('cash', tonumber(amount))
    if Config.WinNotif then
        local oldnotif = LANG.player_won_text
        local newnotif = string.format(oldnotif, amount, percante)
        TriggerClientEvent('wert-luckywheel:client:send-ui-notif', src, {
            header = LANG.player_won_header,
            text = newnotif,
            style = 'success'
        })
    end
    if Config.WinSound then TriggerClientEvent('wert-luckywheel:client:wheel-win-sound', src) end
end
LANG = {
    target_label = "Roll",
    notarget_label = "[E] Roll",
    rolled_header = 'WHEEL ACTIVE NOW!',
    rolled = "You have spun the wheel!",
    this_wheel_busy = "Wheel busy you need wait!",
    money_error_header = 'BET COULD NOT BE ADDED!',
    money_error_text = 'You are not have enough money!',
    player_won_header = 'WON!',
    player_won_text = 'You won $%s for make bet %s',
    player_lose_header = 'LOSE!',
    player_lose_text = "You didn't win, good luck next time!",
    ui = {
        -- UI Locales here
        header = 'WHEEL OF FORTUNE',
        information = 'Place your money in the betting sections. If the wheel lands on the numbers you have selected, you will win!',
        remaining_time = 'REMAINING TIME',
        remaining_time_desc = 'When the wheel turns all bets are finalized',
        second = 's',
        percante_1 = '1',
        percante_3 = '3',
        percante_5 = '5',
        percante_10 = '10',
        percante_20 = '20',
        percante_1_multiple = 'PAYS X2',
        percante_3_multiple = 'PAYS X4',
        percante_5_multiple = 'PAYS X6',
        percante_10_multiple = 'PAYS X11',
        percante_20_multiple = 'PAYS X21',
        bet_settings = 'BET SETTINGS',
        bet_description = 'After select the bet amount, you can set a bet with a left click. Use the right click to clean it.',
        money_format = '$',
        players = 'PLAYERS',
        players_info = '%s PLAYERS PLAYING',
        total_bet_info = 'TOTAL BET : %s$',
        history = 'ROUND HISTORY',
        last_rounds_not_found = 'LAST ROUNDS NOT FOUND',
    },
}