[Tutorial] - GCPhone - Adding calls and job messages

phone
esx_phone
gcphone
call
#348

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

#349

Look over step 3 again. Otherwise upload your files

#350

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

#351

gcphone.rar (1.9 MB)

#352

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

#353

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
#354

Ah, I see, thanks!

#355

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

#356

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

#357

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?

#358

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

#359

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

#361

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

#362

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

#364

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

#365

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

#366

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:

#367

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?

#368

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

#369

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