Coder Social home page Coder Social logo

bd-jobstatus's Introduction

๐Ÿ‘ป Bulgar Development Job Status

FiveM Job Status scripts that serves the purpose to show you the progress of your active job. It is a simple but useful UI that makes the game easier for your players and adds a little bit of prettiness to your fivem server!

๐Ÿ“™ Usage

-- Exports (Client)

-- Shows the job stage container with the given data
exports["bd-jobstatus"]:ShowJobStage(data)

-- Updates the job stage container with the given data
exports["bd-jobstatus"]:UpdateJobStage(data)

-- Hides the job stage container
exports["bd-jobstatus"]:HideJobStage()

-- Events (Client)

-- Shows the job stage container with the given data
TriggerEvent("bd-jobstatus:client:show-job-stage", data)

-- Updates the job stage container with the given data
TriggerEvent("bd-jobstatus:client:update-job-stage", data)

-- Hides the job stage container
TriggerEvent("bd-jobstatus:client:hide-job-stage")

-- Events (Server) - No server events are supported for this resource, but you can trigger the event on the client you want, sooo its a win win.. :D

-- Shows the job stage container with the given data on the given player source
TriggerClientEvent("bd-jobstatus:client:show-job-stage", source, data)

-- Updates the job stage container with the given data on the given player source
TriggerClientEvent("bd-jobstatus:client:update-job-stage", source, data)

-- Hides the job stage container on the given player source
TriggerClientEvent("bd-jobstatus:client:hide-job-stage", source)

-- Params Explenation

-- data - table, contains status data
-- data.job - string, Header text
-- data.title - string/html, The description of the job status (Supports HTML, so you can use <br/> to split the text in new lines)
-- data.hasStatus - boolean, Whether or not you job has a status message (Check the screenshots to get a good idea of that this is)
-- data.statusMessage - string/html, The status message located on the left (Only if hasStatus is true)
-- data.statusValue - string/number/html, The status value located on the right (Only if hasStatus is true)

-- Params Examples

-- 1. If the job has a status message
{
    job = "Ammunation Heist",
    title = "Rob the container <br/> Code: 0W0W",
    hasStatus = true,
    statusMessage = "NPC's",
    statusValue = "1/10"
}

-- 2. If the job doesn't have a status message
{
    job = "Ammunation Heist",
    title = "Rob the container <br/> Code: 0W0W",
    hasStatus = false
}

๐Ÿ“™ Example Usage

RegisterCommand("showjobstage", function()
    exports["bd-jobstatus"]:ShowJobStage({
        job = "Ammunation Heist",
        title = "Rob the container <br/> Code: 0W0W",
        hasStatus = true,
        statusMessage = "NPC's",
        statusValue = "1/10"
    })
end, false)

RegisterCommand("updatejobstage", function()
    exports["bd-jobstatus"]:UpdateJobStage({
        job = "Ammunation Heist",
        title = "Rob the loot box",
        hasStatus = false,
    })
end, false)

RegisterCommand("hidejobstage", function()
    exports["bd-jobstatus"]:HideJobStage()
end, false)

๐Ÿ“ธ Screenshots

Explained Screenshot

Explained Screenshot

Clear Screenshot (With status)

Clear Screenshot (With status)

Clear Screenshot (Without status)

Clear Screenshot (Without status)

bd-jobstatus's People

Contributors

kristiyanpts avatar

Stargazers

Pattarapon Koomphon avatar

Watchers

 avatar

Forkers

vank1ta

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.