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

feat(es_extended/client/blips): add Blip class #1490

Closed
wants to merge 6 commits into from

Conversation

btwlouis
Copy link
Contributor

This pull request introduces a new Blip class to simplify the management of blips. The class encapsulates all functionalities related to blip creation, updates, and deletion, providing an easy-to-use interface for developers.

Benefits

  • Simplifies blip management
  • Improves readability and maintainability of the codebase
  • Reduces code repetition by encapsulating blip operations into reusable methods

Example:

CreateThread(function()
    local blip = ESX.Blip:new({
        coords = vec3(202.50, -841.45, 30.67),
        sprite = 23,
        colour = 2,
        label = "Test Blip",
        scale = 1.5,
        display = 4,
        shortRange = true
    })

    Wait(1000)

    blip:setColour(3)

    Wait(1000)

    blip:setLabel("Test Blip 2")

    Wait(1000)

    blip:setScale(2.0)

    Wait(1000)

    blip:setDisplay(2)

    Wait(1000)

    blip:setShortRange(false)

    Wait(1000)

    blip:setCoords(vec3(202.50, -845.45, 30.67))
end)

Impact on Existing Code

This addition is fully backward-compatible. It does not alter any existing functionality within the framework but provides a modular approach for future blip-related operations.

Next Steps

  • Extend the Blip class with more options to modfiy a blip

Copy link
Contributor

@Arctos2win Arctos2win left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the whole logic into the imports file no need to have internal functions on this one.

@btwlouis
Copy link
Contributor Author

put the whole logic into the imports file no need to have internal functions on this one.

But you only mean the functions like ESX.SetBlipCoords, ESX.SetBlipSprite etc, right? Because I have to track them in order to delete the blips when a script is stopped

@Kenshiin13
Copy link
Contributor

@Arctos2win

@Kenshiin13
Copy link
Contributor

Hey @btwlouis,

Thank you for your contribution! After careful consideration and discussion with the team, we've decided that this feature isn't needed at the moment. We really appreciate the effort you put into it and hope you'll continue contributing in the future. Thank you again!

@Kenshiin13 Kenshiin13 closed this Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Recycle Bin
Development

Successfully merging this pull request may close these issues.

4 participants