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.
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)
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)