[Tutorial] - GCPhone - Adding calls and job messages

still the same problem

1 Like

Show me your files. Without it’s complicated :sweat_smile:

1 Like

gcphone.rar (1.3 MB)

1 Like

Replace :

ESX.ShowNotification("Vous n'avez pas de ~r~téléphone~s~")

By :
TriggerEvent('esx:showNotification', "Vous n'avez pas de ~r~téléphone~s~")

changed it but new error

Error resuming coroutine: client/client.lua:142: attempt to index a nil value (global 'ESX')
stack traceback:
        client/client.lua:142: in function <client/client.lua:138>

something way to fix?

Can anyone help me add custom images to contacts?
Other solution can be adding call events to phone desktop icons (used for apps now)…

First solution is impossible for me…
For second solution, i was able to create new icon, but im not able to make them work for calls, as im not very familiar with JS…

For first solution, here is concept art

btw if anyone interested to help, we’d like to try create some kind of twitter-like platform, better than darknet, with images, user names, mentions…

1 Like
  1. Citizen.CreateThread(function()
  2. while true do
  3.  Citizen.Wait(0)
    
  4.  if IsControlJustPressed(1, KeyOpenClose) and GetLastInputMethod( 0 ) then
    
  5.  	TriggerServerEvent('gcphone:getItemAmount', function(qtty)
    
  6.  		if qtty > 0 then
    
  7.  			TooglePhone()
    
  8.  		else
    
  9.  			TriggerEvent('esx:showNotification', "you not have a ~r~phone~s~")
    
  10. 			end
    
  11. 		end, 'phone')
    
  12. 	end
    
  13. 	if menuIsOpen == true then
    
  14. 		for _, value in ipairs(KeyToucheCloseEvent) do
    
  15. 			if IsControlJustPressed(1, value.code) then
    
  16. 				endNUIMessage({keyUp = value.event})
    
  17. 			end
    
  18. 		end
    
  19. 	end
    
  20. end
    
  21. end)

I have a problem with this; /

Help Please

Dude… Provide more info. You have been here 6 months so you should know that by now.

[Request]
Hello dude! Im so much in love with this script <3

I was wondering if you in anyway couldt convert this script to vRP ??
Would be so awesome!
Btw GREAT WORK!
:slight_smile:

Hi,
Instead of using a simple color you can add an image.

Add image in /html/static/img/icons_app/

And edit html/static/config/config.json like this

Example :

	"serviceCall": [
		{
			"display": "Agent immobilier",
			"backgroundColor": "pink",
			"subMenu": [
				{
					"title": "Envoyer un message",
					"eventName": "esx_addons_gcphone:call",
					"type": {
						"number": "realestateagent"
					}
				},

Replace by :

	"serviceCall": [
		{
			"display": "Agent immobilier",
			"icon": "/html/static/img/icons_app/bank.png",
			"subMenu": [
				{
					"title": "Envoyer un message",
					"eventName": "esx_addons_gcphone:call",
					"type": {
						"number": "realestateagent"
					}
				},

Hi,
You have tested this : https://github.com/HalCroves/gcphone/wiki/Gcphone-in-item ?

I do not know if it works, I did not try: D

Hello,
Unfortunately I would not convert this addon for VRP. If a charitable soul can do it, it would be perfect :slight_smile:

It does not work with ESX

Any errors, screenshots, logs ?

My crystal ball is struggling to connect to your server :thinking:

Error resuming coroutine: client/client.lua attemp to index a nil value (global 'ESX) client/client.lua in function <client/client.lua>

Add on top of your client/main.lua :


ESX              = nil

Citizen.CreateThread(function()
	while ESX == nil do
		TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
		Citizen.Wait(0)
	end
end)

Like this : https://github.com/HalCroves/gcphone/wiki/Gcphone-in-item (Wiki updated)

i didnt use this guide, i write it on my own, but i have phone on item working perfectly.

Ok, work in which file to change the language to another, for example New message on EN?

Salut, j’ai un problème avec gcphone

j’utilise la version pour mysql_async 3.0.8
Je comprend pas d’ou viens le problème, j’ai suivi toute les étapes

Le téléphone ne s’ouvre pas quand j’appuie sur la touche

mais j’ai une erreur voilà :