[Tutorial] - GCPhone - Adding calls and job messages

I work but it’s a long time as a job it will take a little patience … as I already said, just remove the notification g detress in esx_ambulance for the moment and do it manually in / calls(appelle) - — favorite (favoris) tab … this sends a message with a blips to the job.

In esx_ambulancejob

Find in client/main.lua

function SendDistressSignal()
	local playerPed = PlayerPedId()
	local coords	= GetEntityCoords(playerPed)

	ESX.ShowNotification(_U('distress_sent'))
	TriggerServerEvent('esx_phone:send', 'ambulance', _U('distress_message'), false, {
		x = coords.x,
		y = coords.y,
		z = coords.z
	})
end

And replace with this:

function SendDistressSignal()
	local playerPed = PlayerPedId()
	PedPosition		= GetEntityCoords(playerPed)
	
	local PlayerCoords = { x = PedPosition.x, y = PedPosition.y, z = PedPosition.z }

	ESX.ShowNotification(_U('distress_sent'))

    TriggerServerEvent('esx_addons_gcphone:startCall', 'ambulance', _U('distress_message'), PlayerCoords, {

		PlayerCoords = { x = PedPosition.x, y = PedPosition.y, z = PedPosition.z },
	})
end
5 Likes

Tanx very much!!! :blush:

2 Likes

Hello,
No problem for my FIX …

It’s so easy to copy/paste a reply @ BTNGaming :smiley:

2 Likes

thank you very much I have already incorporated the totoriel but I will still the notified :stuck_out_tongue:

You can also configure other things.

If you would use normal call without going through RTC (Ganon RTC is dead).

Edit "useWebRTCVocal": true, by "useWebRTCVocal": false,:

  "//": "useWebRTCVocal: false => Appels avec channels de GTA",
  "//": "useWebRTCVocal: true  => Appels avec WebRTC",
  "useWebRTCVocal": false,
  "RTCConfig": {
    "iceServers": [{
      "urls": ["turn:gannon.ovh"],
      "username": "jojo",
      "credential": "pass"
    }]
  },

In your config, it is already false, but good … :smiley:

Like that no need to use vdk_call (If I remember well)
o7

1 Like

yes everything is noted in the tutorial but thank you so much :stuck_out_tongue:

1 Like

I have to change something in esx_policejob and esx_taxijob for working notifications?

Now we just need to convert the tor chat into twitter >:D

4 Likes

Hello, I want some help, what I should do, if I want to my phone only works if I have an Item?

I would be grateful if you answer me.

1 Like

Why the notifications dont work for Police . Pls help!

1 Like

Pouvez-vous développer votre sujet, je n’ai pas tout compris dans l’article. :stuck_out_tongue:

1 Like

Je souhaite que tout le système dépende d’un élément, par exemple, je dois avoir l’élément “téléphone” pour que le téléphone fonctionne

an item from the phone to put it in your inventory

Im talking about messages to the Policejob

1 Like

simply by going to your directory calls/ appelle and then in favorites /favoris

Where is that?

call is french appelle and… favoris /favorite bottom left … a tab named favoris /favorite

But this is in the html or some where else?

oh my gods I thought you were talking In game :rofl::rofl::rofl: