N3MTV / gcphone

Téléphone pour FiveM
104 stars 225 forks source link

Ambulance distress signal not sending GPS coordinates ! #88

Closed JeanClode closed 5 years ago

JeanClode commented 5 years ago

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 commented 5 years ago

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

Gannon001 commented 5 years ago
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 commented 5 years ago

Thanks it somehow works again now. Very nice.

ROGSLAYER commented 4 years ago

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 commented 3 years ago

bro not working!!!!!

ZyphDev commented 3 years ago

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 commented 1 year ago

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