[Q&A] GCPhone Questions? Ask them here, Will update main post frequently with updates

hello i have a problem with my gcphone , my gcphone number not showing but my number already generate on db you can look on the screenshot

im use the es_extended 1.2 and this happen im using gcphone update from


and still i have this problem

1 Like

How to I add alerts for new jobs? I am trying to setup a fire2 job to recieve alerts for ambulance. Somehow my attempts have the alerts going to the mechanic2 job.

I keep getting this error in my console. the same counts for Police. anyone know how to fix this?

“= WARNING = Appels sur un service non enregistre => numero : ambulance”

When I send a message or call someone, the phone freezes and i have to restart the game. My console looks like this and yes I runned the sql in my database.

1 Like

stuck when taking photo, anyone know how to fix it?

I tried this and it worked for me: in server.lua, add this at the beginning

local ESX = nil
TriggerEvent('esx:getSharedObject', function(obj) 
    ESX = obj 
end)

Replace

function getPlayerID(source)
    local identifiers = GetPlayerIdentifiers(source)
    local player = getIdentifiant(identifiers)
    return player
end

by

function getPlayerID(source)
    local xplayer = ESX.GetPlayerFromId(source)
    local player = xplayer.identifier
    return player
end

Then replace

function getSourceFromIdentifier(identifier, cb)
    TriggerEvent("esx:getPlayers", function(users)
        for k , user in pairs(users) do
            if (user.getIdentifier ~= nil and user.getIdentifier() == identifier) or (user.identifier == identifier) then
                cb(k)
                return
            end
        end
    end)
    cb(nil)
end

by

function getSourceFromIdentifier(identifier, cb)
	local users = ESX.GetPlayers()
    for k , user in pairs(users) do
		local xplayer = ESX.GetPlayerFromId(user)
        if (xplayer.getIdentifier ~= nil and xplayer.getIdentifier() == identifier) or (xplayer.identifier == identifier) then
            cb(k)
            return
        end
    end
    --cb(nil)
end

and if the phone numbers aren’t given replace:

es:playerLoaded

by

esx:playerLoaded

I will try that, thanks.

This solution only fixed the sql problem but now, when you send sms or make a call, the other player doesn’t receive anything

My friends recived my messages , but few minutes later

I’ve edited my message, I think it’s working now

esx_addons_gcphone.rar (2.5 KB) I finally got distress signals working! Try this out!

Yo man, this is working, but I get this error in my console
SCRIPT ERROR: @gcphone/server/server.lua:80: attempt to index a nil value (local ‘xplayer’)

Now I get this

New es_extended?

You got this error when the player connect ? Me too but the script seems working for me

Yea, Its stange

Which gcphone do you use?

Wdym? I use normal version

I think the problem comes from the loading of the last calls

Why It do that? That doesn’t make sence