[QB] Staxzs Bartender

A script by IngPleb

No reviews yet.
[QB] Staxzs Bartender main image

Price

$3.00

Full Description

Mix drinks with ease if you have the skills!

Powerful, highly configurable & sleek design for mixing and crafting drinks with a mini game and animation. With high support with qb-target and for basic marker with unlimited locations settings. Localization was designed so you never have to touch any web stuff – simply drag & drop!


Features

  • QB Support
  • 💻 Custom NUI
  • 🎲 Mini-Game
  • 👁️ QB-Target Support
  • ❕ Marker Support (PolyZone required)
  • 📣 Command Support
  • 👨‍🎨 Fully Configurable (From preferences & translations)
  • 📰 English, Spanish, Czech, French & German translations included
  • 🤖 Animations
  • 🔧  Optimized (Idle -> avg. 0.0 ms)
  • 🎫 Cheater Protected (event abuse)
  • 🍹 Premade Icons for Drink Items
  • 👮‍♂️ Fast & Flexible Support
  • 🐛 Bug Tested
  • 🔒 Escrow Protected

Buy

  • TEBEX (€3 + TAX)

    • The tax depends on your region
  • For any inquiry follow the TEBEX link and find our official support!

Configuration Example

Configuration

    -- Should we use Target?
    -- Note: Go to your server.cfg and add `setr UseTarget true` if not already included to use
    --  this and just that from true to false or the other way around
    UseTarget = GetConvar('UseTarget', 'false') == 'true',

    -- Language settings
    -- Languae settigns are automatically loaded from the convar set in the server.cfg
    -- If the convar is not set, the default language is used
    Locale = GetConvar('qb_locale', 'en'),

    -- TargetSettings table containing settings for the target
    -- BoxWidth (number) The width of the target box
    -- BoxHeight (number) The height of the target box
    -- Icon (string) The icon to display on the target
    -- Distance (number) The distance to interact with the bartender
    TargetSettings = {
        BoxWidth = 1,
        BoxHeight = 1,

        -- Icon to display on the target
        Icon = "fas fa-sign-in-alt",

        -- The distance to interact with the bartender
        Distance = 2.0,
    },


    -- MarkerSettings table contains settings for the marker.
    -- UseMarker (boolean): Set to true if you want to display a marker, false otherwise.
    -- MarkerDistance (number): The distance at which the marker should be visible.
    -- MarkerType (number): The type of marker to use. (1 = regular marker, 2 = cylinder marker)
    -- MarkerColor (table): The color of the marker in RGBA format.
    -- MarkerSize (table): The size of the marker in XYZ dimensions.
    -- MarkerZOffset (number): The offset of the marker on the Z-axis.

    -- UseDistance (number): The distance at which the PolyZone should be considered in use.
    -- UseKey (number): The key code for activating the PolyZone.
    -- TextPosition (string): The position of the text. (left, center, right)
    PolyZoneSettings = {

        MarkerSettings = {
            UseMarker = true,
            MarkerDistance = 3.0,
            MarkerType = 1,
            MarkerColor = { r = 0, g = 255, b = 0 , a = 100 },
            MarkerSize = { x = 1.0, y = 1.0, z = 1.0 },
            MarkerZOffset = -1.0,
        },

        UseDistance = 1.0,
        UseKey = 38,

        TextPosition = "left"
    },

    --[[
        Drinks that can be mixed

        Name:
            1. The name is an identifier for the drink, it should be unique and not contain spaces or special characters
            2. The name should be an identifier of an in-game item
            Example: "vodka"

        Label:
            1. The label is the name of the drink that will be displayed in the menu
            Example: "Vodka"

        Price:
            1. The price is the cost of the drink
            Example: 15

        Difficulty:
            1. The difficulty is the difficulty of the minigame

            The difficulty is used in these calculations:
                1. Speed of the catch area * difficulty
                2. Speed of the icon * difficulty
                3. Area size / difficulty

            Example: 1
    ]]
    Drinks = {
        ["vodka"] = {
            label = "Vodka",
            price = 15,
            difficulty = 1
        },
        ["rum"] = {
            label = "Rum",
            price = 12,
            difficulty = 1
        },
        ["gin"] = {
            label = "Gin",
            price = 10,
            difficulty = 1
        },
        ["tequila"] = {
            label = "Tequila",
            price = 8,
            difficulty = 1
        },
        ["whiskey"] = {
            label = "Whiskey",
            price = 14,
            difficulty = 1
        },
        ["triple-sec"] = {
            label = "Triple Sec",
            price = 3,
            difficulty = 3
        },
        ["mojito"] = {
            label = "Mojito",
            price = 4,
            difficulty = 3
        },
        ["gin-tonic"] = {
            label = "Gin&Tonic",
            price = 5,
            difficulty = 3
        },
        ["cola"] = {
            label = "Cuba libre",
            price = 6,
            difficulty = 3
        }
    },

    -- Animation to play when mixing a drink
    -- You can find animations at https://forge.plebmasters.de/animations/
    Animaiton = {
        Anim_Dictionary = "anim@scripted@player@mission@tun_table_grab@cash@",
        Anim_Name = "grab",
    },


    --[[
        Locations table contains information about different locations for the bartender.

        Each location has the following properties:
        - AllowedJobs: A list of jobs that are allowed to access the bartender at this location.
        - Coords: The coordinates of the location where the bartender is located.
        - BlackListedDrinks: A list of drinks that are blacklisted at this location.

        Example usage:
        local Locations = {
            ["vanilla"] = {
                AllowedJobs = { "barman, vanilla" },
                Coords = vector3(129.96, -1282.15, 29.27),
                BlackListedDrinks = {}
            },
        }
    ]]
    Locations = {
        ["vanilla"] = {
            AllowedJobs = { "barman, vanilla", "police" },
            Coords = vector3(129.96, -1282.15, 29.27),
            BlackListedDrinks = {}
        },
    },

    --[[

        Command:
            - Enabled (boolean): Specifies whether the command is enabled or not.
            - Name (string): The name of the command.
            - Permission (string): The required permission to use the command.
    ]]
    Command = {
        Enabled = true,

        Name = "bartender",

        Permission = "user",

        AllowedJobs = { "vanilla" }
    },

    -- Use only if requested by the support
    Developer = {
        Debug = false,
    }
Event Abuse Protection
    --[[
        Function: onEventAbuse

        Description:
        This function is called when there is a potential abuse of an event. It allows you to add your own logic to handle the abuse.

        Parameters:
        - src: The source of the event abuse.
        - eventName: The name of the event that was potentially abused.
        - playerJob: The job of the player involved in the potential abuse.
        - allowedJobs: A table containing the jobs that are allowed to perform the event.

        Returns:
        This function does not return any value.

        Example:
        ```
        onEventAbuse(source, "eventName", "playerJob", {"allowedJob1", "allowedJob2"})
        ```
    ]]
    onEventAbuse = function(src, eventName, playerJob)
        -- Add your own logic here
        DropPlayer(src,
            "You have tried to invoke an event that you are not allowed to use under these conditions! If you believe this is an error, please contact the server administrator.")
    end

Preview

Youtube


Code is accessible No (except NUI & configuration)
Subscription-based No
Lines (approximately) ~1100
Requirements QB-Core, QB-target (if enabled) or PolyZone (if enabled)
Support Yes