Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Added the ability to add vehicle bones #8

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

Conversation

TheeDeer
Copy link

Good for things like opening doors, repairing engines etc, added an example use case at the bottom as well.

Good for things like opening doors, repairing engines etc, added an example use case at the bottom as well.
@TheeDeer
Copy link
Author

When you have more than one bones added and you look from one bone to another it will close the menu and you cannot open it again until you restart the script.

Let me review once again, It is working on my server perfectly fine.

@TheeDeer
Copy link
Author

Should be fixed, Sorry about that. I altered this script on my server to use acePermissions, and when adding it back here I forgot to undo my permissions check.

@LiamDormon
Copy link
Contributor

LiamDormon commented Mar 12, 2021

I would remove the comment from the bottom of the client code and add it to the README as an example instead. I'll upload an example of what I meant with my other comment, it renders this pretty unusable if you want different functions for different bones.

Edit: I'm no longer able to reproduce this issue, if I find a way to reliablely reproduce I will update. Other than that LGTM

@Rosw3lluk
Copy link

I would remove the comment from the bottom of the client code and add it to the README as an example instead. I'll upload an example of what I meant with my other comment, it renders this pretty unusable if you want different functions for different bones.

Edit: I'm no longer able to reproduce this issue, if I find a way to reliablely reproduce I will update. Other than that LGTM

I have managed to reproduce this issue if i have more than 1 Bone inserted in the system, for example "platelight" and "boot" i had added, it was fine if i just had platelight added, however when i add boot and im Focused on the menu and move away it i need to restart the script to use the eyemenu again.

@LiamDormon
Copy link
Contributor

LiamDormon commented Mar 12, 2021

I have managed to reproduce this issue if i have more than 1 Bone inserted in the system, for example "platelight" and "boot" i had added, it was fine if i just had platelight added, however when i add boot and im Focused on the menu and move away it i need to restart the script to use the eyemenu again.

I have doors registered to lock my vehicle and the plate / boot registered to run the plate, I had this issue previously but I'm using the changes from this fork and restarted the server and cannot replicate any more. It's rather baffling

@Rosw3lluk
Copy link

I was wondering if it could potentially be being caused by the loop focused on one thing, then it "Instantly closing the NUI" then instantly attempting to reopen it again, and its crashing either the JS or the nui focus due to the loop running so quick it only seems to do it when im focused never if i unfocus and then look then refocus

@LiamDormon
Copy link
Contributor

I was wondering if it could potentially be being caused by the loop focused on one thing, then it "Instantly closing the NUI" then instantly attempting to reopen it again, and its crashing either the JS or the nui focus due to the loop running so quick it only seems to do it when im focused never if i unfocus and then look then refocus

https://streamable.com/ii9kp6 Yeah I'm struggling to recreate this again, I had this problem yesterday.

@Rosw3lluk
Copy link

I was wondering if it could potentially be being caused by the loop focused on one thing, then it "Instantly closing the NUI" then instantly attempting to reopen it again, and its crashing either the JS or the nui focus due to the loop running so quick it only seems to do it when im focused never if i unfocus and then look then refocus

https://streamable.com/ii9kp6 Yeah I'm struggling to recreate this again, I had this problem yesterday.

https://streamable.com/n6p0g0

Just taken this now as we have been commenting

@LiamDormon
Copy link
Contributor

https://streamable.com/n6p0g0

Just taken this now as we have been commenting

Possibly because OP added different jobs to each option? I've removed that on mine. @TheeDeer might be worth considering removing that from the PR

@Rosw3lluk
Copy link

To be honest i have different jobs on all my options, as its easier than redrawing the polys each time, i have them on zones, peds, models etc.. it literally is just this part that messes up sometimes,

@Rosw3lluk
Copy link

Rosw3lluk commented Mar 12, 2021

Suprisingly just removing the following 2 lines from the last update

targetActive = false
SendNUIMessage({response = "closeTarget"})

Has completely resolved my issue of it crashing, including keeping the job stuff in there 😕

@TheeDeer
Copy link
Author

Let me know if any more issues arise, sorry the fork I have for my server is heavily altered compared to the main branch.

@PhilsBadMan
Copy link

ditto

@NikolaiFN
Copy link

ditto

Same issue here.

@Rosw3lluk
Copy link

This issue does seem to be present still, however i have found that if i pull my weapon out and put it back away it seems to allow the eyemenu to work again.

@Rosw3lluk
Copy link

Okay to fix this i removed the
if success then return end

at the top of the action function, and it seems to stop causing the EyeMenu to stop responding and always seems to work for me now,

@NikolaiFN
Copy link

Okay to fix this i removed the
if success then return end

at the top of the action function, and it seems to stop causing the EyeMenu to stop responding and always seems to work for me now,

Only issue im having now is removing that sometimes the eyemenu now gets stuck open randomly when you open it. Until you hover over a target and click into it and then leave the target.

@TheeDeer
Copy link
Author

@Mojito-Fivem Done

@ArcadiusMachine
Copy link

Hey Mate! @TheeDeer

I tried the code more than once and event directly copied the code from your repository but I always have the same issue. When I target ex. the engine and after I look somewhere else on the vehicle, I still have the engine option. I can't have the doors options after looking at the engine and not stopping to look at the vehicle..

@LiamDormon
Copy link
Contributor

Take a look at my commit here, I've added

targetActive = false
SendNUIMessage({response = "closeTarget"})

to the function and seems to fix the issue.

@ArcadiusMachine
Copy link

Just tried it @Mojito-Fivem but it doesn't work...

@LiamDormon
Copy link
Contributor

LiamDormon commented Apr 23, 2021

Just tried it @Mojito-Fivem but it doesn't work...

¯\_(ツ)_/¯ Works for me

@ArcadiusMachine
Copy link

ArcadiusMachine commented Apr 23, 2021

@Mojito-Fivem Possible to message via Discord? MrZax2000#0001

@LiamDormon
Copy link
Contributor

@Mojito-Fivem Possible to message via Discord? MrZax2000#0001

No.

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

Successfully merging this pull request may close these issues.

6 participants