[Release] Roleplay Toolbox 2.0

Thank you for this amazing release!

My pleasure :slight_smile: Keep an eye out for the NativeUI version :wink:

1 Like

the strecher dosent work for me

holy Shit bro iā€™d love you

1 Like

Panic button
For the next update :+1:

My server had something like this made by our dev team but this one is more advanced,love it.Works fine,it gave me some kind of an error on the console but It might be something to do with other scripts what might affecte it.I will post an pic tomorrow if it still appear on the console.Nice work.:wink:

You need to be near a person to perform this.

Possibly, I like the idea.

Thanks, man! The error must be something to do with your resources as I get no errors.

Need the prop for stretcherā€¦ anyone know what it is called? Currently that option dont do anything but drag the player

Yeah thatā€™s kind of the point, it just drags them.

call it drag then lolā€¦ attach entity to prop would be better

No why should I :joy: Itā€™s for RP purposes, donā€™t like it change it in the HTML.

Na its cool man, I didnt say you should, I assumedā€¦ my bad. Anyone know that prop ID?

Another idea for update
Cones / barriers

This is a simple roleplay toolbox, not a fully functioning menu, there is already something like that on the forums

No worries and not currently no.

i added the toolbox i did not see a radar for police how can i find it

How would I go about removing the engine on/off feature (that also disables the vehicle being off when you get into it)? I have another script that the engine toggle script conflicts with, so thatā€™s why Iā€™m wishing to remove it.

Yeah it just toggles an event, you have to have the Wolf Knight radar installed.

Remove lines 89 and 90

elseif ( data == "engine" ) then 
		TriggerEvent( "Engine" )

Then remove this from line 2151

RegisterNetEvent('Engine')
 
local vehicles = {}
local State = {}
 
Citizen.CreateThread(function()
    while true do
        Citizen.Wait(0)
        if GetSeatPedIsTryingToEnter(GetPlayerPed(-1)) == -1 and not table.contains(vehicles, GetVehiclePedIsTryingToEnter(GetPlayerPed(-1))) then
            table.insert(vehicles, GetVehiclePedIsTryingToEnter(GetPlayerPed(-1)))
            table.insert(State, IsVehicleEngineOn(GetVehiclePedIsTryingToEnter(GetPlayerPed(-1))))
        elseif IsPedInAnyVehicle(GetPlayerPed(-1), false) and not table.contains(vehicles, GetVehiclePedIsIn(GetPlayerPed(-1), false)) then
            table.insert(vehicles, GetVehiclePedIsIn(GetPlayerPed(-1), false))
            table.insert(State, IsVehicleEngineOn(GetVehiclePedIsIn(GetPlayerPed(-1), false)))
        end
        for i = 1, tablelength(vehicles) do
            if (GetPedInVehicleSeat(vehicles[i], -1) == GetPlayerPed(-1)) or IsVehicleSeatFree(vehicles[i], -1) then
                SetVehicleEngineOn(vehicles[i], State[i], State[i], State[i])
            end
        end
    end
end)
 
AddEventHandler('Engine', function()
    local veh
    local StateIndex
    for i = 1, tablelength(vehicles) do
        if vehicles[i] == GetVehiclePedIsIn(GetPlayerPed(-1), false) then
            veh = vehicles[i]
            StateIndex = i
        end
    end
    if IsPedInAnyVehicle(GetPlayerPed(-1), false) then
        if (GetPedInVehicleSeat(veh, -1) == GetPlayerPed(-1)) then
            if IsVehicleEngineOn(veh) then
                State[StateIndex] = false
            else
                State[StateIndex] = true
            end
        end
    end
end)
 
function drawNotification(text) --Just Don't Edit!
    SetNotificationTextEntry("STRING")
    AddTextComponentString(text)
    DrawNotification(false, false)
end
 
function tablelength(T) --Just Don't Edit!
    local count = 0
    for _ in pairs(T) do count = count + 1 end
    return count
end
 
function table.contains(table, element)
  for _, value in pairs(table) do
    if value == element then
      return true
    end
  end
  return false
end

Iā€™d recommend removing the Engine button from the HTML also.

1 Like

So I would love to use this for my VRP gamemode framework, I do have a couple of questions quickly.
Wondering if you could make it so that I could make each tab under a permissions thing so that if your whitelisted as the group ā€œcopā€ or ā€œemsā€ then that tab would show for you? Also, to make it so when you open the menu, you are still able to walk because people like to run from you while your trying to cuff them and with this menu, you are unable to because right when you open it, your unable to move.

I had removed mostly everything from the client.lua regarding the engine script, except everything below ā€œJust Donā€™t Edit!ā€. I went ahead and removed that (as you said), along with the part in the HTML, and everything worked out just fine! Thanks!