Hi,
I do not really understand your request. My english is approximate
- You have the phone in item (so far no problem).
- You receive notifications? Yes … what do you want to do exactly? Do not receive any more notifications and calls? But for what purpose
The sound is in client.lua :
Citizen.CreateThread(function ()
while true do
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
local inRangeToActivePhone = false
for i, _ in pairs(PhoneInCall) do
local dist = GetDistanceBetweenCoords(
PhoneInCall[i].coords.x, PhoneInCall[i].coords.y, PhoneInCall[i].coords.z,
coords.x, coords.y, coords.z, 1)
if (dist <= 5.0) then
DrawMarker(1, PhoneInCall[i].coords.x, PhoneInCall[i].coords.y, PhoneInCall[i].coords.z,
0,0,0, 0,0,0, 0.1,0.1,0.1, 0,255,0,255, 0,0,0,0,0,0,0)
inRangeToActivePhone = true
if (dist <= 1.5) then
SetTextComponentFormat("STRING")
AddTextComponentString("~INPUT_PICKUP~ Décrocher")
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
if IsControlJustPressed(1, KeyTakeCall) then
PhonePlayCall(true)
TakeAppel(PhoneInCall[i])
PhoneInCall = {}
StopSound(soundId)
end
end
break
end
end
if inRangeToActivePhone == false then
showFixePhoneHelper(coords)
end
if inRangeToActivePhone == true and currentPlaySound == false then
PlaySound(soundId, "Remote_Ring", "Phone_SoundSet_Michael", 0, 0, 1)
currentPlaySound = true
elseif inRangeToActivePhone == false and currentPlaySound == true then
currentPlaySound = false
StopSound(soundId)
end
Citizen.Wait(0)
end
end)