[HELP] Adding Emergency Blips to /onduty script

Hello,
I’m kinda new to this stuff and need help adding emergency blips into the script that handles when players go On and Off Duty (THE SCRIPT LINK HERE https://github.com/DevLanceGood/Advanced-Roleplaying-Menu) using these two pieces of code
TriggerEvent(“eblips:add”, {name = “Jane Doe”, src = 123, color = 1})
TriggerEvent(“eblips:remove”, serverID)
If anyone could help me integrate these that would be perfect

Thanks.
P.s It’s kinda late here so I will not be able to respond till the morning.

1 Like

standalone ? esx? vrp?

what kind of framework you run pal+

Standalone mate

1 Like

Try this I just scripted it reply if it doesn’t work!
– Police
local policeduty = false

RegisterNetEvent(“ARPM:policeduty”)
AddEventHandler(“ARPM:policeduty”, function()
local str = nil
policeduty = not policeduty
if policeduty or emsduty then
str = " on duty as a COP"
local models = GetHashKey(“s_m_y_cop_01”)
RequestModel(models)
while not HasModelLoaded(models) do
RequestModel(models)
Citizen.Wait(0)
end
inServiceCops = true
peds = GetPlayerPed(-1)
ids = GetPlayerServerId(PlayerId())
print(ids…" -your server id")
TriggerServerEvent(“eblips:add”, {name = “POLICE”, src = ids, color = 3}) – can be used with blips [Release] EmergencyBlips
print(inServiceCops)
local playerPed = GetPlayerPed(-1)
else
str = " off duty"
inServiceCops = false
print(ids…" -your server id2")
TriggerServerEvent(“eblips:remove”, ids)
end
exports[‘mythic_notify’]:DoHudText(‘inform’, “you are now”…str…".")
end)

Sorry for the late response. I inputted this into server.lua file but get an error on the line RegisterNetEvent(“ARPM:policeduty”)

Thanks

1 Like

you need to make a command for example

local onduty = ‘ARPM.cop’
RegisterCommand(“onduty”, funciton(source, args, raw)
local player = source
if (player > 0) then
TriggerClientEvent(“ARPM:policeduty”, source)
CancelEvent()
end
end, false)

1 Like

Thanks very much

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.