client tarafında saltychat veya tokovoip ile ilgili satırları pasif hale getir.
server.lua içerisine gidip
RegisterServerEvent('qb-phone_new:server:CancelCall')
ve
RegisterServerEvent('qb-phone_new:server:AnswerCall')
kod bloklarını aşağıdaki şekilde güncelle
RegisterServerEvent('qb-phone_new:server:CancelCall')
AddEventHandler('qb-phone_new:server:CancelCall', function(ContactData)
local src = source
local Play = QBCore.Functions.GetPlayer(src)
local Ply = QBCore.Functions.GetPlayerByPhone(ContactData.TargetData.number)
if Ply ~= nil then
TriggerClientEvent('qb-phone_new:client:CancelCall', Ply.PlayerData.source)
exports['saltychat']:EndCall(Play.PlayerData.source, Ply.PlayerData.source)
exports['saltychat']:EndCall(Ply.PlayerData.source, Play.PlayerData.source)
end
end)
RegisterServerEvent('qb-phone_new:server:AnswerCall')
AddEventHandler('qb-phone_new:server:AnswerCall', function(CallData, TargetData)
local src = source
local Play = QBCore.Functions.GetPlayer(src)
local Ply = QBCore.Functions.GetPlayerByPhone(CallData.TargetData.number)
if Ply ~= nil then
TriggerClientEvent('qb-phone_new:client:AnswerCall', Ply.PlayerData.source)
exports['saltychat']:EstablishCall(Play.PlayerData.source, Ply.PlayerData.source)
exports['saltychat']:EstablishCall(Ply.PlayerData.source, Play.PlayerData.source)
end
end)