gcphone par Jonathan (Gannon) D => https://github.com/N3MTV/gcphone
Update :
- Réindetation du code pour une meilleur lisibilité
- Désactivation des print console pour les erreurs vendor.js
- Modification du commentaire pour l'ouverture du téléphone
- Ajout d'auto messages
- Modification des GetPlayerPed(-1) par PlayerPedId() dans
- client.lua
- animation.lua
- Dans photo.lua, modifications des touches pour utiliser la fonction
local Keys = {
- Possibilités de prendre des selfies => https://forum.fivem.net/t/release-cellphone-camera/43599
- Flèche du haut pour rentrer en mode selfie
- Clic gauche pour prendre une photo/selfie
- Les screens sont enregistrés dans le répértoire
C:\Users\%USERNAME%\Documents\Rockstar Games\GTA V\Profiles\[inside one of folders idk which you'll have to guess]
- Possibilités de les ouvrir avec : https://www.gta5-mods.com/tools/gta5view-1-4-0dev4-exe/download/58989
- Compatible avec la version 3.x de mysql-async => https://github.com/HalCroves/gcphone/blob/mysql-async-3.x/README.md
- https://forum.fivem.net/t/release-mysql-async-library-3-0-8/21881/440?u=halcroves
A faire :
- Monter un serveur RTC
/!\ If you want use gcphone with mysql-async 2.x, download this version https://github.com/brouznouf/fivem-mysql-async/tree/2.0
/!\ If you want use gcphone with mysql-async 3.0, check here https://github.com/HalCroves/gcphone/tree/mysql-async-3.x
-
Download the gcphone and esx_addons_gcphone
-
Put the downloaded files on your ftp.
- server-data/resources/
- gcphone => in "server-data/resources/"
- esx_addons_gcphone => in "server-data/resources/[ESX]"
-
In, your server.cfg, put before the jobs addons :
- start gcphone
- start esx_addons_gcphone
Like this :
# you probably don't want to change these!
# only change them if you're using a server with multiple network interfaces
####################### PORT DU SERVEUR
endpoint_add_tcp "0.0.0.0:30120"
endpoint_add_udp "0.0.0.0:30120"
####################### CONFIG ES
set es_enableCustomData 1
####################### BASE DE DONNEES
set mysql_connection_string "server=localhost;database=essentialmode;userid=root;password=Saxophone21121993+"
####################### ES Base
start mysql-async
start essentialmode
start esplugin_mysql
start es_admin2
####################### BASIC
start instance
start es_extended
start esx_voice
start esx_addons_gcphone
start gcphone
###### Jobs ######
start esx_service
start esx_mecanojob
start esx_lscustom
start esx_truckerjob
- Configure the voice, in
gcphone/html/static/config/config.json
.- Basic use
"useWebRTCVocal": false,
unless you have a custom RTC server.
- Basic use
"//": "useWebRTCVocal: false => Appels avec channels de GTA",
"//": "useWebRTCVocal: true => Appels avec WebRTC",
"useWebRTCVocal": false,
"RTCConfig": {
"iceServers": [{
"urls": ["turn:gannon.ovh"],
"username": "jojo",
"credential": "pass"
}]
},
- Change the default zoom (not tested)
In gcphone/html/static/config/config.json
, add this : "zoom" : "60%",
Or in your html/static/js/app.js
search zoom: window.localStorage.gc_zoom || "100%",
and replace by zoom: window.localStorage.gc_zoom || "60%",
Now, clear your server cache and maybe your FiveM cache.
For use distress signal (esx_ambulancejob), you need to edit the client.main : Replace :
function SendDistressSignal()
local playerPed = PlayerPedId()
local coords = GetEntityCoords(playerPed)
ESX.ShowNotification(_U('distress_sent'))
TriggerServerEvent('esx_phone:send', 'ambulance', _U('distress_message'), false, {
x = coords.x,
y = coords.y,
z = coords.z
})
end
By this :
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 },
})
end
For add custom message on phone :
"display": "Police",
"icon": "/html/static/img/icons_app/bank.png",
"subMenu": [
{
"title": "Envoyer un message",
"eventName": "esx_addons_gcphone:call",
"type": {
"number": "police"
}
},
{
"title": "Appeler le standard",
"eventName": "gcphone:autoCallNumber",
"type": {
"number": "911"
}
},
{
"title": "Signaler un vol",
"eventName": "esx_addons_gcphone:call",
"type": {
"number": "police",
"message": "Vol en cours, merci de venir au plus vite !"
}
},
{
"title": "Signaler une agression",
"eventName": "esx_addons_gcphone:call",
"type": {
"number": "police",
"message": "Victime d'agression"
}
}
]