[Release] Roleplay Toolbox 2.0

Is there a way to change it so it doesn’t turn off your vehicle when you hit Q? It’s interfering with my ELS key binds.

This is pretty awesome. However, is there a way to add a permission to the LEO and FD/EMS toolbox? On my server we don’t have public cops.

You can always script in permissions yourself…

Would anyone know how to add a function to spawn cars from this menu? Just the code

There is not, as it uses NUI, there are ways to use permissions, but the entire code would have to be rewritten and I don’t plan on doing that and as it uses NUI no you can’t walk around with it. However the NativeUI version can, however it is still in development.

You’re welcome, mate!

What do you mean if you mean the Menu keybind yes you can change it scroll up, if you mean the engine staying on because of ELS that is a known bug. However, I don’t use ELS so I have never encountered it.

Yeah neither do we, as I said above it is possible two ways, creating separate menu’s inside the toolbox, for permissions, so if you had permissions as a cop, you could see cop, civ, and vehicle, if you had no permissions you can only see civ and vehicle. But I don’t plan on doing that, as this is just a simple roleplay toolbox.

Exactly this guy gets it, this is just an example with roleplay features, customize it how you like on your server, just don’t repost it without my permission. :point_up_2:

I have already told you if you want to do that edit the html, then use the search button or create a function that creates a vehicle entity, uses the hashkey of the model in the function to spawn that specific vehicle. Plenty of good examples of how to do this on the forums.

With Vespura’s permission you could use his /car command script, add an on screen keyboard to his code and add that to the menu, boom you’ll be able to spawn cars from the menu

Yeah that should work, you could do that shouldn’t be too hard, or just change it so instead it uses.

if IsVehicleModel(car, GetHashKey("carmodel",_r))

Then create it.

Recommend using this - https://runtime.fivem.net/doc/reference.html#_0xAF35D0D2583051B0

1 Like

hey lucifer great work on the script,
was just wondering is there a way to make it so you can still control the player/drive whilst using the menu
or is impossible in its current form because of SetNuiFocus

From my experience this is impossible, scroll up I already talked about this.

That is not possible as far as I know as the ActionMenu uses the SetNuiFocus function to bring the game’s focus to the web side.

thanks guys i though so and yeah sorry only glimpsed at the previous posts and must of overlooked it,
thanks for the feed back and again great script keep up the good work @BabbaTundaee

I did not know there was a way to make certain menu visible/invisible through permissions. Also, is there some material where I can read more about setting permission through lua? I have some idea of how it works but mainly by looking at other resources that use it. Would be great to be able to learn more specific details about it.

Well no it wouldn’t be visible/invisible, it would be creating separate menu’s, and having those permissions would allow them to display, but this is not permission based.

Ahhh I see what you mean now. Also just wondering, but any idea how to fix the issue where sometime the menu takes forever to pull up after pressing the assigned key? I was testing it with a few members yesterday and it seems I was the only one having this problem but at time the menu would take around 20-30seconds before appearing on the screen. During that time I cant hit escape or so anything. My computer: i7 6700k, 16gb ram, gtx 1080ti. I was the only person having that issue out of the 4 people that was testing it with me. Server is ran on a dedicated machine.

There is a current bug with the NUIFocus. try pressing the key then scrolling your mouse where the menu would appear.

Alright. Will try that later today. Thank you.

i do i dont see the button to open it at all

Then you have installed it wrong.

i downloaded it and but it in to my server and added it to the server config and it works in the server the radar button does not

Then you have done something wrong, make sure you have this in the HTML

               <div id="examplesubmenu2" data-parent="mainmenu" style="display: none;">
			    <button class="menuoption" data-sub="examplesubmenu3">Actions</button>
				<button class="menuoption" data-sub="examplesubmenu13">Clothing</button>
				<button class="menuoption" data-sub="examplesubmenu8">Emotes</button>
            </div>