Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ESX Bridge #20

Open
wants to merge 41 commits into
base: main
Choose a base branch
from
Open

ESX Bridge #20

wants to merge 41 commits into from

Conversation

Maximus7474
Copy link

All systems should be functional, I've tested them to the best extent with a single client.
Some features are harder to integrate by default because it depends what the end user uses/configures on his server, this includes:

  • Billing System for fines
  • Changing ID Images
  • Getting the User's phone number

The property system is based of esx_property, but as for the phone and billing I'll try to add custom functions and integrations for these in bridge/esx/shared.lua

bridge/esx/database/alterESX-DB.sql Outdated Show resolved Hide resolved
Forgot to remove my DB name for it to work for others
@Maximus7474
Copy link
Author

I'm an idiot for not checking everything, issue with late night development.
Hold the PR for the moment

@Maximus7474 Maximus7474 marked this pull request as draft April 23, 2024 19:41
@Maximus7474 Maximus7474 marked this pull request as ready for review April 23, 2024 19:54
@Maximus7474
Copy link
Author

Fixed and Checked again

@Oublions
Copy link

I use it on my server. Just had to do one modification because my server doesn't have this only isBoss callback. Just had to verify by another way.

function Bridge.getPlayerInfo()
    local xPlayer = ESX.GetPlayerData() or {}

    local isBoss = false
    if (xPlayer.job ~= nil and xPlayer.job.grade_name == "boss") or 
       (xPlayer.job2 ~= nil and xPlayer.job2.grade_name == "boss") then
        isBoss = true
    end

    local img = profilePicture or lib.callback.await("ND_MDT:esx:getProfileImage", false)
    if img ~= profilePicture then
        profilePicture = img
    end

    return {
        firstName = xPlayer.firstName or "",
        lastName = xPlayer.lastName or "",
        job = xPlayer?.job?.name or "",
        jobLabel = xPlayer.job?.label or "",
        job2 = xPlayer?.job2?.name or "",
        job2Label = xPlayer.job2?.label or "",
        callsign = xPlayer?.metadata?.callsign or "",
        img = img,
        isBoss = isBoss,
    }
end

Anyway good job.

@Maximus7474
Copy link
Author

Well, I understand your approach but base ESX doesn't have dual jobs so it wasn't integrated for that reason 😅

@Andyyy7666
Copy link
Member

Thank you for your contribution @Maximus7474, I've been MIA from FiveM but I'll now review this and merge. If I remember correctly esx had job grades maybe that can be used to determine if the player is a high enough rank.

@Maximus7474
Copy link
Author

Hey Andy,

No probs at all, thought so. I'm not quite sure anymore what other stuff I've changed on it since.
Job grades in esx are number based, so you can quite easily define a hierarchy in that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants