Code Monkey home page Code Monkey logo

qb-jobmenu's Introduction

qb-jobmenu

If you like my work and want to support me : ko-fi

( For any help you can reach us at Discord: Hi-Dev )

A simple job menu that's easy configurable for any job.

Default key to open the menu is F6.

image

Adding jobs

The config is easy as adding your jobname to the config with the menu headers, text, event trigger, submenu name and subheader name. Explanation:

icon = The icon that's used inside the menu header = The header of menu txt = Text used as explanation of the header event = The event that will be triggered when clicked on menu item submenu = The submenu name if it is a submenu, script will group items based on this name subheader = If you will use a submenu, this will be used in the first menu. Script will group submenu items based on this name.

    Jobs = {
        ["police"] = {
            menuoptions = {
                {icon = "fas fa-bell",header = "menu.h_emergency", txt = "menu.t_emergency", event = "police:client:SendPoliceEmergencyAlert",submenu = "", subheader = ""},
            }
        },
        ["ambulance"] = {
            menuoptions = {
                {icon = "fas fa-heart-pulse",header = "menu.h_statuscheck", txt = "menu.t_statuscheck", event = "hospital:client:CheckStatus",submenu = "", subheader = ""},
            }
        },
        ["mechanic"] = {
            menuoptions = {
                {icon = "fas fa-truck-pickup",header = "menu.h_towvehicle", txt = "menu.t_towvehicle", event = "qb-tow:client:TowVehicle",submenu = "", subheader = ""},
            }
        },
    }

Translation

In the header and txt you type the place where your phrase is. For example:

local Translations = {
    menu = {
        h_emergency = "Emergency button",
        t_emergency = "Send an emergency alert",
        h_checkvehstatus = "Check Tune Status",
        t_checkvehstatus = "Control the tune status of the car",
        ...
    }
}

qb-jobmenu's People

Contributors

i-kulgu avatar

Stargazers

 avatar xGenos avatar Seb avatar  avatar  avatar Nat avatar Sandalots avatar  avatar Yevhenii Lukashov avatar  avatar Roman Hossain Shaon avatar cofm dubaii avatar Chiantine P. Manigos avatar Chas avatar  avatar Jones Town avatar jamie avatar  avatar GhostLegion Roleplay avatar Thijmen avatar π—Ίπ—Άπ˜€π˜π—²π—Ώπ—°π˜†π—―π—²π—Ώ avatar Ultra avatar Freb avatar  avatar  avatar iLLeniumStudios avatar Yamada Taro avatar ANZ Gaming Networks avatar S8R avatar

Watchers

Flowrider avatar  avatar  avatar

qb-jobmenu's Issues

Updating when setting job

With the current script, the menu is not updating when a player is set to a new job and then toggle on or off duty. I was able to resolve this by:

Removing

RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo)
PlayerJob = JobInfo
onDuty = PlayerJob.onduty
end)

and putting in:

RegisterNetEvent('QBCore:Client:OnJobUpdate', function(JobInfo)
PlayerJob = JobInfo
end)

RegisterNetEvent('QBCore:Client:SetDuty', function(duty)
onDuty = duty
end)

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.