[Tutorial] - GCPhone - Adding calls and job messages

Hmm I was following that guide https://github.com/HalCroves/gcphone/wiki/Gcphone-in-item

Look over step 3 again. Otherwise upload your files

gcphone.rar (1.9 MB)
Yeah, I have no idea… I appreciate the help!

gcphone.rar (1.9 MB)

Thanks it works! Could you tell me what was wrong? So next time I am smarter, trying to learn slowly :stuck_out_tongue:

Not your fault. The guide was wrong. @HalCroves might want to take a look at your wiki when you have the time. The callbacks don’t match.
In client
ESX.TriggerServerCallback('gcphone:getItemAmount', function(qtty)
In server
ESX.RegisterServerCallback('esx_gcphone:getItemAmount', function(source, cb, item)

1 Like

Ah, I see, thanks!

I saw a server with vRP using this phone, does anyone knows where I can get it?

Hey all,
I’m having the issue with the white screen on my server, I’ve tested a few things, even a fresh config.json, with now luck. Any opinions? Thanks!

https://gyazo.com/22c20e853f55f622fd165b07f3aa9305

I have the phone as an item. But when i dont have “phone” in inventory i cant open phone, and that is all good. But i still get calls and sms. How can i make that stop?

Use the same callback on this RegisterNetEvent("gcPhone:waitingCall") and this RegisterNetEvent("gcPhone:receiveMessage")

Hi,
Do you have rename the folder? Any edit?

Only thing i edited was the config.json, but replaced that with an original and cleared my server cache. Still white.

Is there a way to add a button to send messages anonymous like esx_phone has?

Anyway someone could help me figure out how to fix esx drugs to npcs to be compatible with gcPhone i tried so many things and nothing has worked

Where should I add it ??
Give me the code please.

The Fix works perfect thanks to @Barbie :smiley:

Just a small question when i call a Fixephone the phone sond from the Fixphone didnt disappear someone knows a fix? :slight_smile:

Is there a way to have the Distress Signal be sent to both EMS and Police? I thought it might be as simple as adding the police job to the script but it turns out it wasn’t that simple. Any idea’s?

Hi,
The distress signal from ambulancejob (key “G”) ?

A kind soul in the ESX Discord helped me figure this one out. So if anyone should need to do the same thing, which is to send the distress signal to both Ambulance and Police Jobs at the same time, here’s how to do it.

esx_ambulancejob/client/main.lua around line 117 add a new TriggerServerEvent below the one that sends the signal to the ‘ambulance’.

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 },
    })
    TriggerServerEvent('esx_addons_gcphone:startCall', 'police', _U('distress_message'), PlayerCoords, {

        PlayerCoords = { x = PedPosition.x, y = PedPosition.y, z = PedPosition.z },
    })
end
1 Like