Seems that the issue is likely around this line.
When you convert it to use your version of qb-menu or whatever, are you passing a table or a string?
Make sure it’s a table. If the issue persists, try this and let me know;
local hasJob = (floor.jobs == nil or floor.jobs[1] == nil)
could you help me with that version? I have been trying to get this working but as I use an older version of nh-context for a bunch of other scripts its conflicting
IIRC the largest change is how nh handles tables. As such, look for the client portion of the script regarding the elevators and switch args to arg1. The section before changing should look like below:
Ive managed to get it to show the options by changing the names of the events but they just come up greyed out and i get locked in the menu until i restart nh-context, options are greyed out even with no job or item requirements
seems like the problem was mainly related to qs inventory not being able to find the item, have hit up quasar so will see if i can get a solution from him
For some reason I cannot get this script to work. I can target on the elevator and click the option but when i do do lick an option, nothing is happening, it doesn’t teleport me or anything
I actually got the floors menu to finally pop up but now i am experiencing the same issue as others where I can’t select any floors because everything is greyed out regardless of the config set up. SO even if i have the required job it still doesn’t make the options available
Sorry guys, I completely forgot about this thread…
So people are having issues with this script since I added the item functionality?
I had a quick look and pretty sure I found the problem in about 5 seconds.
I had v.count on line 128, when it should have been v.amount
I am amazed that nobody else spotted this
I have made this change in the repo → GitHub - GouveiaXS/elevators: elevator script for fivem
Give that a crack and get back to me! @TheFlyBandit@Midnight_Vybe@OttoActual
Ok, I am an idiot…
I changed it from count to amount, thinking it was for QBCore which uses amount, not count.
But it was in the ESX section, so it needs to be count.
So yes, it wasn’t that and I have undone the change on GitHub.
Let me think on it for a bit and see what I can do.
It’s hard when I don’t use qtarget, nh-context or anything to do with this resource xD
So I can’t do any testing. I just helped someone rewrite it haha
Leave it with me…