[Tutorial] - GCPhone - Adding calls and job messages

Police or mechanic or ems dosnt revice messages

1.Hi, i creating RP server esx_pack . Server is hosted by zap-hosting. And i have big problem. I have esx_phone and esx_addons_gcphone something like this :wink: This is ss of this error - https://prnt.sc/mbk0gv // I add I delete cache and it don’t working pls help :slight_smile:

So, since i am using onceSync the phone stopped working pretty much. people call eachother but cant hear eachother. anyone got an idea?

are there someone there have GCPhone for vRP

Can someone help police or mechanic or taxi etc dosnt get messages please help

Hey! When I press my configured button (F1) for the phone it only does the animation… Does this needs another programm to work with? I couldn’t found a new dependency, if you could help it would be great! :slight_smile:

ok fixed it thanks to this post! thanks @HalCroves <3

@ThaLoco0ne that could be reason of voice chat, the phone and voicechat may block each other. When you call someone make sure that no one is in near of you, than may it work.

That’s because you need to have a SQL database

I have database its working but not on phone

FR - Baguette
Salut merci du boulot que tu a fait j’ai une petite question je comprend pas trop l’anglais, je voudrais que les messages envoyé en tant que policier sois anonymes et non le numéro du policier qui s’affiche quand je répond a un civil en urgence. j’ai essayé de faire fonctionner le vdk call mais impossible je suppose que tu ferait sa en 20 seconde mais je galère depuis pas mal de temps avant de poser cette question si tu a le temps de me répondre je te remercie d’avance bonne soirée / journée Merci

EN :

Hi thanks for the job you did I have a little question I do not understand too much English, I would like the messages sent as a policeman to be anonymous and not the number of the policeman who appears when I answer a civilian emergency. I tried to run the vdk call but impossible I guess you would make it in 20 seconds but I galley for quite some time before asking this question if you have time to answer me thank you in advance good evening / day

Do you work on vrp ?

o7

@S1S0n I’m not an expert with the gcphone, and I do not know everything …

in server.lua

function addMessage(source, identifier, phone_number, message)
	local sourcePlayer = tonumber(source)
	local otherIdentifier = getIdentifierByPhoneNumber(phone_number)
	local myPhone = getNumberPhone(identifier)
	
	if otherIdentifier ~= nil then
		local tomess = _internalAddMessage(myPhone, phone_number, message, 0)
		getSourceFromIdentifier(otherIdentifier, function (osou)
			if tonumber(osou) ~= nil then
				-- TriggerClientEvent("gcPhone:allMessage", osou, getMessages(otherIdentifier))
				TriggerClientEvent("gcPhone:receiveMessage", tonumber(osou), tomess)
			end
		end)
	end
	local memess = _internalAddMessage(phone_number, myPhone, message, 1)
	local memessPolice = _internalAddMessage("Anonyme", myPhone, message, 1)
	
	if phone_number == "police" then
		TriggerClientEvent("gcPhone:receiveMessage", sourcePlayer, memessPolice)
	else
		TriggerClientEvent("gcPhone:receiveMessage", sourcePlayer, memess)
	end
end

@abosaad, Nop, look in this topic, gcphone didn’t work on VRP. And i didn’t have version for VRP.

@krisiemorisie look this :

The problem happened to be that gcphone was in ESX folder with esx_addons_gcphone. Moved gcphone to main resources folder and everything works fine.

FR :
Salut ok merci je vais essayer je te tiens au courant merci encore de ta réponse bonne journée.
En :
Hi ok thank you i’ll try i’ll let you know thanks again for your reply good day

@HalCroves Hello, phone item doesn’t work with me. When I have phone item in my inventory and i press F1 it doesn’t work. Could you help me? Pls

Yea it’s weird. Got it solved with using WebRTC :slight_smile:

Yeah I am too :slight_smile:

Hi,

its been a couple day we had a problem of server crash with the gcphone
the problem occurs when sending a message to a business in which there is a minimum of 4 people connected and the only error (even if it’s not an error) that we saw in the console is:

get phone to 1
get phone to 3
get phone to 2
get phone to 1
get phone to 4

so if anyone has an answer to this problem it will be nice to tell me thanks

hi is possible help me?

Im having issues with calling someone . I can make the call but we cannot speak to each other. What do i need to adjust to make this work. normal push to talk did not work. Any suggestions? BTW… amazing script… love this phone.