Bir arkadaşımdan aldıgım yardım ile böyle oldugunu söyledi fakat denemedim test edersen haber ver
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)