Zum Hauptinhalt springen

Job Integration MedicNet

General to mode of operation

Our script has a trigger that can be used to trigger MedicNet from any other script. Once this happens, the tablet appears and automatically opens MedicNet. The trigger to trigger the script from us is: TriggerEvent('vpc-tab:BOSS', 'medic')

Example: Integration in the F6 menu of esx_ambulancejob

First open the job.lua in the client folder of the esx_ambulancejob. Once in the job.lua, please search for OpenMobileAmbulanceActionsMenu(), using the key combination CTRL+F. If you do not find this, please search for mobile_ambulance_actions. Once you have found this, it should look something like this:

function OpenMobileAmbulanceActionsMenu()
ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'mobile_ambulance_actions', {
title = _U('ambulance'),
align = 'top-left',
elements = {
{label = _U('ems_menu'), value = 'citizen_interaction'}
}}, function(data, menu)

if data.current.value == 'citizen_interaction' then

Please replace this code shown above with the following code:

function OpenMobileAmbulanceActionsMenu()
ESX.UI.Menu.CloseAll()

ESX.UI.Menu.Open('default', GetCurrentResourceName(), 'mobile_ambulance_actions', {
title = _U('ambulance'),
align = 'top-left',
elements = {
{label = _U('ems_menu'), value = 'citizen_interaction'},
{label = 'Tablet', value = 'medicnet'}
}}, function(data, menu)

if data.current.value == 'medicnet' then
TriggerEvent('vpc-tab:BOSS', 'medic')
elseif data.current.value == 'citizen_interaction' then