RegisterNetEvent("gcPhone:acceptCall")
AddEventHandler("gcPhone:acceptCall", function(infoCall, initiator)
if inCall == false and USE_RTC == false then
inCall = true
exports["pma-voice"]:SetCallChannel(infoCall.id + 1)
end
if menuIsOpen == false then
TooglePhone()
end
PhonePlayCall()
SendNUIMessage({event = 'acceptCall', infoCall = infoCall, initiator = initiator})
end)
RegisterNetEvent("gcPhone:rejectCall")
AddEventHandler("gcPhone:rejectCall", function(infoCall)
if inCall == true then
inCall = false
exports["pma-voice"]:SetCallChannel(0)
end
PhonePlayText()
SendNUIMessage({event = 'rejectCall', infoCall = infoCall})
end)