Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ambulance distress signal not sending GPS coordinates ! #88

Closed
JeanClode opened this issue Apr 5, 2019 · 7 comments
Closed

Ambulance distress signal not sending GPS coordinates ! #88

JeanClode opened this issue Apr 5, 2019 · 7 comments

Comments

@JeanClode
Copy link

Hi,

Everything related to the new GcPhone works perfectly.

The only thing that doesn't seem to be working right now is the Distress signal call for the ambulance service when a player is down.

Sending the distress signal will send a text message to EMS, yes, but it won't include the GPS coordinates as it should / used to do.

Here is the piece of code related to this ... if you can help anyhow..

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

	ESX.ShowNotification(_U('distress_sent'))
	
	TriggerServerEvent('esx_addons_gcphone:startCall', 'ambulance', _U('distress_message'), PlayerCoords, {

		PlayerCoords = { x = coords.x, y = coords.y, z = coords.z },
	})
	
end

Thanks in advance

@Gannon001
Copy link
Collaborator

Gannon001 commented Apr 6, 2019

Try this, if don't work, i check tomorrow.

@Gannon001
Copy link
Collaborator

function SendDistressSignal()
	local playerPed = PlayerPedId()
	local coords	= GetEntityCoords(playerPed)
	ESX.ShowNotification(_U('distress_sent'))
	TriggerServerEvent('esx_addons_gcphone:startCall', 'ambulance', _U('distress_message'), {
		['x'] = coords.x, 
		['y'] = coords.y
	})
end

@JeanClode
Copy link
Author

Thanks it somehow works again now. Very nice.

@Gannon001 Gannon001 pinned this issue Apr 8, 2019
@Gannon001 Gannon001 unpinned this issue Apr 8, 2019
@ROGSLAYER
Copy link

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

ESX.ShowNotification(_U('distress_sent'))

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

	PlayerCoords = { x = coords.x, y = coords.y, z = coords.z },
})

end

i have done both but still it doesnt work can you help somehow?

@Rage-Gaming
Copy link

bro not working!!!!!

@ZyphDev
Copy link

ZyphDev commented Mar 2, 2021

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

ESX.ShowNotification(_U('distress_sent'))

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

	PlayerCoords = { x = coords.x, y = coords.y, z = coords.z },
})

@Gameadictive
Copy link

And is any way to don´t use a esx_phone or gcphone so you can do it standalone?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants