Emergency Vehicle Creator

Good idea, will add to the next release

1 Like

New update :

2.0.9

:white_check_mark: Set maximum number of lights / equipements per vehicle
:white_check_mark: Extras on objects as well as on lights
:white_check_mark: Bugfix error on server identifier is nil
:white_check_mark: Extras and doors settings will be applied on load

1 Like

Hey, we are using the evc script with ESX Jobs and managed to limit the usage of the Script to a user_license. I’m wondering if it is possible to limit the lights to different jobs. For example that the job “mechanic” only can choose the yellow ones and the “police” the blue-red ones… is it possible to modify the Config.Models.Lights in the Custom Files? I tried it, but couldn’t get it to run.

Another Question, is it possible to provide custom “Labels” to the Lightbars, e.g. that they are not displayed as ‘lightbarlong’, ‘lightbarlongred’

Hey it’s possible to limit the jobs that have access to the menu but it’s not yet possible to define which jobs has access to which light(s)
I feel like it would make configuration much more complicated

It’s not yet possible but could be added

Hello again, we are currently testing a bit and have installed the lightbars from D3SWhelen, but unfortunately we can’t seem to get to the EVC extras menu. Is there a trick we have to consider?

Hey, check the configuration file under Shared/shared.lua
You have to set Extra = true for that light to be able to see the “Extras” submenu

Can you update please for new esx

The ESX calls are unencrypted and are located inside the Custom folder. You can modify them

NativeUI is not maintain anymore, replace by LemonUI ? An update could be possible ?

It’s not planned for now as NativeUI works fine but maybe in the future

Oh okay, i don’t know about that.
We on our server for example have a couple of jobs that have access to the menu but every job has it’s own “light colors”. E.g. Medics are Red/Red | Cops are Blue/Blue | Tow Service is Amber only | Event Vehicles are Green | and so on.

We thought about using the menu for our taxi company as well for taxi signs, but then all the taxi drivers would have access to all the light bars, and that’s a bit unattractive.

Maybe you find a comfortable solution in terms of configuration.

Hi !

I’ve got few questions about your script :

  • You talked about whitelist, is it possible to have a custom whitelist system, through database for example or must it be through identifiers/esx/qbcore ?
  • Is the script standalone ?
  • You’re test server is in a old gamebuild, do you know if it’s possible to update it (i can’t join the server because of that) ? Btw, I guess yes but the script was developped for last gamebuilds ?

Thanks by advance for your responses

Dylan

Since it’s a specific request and wasn’t requested by anybody else than you I’ll post a modified version here :

  • Create a new file under Custom/Client/job_lights.lua and model tables based on the one in Shared/shared.lua and make each category a job name, for instance :
JobModels = {
  police = {
    Lights = {
      ["fbiold"] = {Offset = vector3(-0.45, -0.1, 0.9)},
    },
    Objects = {
      ["object1"] = {},
    },
  },
  ambulance = {
    Lights = {
      ["lightbarTwoSticks"] = {Offset = vector3(0.0, 0.45, 0.65)},
    },
    Objects = {
      ["object2"] = {},
    },
  },
  mechanic = {
    Lights = {
      ["longLightbar"] = {Offset = vector3(0.35, -1.15, 0.75)},
    },
    Objects = {
      ["object3"] = {},
    },
  },
}
  • A the bottom of this file load the models for this job when receiving the whitelist result
RegisterNetEvent(GetCurrentResourceName()..":CheckAccess", function(bool)
    -- To adapt to ESX / QBCore / ...
    ESX = nil
    while ESX == nil do
      TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
      Citizen.Wait(100)
    end
    local job = ESX.GetPlayerData().job.name
    -- No modification after here
    if JobModels and JobModels[job] then
      Config.Models = JobModels[job]
      Models = {}
      for type,models in pairs(Config.Models) do
        Models[type] = {}
        for k,_ in pairs(models) do
          if IsModelInCdimage(GetHashKey(k)) then
            table.insert(Models[type], k)
          else
            Nabla.Log(Nabla.LogLevels.WARN, "Model in Config.Models is not loaded", k)
          end
        end
        table.sort(Models[type])
      end
    else
      Nabla.Log(Nabla.LogLevels.WARN, "JobModels nil or job not in JobModels", JobModels, job, JobModels[job])
    end
end)
  • Enjoy !

Let me know if you have any issue

Hello there !

Yes the whitelisting is not encrypted and located in the Custom folder

The script requires NativeUI and OneSync
It comes with some lights / objects and you can purchase more

The server has been updated, thank you for the heads up
And yes it works with latest game builds

1 Like

In case of ESX you have to modify the line

local job = ESX.GetPlayerData().job

to

local job = ESX.GetPlayerData().job.name

then it is working.

Perfect, thank you a lot!

1 Like

Thank you for the feedback, I edited the original answer

Hey, I’ve noticed a mistake:
If I split up the blue lights accordingly, only the individual blue lights load for the individual professions. In other words, if someone from the Police profession has the FIBOLD installed, this blue light is only spawned for other professions with FIBOLD access. If necessary, this should still access the “main config”.

You mean that the light doesn’t spawn if the player spawing the car doesn’t have access to the the light ?

I tried it yesterday, i connected as mechanic and switched my job to police. After that i spawned my vehicle out of the garage and it doesn’t load the police lightbars.
I guess it only used the mechanic ones.