Update 19.11.2022
2
HTML/gcphone/resources/esx_addons_gcphone/.gitattributes
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
35
HTML/gcphone/resources/esx_addons_gcphone/client.lua
Normal file
@@ -0,0 +1,35 @@
|
||||
RegisterNetEvent('esx_addons_gcphone:call')
|
||||
AddEventHandler('esx_addons_gcphone:call', function(data)
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local message = data.message
|
||||
local number = data.number
|
||||
if message == nil then
|
||||
DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", "", "", "", "", 200)
|
||||
while (UpdateOnscreenKeyboard() == 0) do
|
||||
DisableAllControlActions(0);
|
||||
Wait(0);
|
||||
end
|
||||
if (GetOnscreenKeyboardResult()) then
|
||||
message = GetOnscreenKeyboardResult()
|
||||
end
|
||||
end
|
||||
if message ~= nil and message ~= "" then
|
||||
TriggerServerEvent('esx_addons_gcphone:startCall', number, message, {
|
||||
x = coords.x,
|
||||
y = coords.y,
|
||||
z = coords.z
|
||||
})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx_addons_gcphone:call_taxi')
|
||||
AddEventHandler('esx_addons_gcphone:call_taxi', function(data)
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
TriggerServerEvent('esx_phone:send', '555-5555', "Eine Person benötigt ein Taxi", false, {
|
||||
x = coords.x,
|
||||
y = coords.y,
|
||||
z = coords.z
|
||||
})
|
||||
end)
|
||||
22
HTML/gcphone/resources/esx_addons_gcphone/fxmanifest.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
fx_version 'adamant'
|
||||
|
||||
game 'gta5'
|
||||
|
||||
client_script 'client.lua'
|
||||
|
||||
server_script {
|
||||
'@mysql-async/lib/MySQL.lua',
|
||||
'server.lua'
|
||||
}
|
||||
|
||||
-- {
|
||||
-- "display": "Police",
|
||||
-- "subMenu": [
|
||||
-- {
|
||||
-- "title": "Envoyer un message",
|
||||
-- "eventName": "esx_addons_gcphone:call",
|
||||
-- "type": {
|
||||
-- "number": "police"
|
||||
-- }}
|
||||
-- ]
|
||||
-- }
|
||||
162
HTML/gcphone/resources/esx_addons_gcphone/server.lua
Normal file
@@ -0,0 +1,162 @@
|
||||
ESX = nil
|
||||
-- local PhoneNumbers = {}
|
||||
|
||||
local PhoneNumbers = {
|
||||
['912'] = {
|
||||
type = "ambulance",
|
||||
sources = {}
|
||||
},
|
||||
['911'] = {
|
||||
type = "police",
|
||||
sources = {}
|
||||
},
|
||||
['555-5555'] = {
|
||||
type = "taxi",
|
||||
sources = {}
|
||||
}
|
||||
}
|
||||
|
||||
TriggerEvent('esx:getSharedObject', function(obj)
|
||||
ESX = obj
|
||||
end)
|
||||
|
||||
function notifyAlertSMS (number, alert, listSrc)
|
||||
if PhoneNumbers[number] ~= nil then
|
||||
local mess = '#' .. alert.numero .. ' : ' .. alert.message
|
||||
if alert.coords ~= nil then
|
||||
mess = mess .. ' ' .. alert.coords.x .. ', ' .. alert.coords.y
|
||||
end
|
||||
for k, _ in pairs(listSrc) do
|
||||
getPhoneNumber(tonumber(k), function (n)
|
||||
if n ~= nil then
|
||||
TriggerEvent('gcPhone:_internalAddMessage', number, n, mess, 0, function (smsMess)
|
||||
TriggerClientEvent("gcPhone:receiveMessage", tonumber(k), smsMess, alert.numero)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
AddEventHandler('esx_phone:registerNumber', function(number, type, sharePos, hasDispatch, hideNumber, hidePosIfAnon)
|
||||
print('= INFO = Enregistrement du telephone ' .. number .. ' => ' .. type)
|
||||
local hideNumber = hideNumber or false
|
||||
local hidePosIfAnon = hidePosIfAnon or false
|
||||
|
||||
PhoneNumbers[number] = {
|
||||
type = type,
|
||||
sources = {},
|
||||
alerts = {}
|
||||
}
|
||||
end)
|
||||
|
||||
function checkJob(current)
|
||||
if current == 'ambulance' then current = '912' end
|
||||
if current == 'police' then current = '911' end
|
||||
if current == 'taxi' then current = '555-5555' end
|
||||
|
||||
return current;
|
||||
end
|
||||
|
||||
AddEventHandler('esx:setJob', function(source, job, lastJob)
|
||||
local current = checkJob(job.name);
|
||||
local last = checkJob(lastJob.name);
|
||||
|
||||
if PhoneNumbers[last] ~= nil then
|
||||
TriggerEvent('esx_addons_gcphone:removeSource', last, source)
|
||||
end
|
||||
|
||||
if PhoneNumbers[current] ~= nil then
|
||||
TriggerEvent('esx_addons_gcphone:addSource', current, source)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_addons_gcphone:addSource', function(number, source)
|
||||
PhoneNumbers[number].sources[tostring(source)] = true
|
||||
end)
|
||||
|
||||
AddEventHandler('esx_addons_gcphone:removeSource', function(number, source)
|
||||
PhoneNumbers[number].sources[tostring(source)] = nil
|
||||
end)
|
||||
|
||||
RegisterServerEvent('gcPhone:sendMessage')
|
||||
AddEventHandler('gcPhone:sendMessage', function(number, message)
|
||||
local sourcePlayer = tonumber(source)
|
||||
if PhoneNumbers[number] ~= nil then
|
||||
getPhoneNumber(source, function (phone)
|
||||
notifyAlertSMS(number, {
|
||||
message = message,
|
||||
numero = phone,
|
||||
}, PhoneNumbers[number].sources)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterServerEvent('esx_addons_gcphone:startCall')
|
||||
AddEventHandler('esx_addons_gcphone:startCall', function (number, message, coords)
|
||||
local source = source
|
||||
if PhoneNumbers[number] ~= nil then
|
||||
getPhoneNumber(source, function (phone)
|
||||
notifyAlertSMS(number, {
|
||||
message = message,
|
||||
coords = coords,
|
||||
numero = phone,
|
||||
}, PhoneNumbers[number].sources)
|
||||
end)
|
||||
else
|
||||
print('= WARNING = Appels sur un service non enregistre => numero : ' .. number)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerLoaded', function(source)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
|
||||
MySQL.Async.fetchAll('SELECT * FROM users WHERE identifier = @identifier',{
|
||||
['@identifier'] = xPlayer.identifier
|
||||
}, function(result)
|
||||
|
||||
local phoneNumber = result[1].phone_number
|
||||
xPlayer.set('phoneNumber', phoneNumber)
|
||||
|
||||
local job = checkJob(xPlayer.job.name);
|
||||
if PhoneNumbers[job] ~= nil then
|
||||
TriggerEvent('esx_addons_gcphone:addSource', job, source)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerDropped', function(source)
|
||||
local source = source
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
if PhoneNumbers[xPlayer.job.name] ~= nil then
|
||||
TriggerEvent('esx_addons_gcphone:removeSource', xPlayer.job.name, source)
|
||||
end
|
||||
end)
|
||||
|
||||
function getPhoneNumber (source, callback)
|
||||
local xPlayer = ESX.GetPlayerFromId(source)
|
||||
if xPlayer == nil then
|
||||
callback(nil)
|
||||
end
|
||||
MySQL.Async.fetchAll('SELECT * FROM users WHERE identifier = @identifier',{
|
||||
['@identifier'] = xPlayer.identifier
|
||||
}, function(result)
|
||||
callback(result[1].phone_number)
|
||||
end)
|
||||
end
|
||||
|
||||
RegisterServerEvent('esx_phone:send')
|
||||
AddEventHandler('esx_phone:send', function(number, message, _, coords)
|
||||
local source = source
|
||||
if PhoneNumbers[number] ~= nil then
|
||||
getPhoneNumber(source, function (phone)
|
||||
notifyAlertSMS(number, {
|
||||
message = message,
|
||||
coords = coords,
|
||||
numero = phone,
|
||||
}, PhoneNumbers[number].sources)
|
||||
end)
|
||||
else
|
||||
-- print('esx_phone:send | Appels sur un service non enregistre => numero : ' .. number)
|
||||
end
|
||||
end)
|
||||
66
HTML/gcphone/resources/gcphone/base.sql
Normal file
@@ -0,0 +1,66 @@
|
||||
-- --------------------------------------------------------
|
||||
-- Hôte : 127.0.0.1
|
||||
-- Version du serveur: 10.3.7-MariaDB - mariadb.org binary distribution
|
||||
-- SE du serveur: Win64
|
||||
-- HeidiSQL Version: 9.5.0.5196
|
||||
-- --------------------------------------------------------
|
||||
|
||||
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||||
/*!40101 SET NAMES utf8 */;
|
||||
/*!50503 SET NAMES utf8mb4 */;
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
|
||||
|
||||
USE `es_extended`;
|
||||
|
||||
ALTER TABLE `users` ADD COLUMN `phone_number` VARCHAR(10) NULL;
|
||||
|
||||
|
||||
-- Export de la structure de la table gtarp. phone_app_chat
|
||||
CREATE TABLE IF NOT EXISTS `phone_app_chat` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`channel` varchar(20) NOT NULL,
|
||||
`message` varchar(255) NOT NULL,
|
||||
`time` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Les données exportées n'étaient pas sélectionnées.
|
||||
-- Export de la structure de la table gtarp. phone_calls
|
||||
CREATE TABLE IF NOT EXISTS `phone_calls` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`owner` varchar(10) NOT NULL COMMENT 'Num tel proprio',
|
||||
`num` varchar(10) NOT NULL COMMENT 'Num reférence du contact',
|
||||
`incoming` int(11) NOT NULL COMMENT 'Défini si on est à l''origine de l''appels',
|
||||
`time` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`accepts` int(11) NOT NULL COMMENT 'Appels accepter ou pas',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=InnoDB AUTO_INCREMENT=122 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Les données exportées n'étaient pas sélectionnées.
|
||||
-- Export de la structure de la table gtarp. phone_messages
|
||||
CREATE TABLE IF NOT EXISTS `phone_messages` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`transmitter` varchar(10) NOT NULL,
|
||||
`receiver` varchar(10) NOT NULL,
|
||||
`message` varchar(255) NOT NULL DEFAULT '0',
|
||||
`time` timestamp NOT NULL DEFAULT current_timestamp(),
|
||||
`isRead` int(11) NOT NULL DEFAULT 0,
|
||||
`owner` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=106 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Les données exportées n'étaient pas sélectionnées.
|
||||
-- Export de la structure de la table gtarp. phone_users_contacts
|
||||
CREATE TABLE IF NOT EXISTS `phone_users_contacts` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`identifier` varchar(60) CHARACTER SET utf8mb4 DEFAULT NULL,
|
||||
`number` varchar(10) CHARACTER SET utf8mb4 DEFAULT NULL,
|
||||
`display` varchar(64) CHARACTER SET utf8mb4 NOT NULL DEFAULT '-1',
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Les données exportées n'étaient pas sélectionnées.
|
||||
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
|
||||
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||||
153
HTML/gcphone/resources/gcphone/client/animation.lua
Normal file
@@ -0,0 +1,153 @@
|
||||
--====================================================================================
|
||||
-- #Author: Jonathan D @ Gannon
|
||||
--====================================================================================
|
||||
|
||||
local myPedId = nil
|
||||
|
||||
local phoneProp = 0
|
||||
local phoneModel = -1038739674
|
||||
-- OR "prop_npc_phone"
|
||||
-- OR "prop_npc_phone_02"
|
||||
-- OR "prop_cs_phone_01"
|
||||
|
||||
local currentStatus = 'out'
|
||||
local lastDict = nil
|
||||
local lastAnim = nil
|
||||
local lastIsFreeze = false
|
||||
|
||||
local ANIMS = {
|
||||
['cellphone@'] = {
|
||||
['out'] = {
|
||||
['text'] = 'cellphone_text_in',
|
||||
['call'] = 'cellphone_call_listen_base',
|
||||
},
|
||||
['text'] = {
|
||||
['out'] = 'cellphone_text_out',
|
||||
['text'] = 'cellphone_text_in',
|
||||
['call'] = 'cellphone_text_to_call',
|
||||
},
|
||||
['call'] = {
|
||||
['out'] = 'cellphone_call_out',
|
||||
['text'] = 'cellphone_call_to_text',
|
||||
['call'] = 'cellphone_text_to_call',
|
||||
}
|
||||
},
|
||||
['anim@cellphone@in_car@ps'] = {
|
||||
['out'] = {
|
||||
['text'] = 'cellphone_text_in',
|
||||
['call'] = 'cellphone_call_in',
|
||||
},
|
||||
['text'] = {
|
||||
['out'] = 'cellphone_text_out',
|
||||
['text'] = 'cellphone_text_in',
|
||||
['call'] = 'cellphone_text_to_call',
|
||||
},
|
||||
['call'] = {
|
||||
['out'] = 'cellphone_horizontal_exit',
|
||||
['text'] = 'cellphone_call_to_text',
|
||||
['call'] = 'cellphone_text_to_call',
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function newPhoneProp()
|
||||
deletePhone()
|
||||
RequestModel(phoneModel)
|
||||
while not HasModelLoaded(phoneModel) do
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
phoneProp = CreateObject(phoneModel, 1.0, 1.0, 1.0, 1, 1, 0)
|
||||
local bone = GetPedBoneIndex(myPedId, 28422)
|
||||
AttachEntityToEntity(phoneProp, myPedId, bone, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1, 1, 0, 0, 2, 1)
|
||||
end
|
||||
|
||||
function deletePhone ()
|
||||
if phoneProp ~= 0 then
|
||||
Citizen.InvokeNative(0xAE3CBE5BF394C9C9 , Citizen.PointerValueIntInitialized(phoneProp))
|
||||
phoneProp = 0
|
||||
end
|
||||
end
|
||||
|
||||
--[[
|
||||
out || text || Call ||
|
||||
--]]
|
||||
function PhonePlayAnim (status, freeze, force)
|
||||
if currentStatus == status and force ~= true then
|
||||
return
|
||||
end
|
||||
|
||||
myPedId = GetPlayerPed(-1)
|
||||
local freeze = freeze or false
|
||||
|
||||
local dict = "cellphone@"
|
||||
if IsPedInAnyVehicle(myPedId, false) then
|
||||
dict = "anim@cellphone@in_car@ps"
|
||||
end
|
||||
loadAnimDict(dict)
|
||||
|
||||
local anim = ANIMS[dict][currentStatus][status]
|
||||
if currentStatus ~= 'out' then
|
||||
StopAnimTask(myPedId, lastDict, lastAnim, 1.0)
|
||||
end
|
||||
local flag = 50
|
||||
if freeze == true then
|
||||
flag = 14
|
||||
end
|
||||
TaskPlayAnim(myPedId, dict, anim, 3.0, -1, -1, flag, 0, false, false, false)
|
||||
|
||||
if status ~= 'out' and currentStatus == 'out' then
|
||||
Citizen.Wait(380)
|
||||
newPhoneProp()
|
||||
end
|
||||
|
||||
lastDict = dict
|
||||
lastAnim = anim
|
||||
lastIsFreeze = freeze
|
||||
currentStatus = status
|
||||
|
||||
if status == 'out' then
|
||||
Citizen.Wait(180)
|
||||
deletePhone()
|
||||
StopAnimTask(myPedId, lastDict, lastAnim, 1.0)
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
function PhonePlayOut ()
|
||||
PhonePlayAnim('out')
|
||||
end
|
||||
|
||||
function PhonePlayText ()
|
||||
PhonePlayAnim('text')
|
||||
end
|
||||
|
||||
function PhonePlayCall (freeze)
|
||||
PhonePlayAnim('call', freeze)
|
||||
end
|
||||
|
||||
function PhonePlayIn ()
|
||||
if currentStatus == 'out' then
|
||||
PhonePlayText()
|
||||
end
|
||||
end
|
||||
|
||||
function loadAnimDict(dict)
|
||||
RequestAnimDict(dict)
|
||||
while not HasAnimDictLoaded(dict) do
|
||||
Citizen.Wait(1)
|
||||
end
|
||||
end
|
||||
|
||||
-- Citizen.CreateThread(function ()
|
||||
-- Citizen.Wait(200)
|
||||
-- PhonePlayCall()
|
||||
-- Citizen.Wait(2000)
|
||||
-- PhonePlayOut()
|
||||
-- Citizen.Wait(2000)
|
||||
|
||||
-- PhonePlayText()
|
||||
-- Citizen.Wait(2000)
|
||||
-- PhonePlayCall()
|
||||
-- Citizen.Wait(2000)
|
||||
-- PhonePlayOut()
|
||||
-- end)
|
||||
17
HTML/gcphone/resources/gcphone/client/app_tchat.lua
Normal file
@@ -0,0 +1,17 @@
|
||||
RegisterNetEvent("gcPhone:tchat_receive")
|
||||
AddEventHandler("gcPhone:tchat_receive", function(message)
|
||||
SendNUIMessage({event = 'tchat_receive', message = message})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:tchat_channel")
|
||||
AddEventHandler("gcPhone:tchat_channel", function(channel, messages)
|
||||
SendNUIMessage({event = 'tchat_channel', messages = messages})
|
||||
end)
|
||||
|
||||
RegisterNUICallback('tchat_addMessage', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:tchat_addMessage', data.channel, data.message)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('tchat_getChannel', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:tchat_channel', data.channel)
|
||||
end)
|
||||
67
HTML/gcphone/resources/gcphone/client/bank.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
--====================================================================================
|
||||
-- # Discord XenKnighT#7085
|
||||
--====================================================================================
|
||||
|
||||
--[[
|
||||
Appeller SendNUIMessage({event = 'updateBankbalance', banking = xxxx})
|
||||
à la connection & à chaque changement du compte
|
||||
--]]
|
||||
|
||||
-- ES / ESX Implementation
|
||||
inMenu = true
|
||||
local bank = 0
|
||||
local firstname = ''
|
||||
function setBankBalance (value)
|
||||
bank = value
|
||||
SendNUIMessage({event = 'updateBankbalance', banking = bank})
|
||||
end
|
||||
|
||||
RegisterNetEvent('esx:playerLoaded')
|
||||
AddEventHandler('esx:playerLoaded', function(playerData)
|
||||
local accounts = playerData.accounts or {}
|
||||
for index, account in ipairs(accounts) do
|
||||
if account.name == 'bank' then
|
||||
setBankBalance(account.money)
|
||||
break
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('esx:setAccountMoney')
|
||||
AddEventHandler('esx:setAccountMoney', function(account)
|
||||
if account.name == 'bank' then
|
||||
setBankBalance(account.money)
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("es:addedBank")
|
||||
AddEventHandler("es:addedBank", function(m)
|
||||
setBankBalance(bank + m)
|
||||
end)
|
||||
|
||||
RegisterNetEvent("es:removedBank")
|
||||
AddEventHandler("es:removedBank", function(m)
|
||||
setBankBalance(bank - m)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('es:displayBank')
|
||||
AddEventHandler('es:displayBank', function(bank)
|
||||
setBankBalance(bank)
|
||||
end)
|
||||
|
||||
|
||||
|
||||
--===============================================
|
||||
--== Transfer Event ==
|
||||
--===============================================
|
||||
AddEventHandler('gcphone:bankTransfer', function(data)
|
||||
TriggerServerEvent('bank:transfer', data.id, data.amount)
|
||||
TriggerServerEvent('bank:balance')
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
761
HTML/gcphone/resources/gcphone/client/client.lua
Normal file
@@ -0,0 +1,761 @@
|
||||
--====================================================================================
|
||||
-- #Author: Jonathan D @ Gannon
|
||||
--====================================================================================
|
||||
|
||||
-- Configuration
|
||||
local KeyToucheCloseEvent = {
|
||||
{ code = 172, event = 'ArrowUp' },
|
||||
{ code = 173, event = 'ArrowDown' },
|
||||
{ code = 174, event = 'ArrowLeft' },
|
||||
{ code = 175, event = 'ArrowRight' },
|
||||
{ code = 176, event = 'Enter' },
|
||||
{ code = 177, event = 'Backspace' },
|
||||
}
|
||||
|
||||
local menuIsOpen = false
|
||||
local contacts = {}
|
||||
local messages = {}
|
||||
local myPhoneNumber = ''
|
||||
local isDead = false
|
||||
local USE_RTC = false
|
||||
local useMouse = false
|
||||
local ignoreFocus = false
|
||||
local takePhoto = false
|
||||
local hasFocus = false
|
||||
local TokoVoipID = nil
|
||||
|
||||
local PhoneInCall = {}
|
||||
local currentPlaySound = false
|
||||
local soundDistanceMax = 8.0
|
||||
|
||||
|
||||
--====================================================================================
|
||||
-- Check si le joueurs poséde un téléphone
|
||||
-- Callback true or false
|
||||
--====================================================================================
|
||||
function hasPhone (cb)
|
||||
cb(true)
|
||||
end
|
||||
--====================================================================================
|
||||
-- Que faire si le joueurs veut ouvrir sont téléphone n'est qu'il en a pas ?
|
||||
--====================================================================================
|
||||
function ShowNoPhoneWarning ()
|
||||
end
|
||||
|
||||
--[[
|
||||
Ouverture du téphone lié a un item
|
||||
Un solution ESC basé sur la solution donnée par HalCroves
|
||||
https://forum.fivem.net/t/tutorial-for-gcphone-with-call-and-job-message-other/177904
|
||||
]]--
|
||||
|
||||
ESX = nil
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
while ESX == nil do
|
||||
TriggerEvent('esx:getSharedObject', function(obj) ESX = obj end)
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
--[[
|
||||
function hasPhone (cb)
|
||||
if (ESX == nil) then return cb(0) end
|
||||
ESX.TriggerServerCallback('gcphone:getItemAmount', function(qtty)
|
||||
cb(qtty > 0)
|
||||
end, 'phone')
|
||||
end
|
||||
function ShowNoPhoneWarning ()
|
||||
if (ESX == nil) then return end
|
||||
ESX.ShowNotification("Vous n'avez pas de ~r~téléphone~s~")
|
||||
end --]]
|
||||
|
||||
AddEventHandler('esx:onPlayerDeath', function()
|
||||
if menuIsOpen then
|
||||
menuIsOpen = false
|
||||
TriggerEvent('gcPhone:setMenuStatus', false)
|
||||
SendNUIMessage({show = false})
|
||||
PhonePlayOut()
|
||||
SetBigmapActive(0,0)
|
||||
end
|
||||
end)
|
||||
|
||||
AddEventHandler('esx:playerLoaded', function()
|
||||
TriggerServerEvent('gcPhone:allUpdate')
|
||||
end)
|
||||
|
||||
--====================================================================================
|
||||
--
|
||||
--====================================================================================
|
||||
Citizen.CreateThread(function()
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
if not menuIsOpen and isDead then
|
||||
DisableControlAction(0, 288, true)
|
||||
end
|
||||
if takePhoto ~= true then
|
||||
if IsControlJustPressed(1, Config.KeyOpenClose) then
|
||||
hasPhone(function (hasPhone)
|
||||
if hasPhone == true then
|
||||
TooglePhone()
|
||||
else
|
||||
ShowNoPhoneWarning()
|
||||
end
|
||||
end)
|
||||
end
|
||||
if menuIsOpen == true then
|
||||
for _, value in ipairs(KeyToucheCloseEvent) do
|
||||
if IsControlJustPressed(1, value.code) then
|
||||
SendNUIMessage({keyUp = value.event})
|
||||
end
|
||||
end
|
||||
if useMouse == true and hasFocus == ignoreFocus then
|
||||
local nuiFocus = not hasFocus
|
||||
SetNuiFocus(nuiFocus, nuiFocus)
|
||||
hasFocus = nuiFocus
|
||||
elseif useMouse == false and hasFocus == true then
|
||||
SetNuiFocus(false, false)
|
||||
hasFocus = false
|
||||
end
|
||||
else
|
||||
if hasFocus == true then
|
||||
SetNuiFocus(false, false)
|
||||
hasFocus = false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
|
||||
--====================================================================================
|
||||
-- Active ou Deactive une application (appName => config.json)
|
||||
--====================================================================================
|
||||
RegisterNetEvent('gcPhone:setEnableApp')
|
||||
AddEventHandler('gcPhone:setEnableApp', function(appName, enable)
|
||||
SendNUIMessage({event = 'setEnableApp', appName = appName, enable = enable })
|
||||
end)
|
||||
|
||||
--====================================================================================
|
||||
-- Gestion des appels fixe
|
||||
--====================================================================================
|
||||
function startFixeCall (fixeNumber)
|
||||
local number = ''
|
||||
DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", "", "", "", "", 10)
|
||||
while (UpdateOnscreenKeyboard() == 0) do
|
||||
DisableAllControlActions(0);
|
||||
Wait(0);
|
||||
end
|
||||
if (GetOnscreenKeyboardResult()) then
|
||||
number = GetOnscreenKeyboardResult()
|
||||
end
|
||||
if number ~= '' then
|
||||
TriggerEvent('gcphone:autoCall', number, {
|
||||
useNumber = fixeNumber
|
||||
})
|
||||
PhonePlayCall(true)
|
||||
end
|
||||
end
|
||||
|
||||
function TakeAppel (infoCall)
|
||||
TriggerEvent('gcphone:autoAcceptCall', infoCall)
|
||||
end
|
||||
|
||||
RegisterNetEvent("gcPhone:notifyFixePhoneChange")
|
||||
AddEventHandler("gcPhone:notifyFixePhoneChange", function(_PhoneInCall)
|
||||
PhoneInCall = _PhoneInCall
|
||||
end)
|
||||
|
||||
--[[
|
||||
Affiche les imformations quant le joueurs est proche d'un fixe
|
||||
--]]
|
||||
function showFixePhoneHelper (coords)
|
||||
for number, data in pairs(Config.FixePhone) do
|
||||
local dist = GetDistanceBetweenCoords(
|
||||
data.coords.x, data.coords.y, data.coords.z,
|
||||
coords.x, coords.y, coords.z, 1)
|
||||
if dist <= 2.5 then
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(_U('use_fixed', data.name, number))
|
||||
DisplayHelpTextFromStringLabel(0, 0, 0, -1)
|
||||
if IsControlJustPressed(1, Config.KeyTakeCall) then
|
||||
startFixeCall(number)
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
RegisterNetEvent('gcPhone:register_FixePhone')
|
||||
AddEventHandler('gcPhone:register_FixePhone', function(phone_number, data)
|
||||
Config.FixePhone[phone_number] = data
|
||||
end)
|
||||
|
||||
local registeredPhones = {}
|
||||
Citizen.CreateThread(function()
|
||||
if not Config.AutoFindFixePhones then return end
|
||||
while not ESX do Citizen.Wait(0) end
|
||||
while true do
|
||||
local playerPed = GetPlayerPed(-1)
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
for _, key in pairs({'p_phonebox_01b_s', 'p_phonebox_02_s', 'prop_phonebox_01a', 'prop_phonebox_01b', 'prop_phonebox_01c', 'prop_phonebox_02', 'prop_phonebox_03', 'prop_phonebox_04'}) do
|
||||
local closestPhone = GetClosestObjectOfType(coords.x, coords.y, coords.z, 25.0, key, false)
|
||||
if closestPhone ~= 0 and not registeredPhones[closestPhone] then
|
||||
local phoneCoords = GetEntityCoords(closestPhone)
|
||||
number = ('0%.2s-%.2s%.2s'):format(math.abs(phoneCoords.x*100), math.abs(phoneCoords.y * 100), math.abs(phoneCoords.z *100))
|
||||
if not Config.FixePhone[number] then
|
||||
TriggerServerEvent('gcPhone:register_FixePhone', number, phoneCoords)
|
||||
end
|
||||
registeredPhones[closestPhone] = true
|
||||
end
|
||||
end
|
||||
Citizen.Wait(1000)
|
||||
end
|
||||
end)
|
||||
|
||||
Citizen.CreateThread(function ()
|
||||
local mod = 0
|
||||
while true do
|
||||
local playerPed = PlayerPedId()
|
||||
local coords = GetEntityCoords(playerPed)
|
||||
local inRangeToActivePhone = false
|
||||
local inRangedist = 0
|
||||
for i, _ in pairs(PhoneInCall) do
|
||||
local dist = GetDistanceBetweenCoords(
|
||||
PhoneInCall[i].coords.x, PhoneInCall[i].coords.y, PhoneInCall[i].coords.z,
|
||||
coords.x, coords.y, coords.z, 1)
|
||||
if (dist <= soundDistanceMax) then
|
||||
DrawMarker(1, PhoneInCall[i].coords.x, PhoneInCall[i].coords.y, PhoneInCall[i].coords.z,
|
||||
0,0,0, 0,0,0, 0.1,0.1,0.1, 0,255,0,255, 0,0,0,0,0,0,0)
|
||||
inRangeToActivePhone = true
|
||||
inRangedist = dist
|
||||
if (dist <= 1.5) then
|
||||
SetTextComponentFormat("STRING")
|
||||
AddTextComponentString(_U('key_answer'))
|
||||
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
|
||||
if IsControlJustPressed(1, Config.KeyTakeCall) then
|
||||
PhonePlayCall(true)
|
||||
TakeAppel(PhoneInCall[i])
|
||||
PhoneInCall = {}
|
||||
StopSoundJS('ring2.ogg')
|
||||
end
|
||||
end
|
||||
break
|
||||
end
|
||||
end
|
||||
if inRangeToActivePhone == false then
|
||||
showFixePhoneHelper(coords)
|
||||
end
|
||||
if inRangeToActivePhone == true and currentPlaySound == false then
|
||||
PlaySoundJS('ring2.ogg', 0.2 + (inRangedist - soundDistanceMax) / -soundDistanceMax * 0.8 )
|
||||
currentPlaySound = true
|
||||
elseif inRangeToActivePhone == true then
|
||||
mod = mod + 1
|
||||
if (mod == 15) then
|
||||
mod = 0
|
||||
SetSoundVolumeJS('ring2.ogg', 0.2 + (inRangedist - soundDistanceMax) / -soundDistanceMax * 0.8 )
|
||||
end
|
||||
elseif inRangeToActivePhone == false and currentPlaySound == true then
|
||||
currentPlaySound = false
|
||||
StopSoundJS('ring2.ogg')
|
||||
end
|
||||
Citizen.Wait(0)
|
||||
end
|
||||
end)
|
||||
|
||||
function PlaySoundJS (sound, volume)
|
||||
SendNUIMessage({ event = 'playSound', sound = sound, volume = volume })
|
||||
end
|
||||
|
||||
function SetSoundVolumeJS (sound, volume)
|
||||
SendNUIMessage({ event = 'setSoundVolume', sound = sound, volume = volume})
|
||||
end
|
||||
|
||||
function StopSoundJS (sound)
|
||||
SendNUIMessage({ event = 'stopSound', sound = sound})
|
||||
end
|
||||
|
||||
RegisterNetEvent("gcPhone:forceOpenPhone")
|
||||
AddEventHandler("gcPhone:forceOpenPhone", function(_myPhoneNumber)
|
||||
if menuIsOpen == false then
|
||||
TooglePhone()
|
||||
end
|
||||
end)
|
||||
|
||||
--====================================================================================
|
||||
-- Events
|
||||
--====================================================================================
|
||||
RegisterNetEvent("gcPhone:myPhoneNumber")
|
||||
AddEventHandler("gcPhone:myPhoneNumber", function(_myPhoneNumber)
|
||||
myPhoneNumber = _myPhoneNumber
|
||||
SendNUIMessage({event = 'updateMyPhoneNumber', myPhoneNumber = myPhoneNumber})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:contactList")
|
||||
AddEventHandler("gcPhone:contactList", function(_contacts)
|
||||
SendNUIMessage({event = 'updateContacts', contacts = _contacts})
|
||||
contacts = _contacts
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:allMessage")
|
||||
AddEventHandler("gcPhone:allMessage", function(allmessages)
|
||||
SendNUIMessage({event = 'updateMessages', messages = allmessages})
|
||||
messages = allmessages
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:getBourse")
|
||||
AddEventHandler("gcPhone:getBourse", function(bourse)
|
||||
SendNUIMessage({event = 'updateBourse', bourse = bourse})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:receiveMessage")
|
||||
AddEventHandler("gcPhone:receiveMessage", function(message, number)
|
||||
-- SendNUIMessage({event = 'updateMessages', messages = messages})
|
||||
if tostring(number) == tostring(myPhoneNumber) then return end
|
||||
|
||||
SendNUIMessage({event = 'newMessage', message = message})
|
||||
table.insert(messages, message)
|
||||
if message.owner == 0 then
|
||||
local text = _U('new_message')
|
||||
if Config.ShowNumberNotification == true then
|
||||
text = _U('new_message_from', message.transmitter)
|
||||
for _,contact in pairs(contacts) do
|
||||
if contact.number == message.transmitter then
|
||||
text = _U('new_message_transmitter', contact.display)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
SetNotificationTextEntry("STRING")
|
||||
AddTextComponentString(text)
|
||||
DrawNotification(false, false)
|
||||
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1)
|
||||
--[[ Citizen.Wait(300)
|
||||
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1)
|
||||
Citizen.Wait(300)
|
||||
PlaySound(-1, "Menu_Accept", "Phone_SoundSet_Default", 0, 0, 1) ]]
|
||||
end
|
||||
end)
|
||||
|
||||
--====================================================================================
|
||||
-- Function client | Contacts
|
||||
--====================================================================================
|
||||
function addContact(display, num)
|
||||
TriggerServerEvent('gcPhone:addContact', display, num)
|
||||
end
|
||||
|
||||
function deleteContact(num)
|
||||
TriggerServerEvent('gcPhone:deleteContact', num)
|
||||
end
|
||||
--====================================================================================
|
||||
-- Function client | Messages
|
||||
--====================================================================================
|
||||
function sendMessage(num, message)
|
||||
TriggerServerEvent('gcPhone:sendMessage', num, message)
|
||||
end
|
||||
|
||||
function deleteMessage(msgId)
|
||||
TriggerServerEvent('gcPhone:deleteMessage', msgId)
|
||||
for k, v in ipairs(messages) do
|
||||
if v.id == msgId then
|
||||
table.remove(messages, k)
|
||||
SendNUIMessage({event = 'updateMessages', messages = messages})
|
||||
return
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function deleteMessageContact(num)
|
||||
TriggerServerEvent('gcPhone:deleteMessageNumber', num)
|
||||
end
|
||||
|
||||
function deleteAllMessage()
|
||||
TriggerServerEvent('gcPhone:deleteAllMessage')
|
||||
end
|
||||
|
||||
function setReadMessageNumber(num)
|
||||
TriggerServerEvent('gcPhone:setReadMessageNumber', num)
|
||||
for k, v in ipairs(messages) do
|
||||
if v.transmitter == num then
|
||||
v.isRead = 1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function requestAllMessages()
|
||||
TriggerServerEvent('gcPhone:requestAllMessages')
|
||||
end
|
||||
|
||||
function requestAllContact()
|
||||
TriggerServerEvent('gcPhone:requestAllContact')
|
||||
end
|
||||
|
||||
|
||||
|
||||
--====================================================================================
|
||||
-- Function client | Appels
|
||||
--====================================================================================
|
||||
local aminCall = false
|
||||
local inCall = false
|
||||
|
||||
RegisterNetEvent("gcPhone:waitingCall")
|
||||
AddEventHandler("gcPhone:waitingCall", function(infoCall, initiator)
|
||||
SendNUIMessage({event = 'waitingCall', infoCall = infoCall, initiator = initiator})
|
||||
if initiator == true then
|
||||
PhonePlayCall()
|
||||
if menuIsOpen == false then
|
||||
TooglePhone()
|
||||
end
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:acceptCall")
|
||||
AddEventHandler("gcPhone:acceptCall", function(infoCall, initiator)
|
||||
if inCall == false and USE_RTC == false then
|
||||
inCall = true
|
||||
if Config.UseMumbleVoIP then
|
||||
exports["mumble-voip"]:SetCallChannel(infoCall.id+1)
|
||||
elseif Config.UseTokoVoIP then
|
||||
exports.tokovoip_script:addPlayerToRadio(infoCall.id + 120)
|
||||
TokoVoipID = infoCall.id + 120
|
||||
else
|
||||
NetworkSetVoiceChannel(infoCall.id + 1)
|
||||
NetworkSetTalkerProximity(0.0)
|
||||
end
|
||||
end
|
||||
if menuIsOpen == false then
|
||||
TooglePhone()
|
||||
end
|
||||
PhonePlayCall()
|
||||
SendNUIMessage({event = 'acceptCall', infoCall = infoCall, initiator = initiator})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:rejectCall")
|
||||
AddEventHandler("gcPhone:rejectCall", function(infoCall)
|
||||
if inCall == true then
|
||||
inCall = false
|
||||
if Config.UseMumbleVoIP then
|
||||
exports["mumble-voip"]:SetCallChannel(0)
|
||||
elseif Config.UseTokoVoIP then
|
||||
exports.tokovoip_script:removePlayerFromRadio(TokoVoipID)
|
||||
TokoVoipID = nil
|
||||
else
|
||||
Citizen.InvokeNative(0xE036A705F989E049)
|
||||
NetworkSetTalkerProximity(2.5)
|
||||
end
|
||||
end
|
||||
PhonePlayText()
|
||||
SendNUIMessage({event = 'rejectCall', infoCall = infoCall})
|
||||
end)
|
||||
|
||||
|
||||
RegisterNetEvent("gcPhone:historiqueCall")
|
||||
AddEventHandler("gcPhone:historiqueCall", function(historique)
|
||||
SendNUIMessage({event = 'historiqueCall', historique = historique})
|
||||
end)
|
||||
|
||||
|
||||
function startCall (phone_number, rtcOffer, extraData)
|
||||
if rtcOffer == nil then
|
||||
rtcOffer = ''
|
||||
end
|
||||
TriggerServerEvent('gcPhone:startCall', phone_number, rtcOffer, extraData)
|
||||
end
|
||||
|
||||
function acceptCall (infoCall, rtcAnswer)
|
||||
TriggerServerEvent('gcPhone:acceptCall', infoCall, rtcAnswer)
|
||||
end
|
||||
|
||||
function rejectCall(infoCall)
|
||||
TriggerServerEvent('gcPhone:rejectCall', infoCall)
|
||||
end
|
||||
|
||||
function ignoreCall(infoCall)
|
||||
TriggerServerEvent('gcPhone:ignoreCall', infoCall)
|
||||
end
|
||||
|
||||
function requestHistoriqueCall()
|
||||
TriggerServerEvent('gcPhone:getHistoriqueCall')
|
||||
end
|
||||
|
||||
function appelsDeleteHistorique (num)
|
||||
TriggerServerEvent('gcPhone:appelsDeleteHistorique', num)
|
||||
end
|
||||
|
||||
function appelsDeleteAllHistorique ()
|
||||
TriggerServerEvent('gcPhone:appelsDeleteAllHistorique')
|
||||
end
|
||||
|
||||
|
||||
--====================================================================================
|
||||
-- Event NUI - Appels
|
||||
--====================================================================================
|
||||
|
||||
RegisterNUICallback('startCall', function (data, cb)
|
||||
startCall(data.numero, data.rtcOffer, data.extraData)
|
||||
cb()
|
||||
end)
|
||||
|
||||
RegisterNUICallback('acceptCall', function (data, cb)
|
||||
acceptCall(data.infoCall, data.rtcAnswer)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('rejectCall', function (data, cb)
|
||||
rejectCall(data.infoCall)
|
||||
cb()
|
||||
end)
|
||||
|
||||
RegisterNUICallback('ignoreCall', function (data, cb)
|
||||
ignoreCall(data.infoCall)
|
||||
cb()
|
||||
end)
|
||||
|
||||
RegisterNUICallback('notififyUseRTC', function (use, cb)
|
||||
USE_RTC = use
|
||||
if USE_RTC == true and inCall == true then
|
||||
inCall = false
|
||||
Citizen.InvokeNative(0xE036A705F989E049)
|
||||
if Config.UseTokoVoIP then
|
||||
exports.tokovoip_script:removePlayerFromRadio(TokoVoipID)
|
||||
TokoVoipID = nil
|
||||
else
|
||||
NetworkSetTalkerProximity(2.5)
|
||||
end
|
||||
end
|
||||
cb()
|
||||
end)
|
||||
|
||||
|
||||
RegisterNUICallback('onCandidates', function (data, cb)
|
||||
TriggerServerEvent('gcPhone:candidates', data.id, data.candidates)
|
||||
cb()
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:candidates")
|
||||
AddEventHandler("gcPhone:candidates", function(candidates)
|
||||
SendNUIMessage({event = 'candidatesAvailable', candidates = candidates})
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNetEvent('gcphone:autoCall')
|
||||
AddEventHandler('gcphone:autoCall', function(number, extraData)
|
||||
if number ~= nil then
|
||||
SendNUIMessage({ event = "autoStartCall", number = number, extraData = extraData})
|
||||
end
|
||||
end)
|
||||
|
||||
RegisterNetEvent('gcphone:autoCallNumber')
|
||||
AddEventHandler('gcphone:autoCallNumber', function(data)
|
||||
TriggerEvent('gcphone:autoCall', data.number)
|
||||
end)
|
||||
|
||||
RegisterNetEvent('gcphone:autoAcceptCall')
|
||||
AddEventHandler('gcphone:autoAcceptCall', function(infoCall)
|
||||
SendNUIMessage({ event = "autoAcceptCall", infoCall = infoCall})
|
||||
end)
|
||||
|
||||
--====================================================================================
|
||||
-- Gestion des evenements NUI
|
||||
--====================================================================================
|
||||
RegisterNUICallback('log', function(data, cb)
|
||||
print(data)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('focus', function(data, cb)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('blur', function(data, cb)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('reponseText', function(data, cb)
|
||||
local limit = data.limit or 255
|
||||
local text = data.text or ''
|
||||
|
||||
DisplayOnscreenKeyboard(1, "FMMC_MPM_NA", "", text, "", "", "", limit)
|
||||
while (UpdateOnscreenKeyboard() == 0) do
|
||||
DisableAllControlActions(0);
|
||||
Wait(0);
|
||||
end
|
||||
if (GetOnscreenKeyboardResult()) then
|
||||
text = GetOnscreenKeyboardResult()
|
||||
end
|
||||
cb(json.encode({text = text}))
|
||||
end)
|
||||
--====================================================================================
|
||||
-- Event - Messages
|
||||
--====================================================================================
|
||||
RegisterNUICallback('getMessages', function(data, cb)
|
||||
cb(json.encode(messages))
|
||||
end)
|
||||
RegisterNUICallback('sendMessage', function(data, cb)
|
||||
if data.message == '%pos%' then
|
||||
local myPos = GetEntityCoords(PlayerPedId())
|
||||
data.message = 'GPS: ' .. myPos.x .. ', ' .. myPos.y
|
||||
end
|
||||
TriggerServerEvent('gcPhone:sendMessage', data.phoneNumber, data.message)
|
||||
end)
|
||||
RegisterNUICallback('deleteMessage', function(data, cb)
|
||||
deleteMessage(data.id)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('deleteMessageNumber', function (data, cb)
|
||||
deleteMessageContact(data.number)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('deleteAllMessage', function (data, cb)
|
||||
deleteAllMessage()
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('setReadMessageNumber', function (data, cb)
|
||||
setReadMessageNumber(data.number)
|
||||
cb()
|
||||
end)
|
||||
--====================================================================================
|
||||
-- Event - Contacts
|
||||
--====================================================================================
|
||||
RegisterNUICallback('addContact', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:addContact', data.display, data.phoneNumber)
|
||||
end)
|
||||
RegisterNUICallback('updateContact', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:updateContact', data.id, data.display, data.phoneNumber)
|
||||
end)
|
||||
RegisterNUICallback('deleteContact', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:deleteContact', data.id)
|
||||
end)
|
||||
RegisterNUICallback('getContacts', function(data, cb)
|
||||
cb(json.encode(contacts))
|
||||
end)
|
||||
RegisterNUICallback('setGPS', function(data, cb)
|
||||
SetNewWaypoint(tonumber(data.x), tonumber(data.y))
|
||||
cb()
|
||||
end)
|
||||
|
||||
-- Add security for event (leuit#0100)
|
||||
RegisterNUICallback('callEvent', function(data, cb)
|
||||
local eventName = data.eventName or ''
|
||||
if string.match(eventName, 'gcphone') then
|
||||
if data.data ~= nil then
|
||||
TriggerEvent(data.eventName, data.data)
|
||||
else
|
||||
TriggerEvent(data.eventName)
|
||||
end
|
||||
else
|
||||
print('Event not allowed')
|
||||
end
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('useMouse', function(um, cb)
|
||||
useMouse = um
|
||||
end)
|
||||
RegisterNUICallback('deleteALL', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:deleteALL')
|
||||
cb()
|
||||
end)
|
||||
|
||||
|
||||
|
||||
function TooglePhone()
|
||||
menuIsOpen = not menuIsOpen
|
||||
SendNUIMessage({show = menuIsOpen})
|
||||
if menuIsOpen == true then
|
||||
PhonePlayIn()
|
||||
TriggerEvent('gcPhone:setMenuStatus', true)
|
||||
SetBigmapActive(1,0)
|
||||
else
|
||||
PhonePlayOut()
|
||||
TriggerEvent('gcPhone:setMenuStatus', false)
|
||||
SetBigmapActive(0,0)
|
||||
end
|
||||
end
|
||||
RegisterNUICallback('faketakePhoto', function(data, cb)
|
||||
menuIsOpen = false
|
||||
TriggerEvent('gcPhone:setMenuStatus', false)
|
||||
SendNUIMessage({show = false})
|
||||
cb()
|
||||
TriggerEvent('camera:open')
|
||||
end)
|
||||
|
||||
RegisterNUICallback('closePhone', function(data, cb)
|
||||
menuIsOpen = false
|
||||
TriggerEvent('gcPhone:setMenuStatus', false)
|
||||
SendNUIMessage({show = false})
|
||||
PhonePlayOut()
|
||||
SetBigmapActive(0,0)
|
||||
cb()
|
||||
end)
|
||||
|
||||
|
||||
|
||||
|
||||
----------------------------------
|
||||
---------- GESTION APPEL ---------
|
||||
----------------------------------
|
||||
RegisterNUICallback('appelsDeleteHistorique', function (data, cb)
|
||||
appelsDeleteHistorique(data.numero)
|
||||
cb()
|
||||
end)
|
||||
RegisterNUICallback('appelsDeleteAllHistorique', function (data, cb)
|
||||
appelsDeleteAllHistorique(data.infoCall)
|
||||
cb()
|
||||
end)
|
||||
|
||||
|
||||
----------------------------------
|
||||
---------- GESTION VIA WEBRTC ----
|
||||
----------------------------------
|
||||
AddEventHandler('onClientResourceStart', function(res)
|
||||
DoScreenFadeIn(300)
|
||||
if res == "gcphone" then
|
||||
TriggerServerEvent('gcPhone:allUpdate')
|
||||
-- Try again in 2 minutes (Recovers bugged phone numbers)
|
||||
Citizen.Wait(120000)
|
||||
TriggerServerEvent('gcPhone:allUpdate')
|
||||
end
|
||||
end)
|
||||
|
||||
|
||||
RegisterNUICallback('setIgnoreFocus', function (data, cb)
|
||||
ignoreFocus = data.ignoreFocus
|
||||
cb()
|
||||
end)
|
||||
|
||||
RegisterNUICallback('takePhoto', function(data, cb)
|
||||
CreateMobilePhone(1)
|
||||
CellCamActivate(true, true)
|
||||
takePhoto = true
|
||||
Citizen.Wait(0)
|
||||
if hasFocus == true then
|
||||
SetNuiFocus(false, false)
|
||||
hasFocus = false
|
||||
end
|
||||
while takePhoto do
|
||||
Citizen.Wait(0)
|
||||
|
||||
if IsControlJustPressed(1, 27) then -- Toogle Mode
|
||||
frontCam = not frontCam
|
||||
CellFrontCamActivate(frontCam)
|
||||
elseif IsControlJustPressed(1, 177) then -- CANCEL
|
||||
DestroyMobilePhone()
|
||||
CellCamActivate(false, false)
|
||||
cb(json.encode({ url = nil }))
|
||||
takePhoto = false
|
||||
break
|
||||
elseif IsControlJustPressed(1, 176) then -- TAKE.. PIC
|
||||
exports['screenshot-basic']:requestScreenshotUpload(data.url, data.field, function(data)
|
||||
local resp = json.decode(data)
|
||||
DestroyMobilePhone()
|
||||
CellCamActivate(false, false)
|
||||
cb(json.encode({ url = resp.url }))
|
||||
end)
|
||||
takePhoto = false
|
||||
end
|
||||
HideHudComponentThisFrame(7)
|
||||
HideHudComponentThisFrame(8)
|
||||
HideHudComponentThisFrame(9)
|
||||
HideHudComponentThisFrame(6)
|
||||
HideHudComponentThisFrame(19)
|
||||
HideHudAndRadarThisFrame()
|
||||
end
|
||||
Citizen.Wait(1000)
|
||||
PhonePlayAnim('text', false, true)
|
||||
end)
|
||||
57
HTML/gcphone/resources/gcphone/client/photo.lua
Normal file
@@ -0,0 +1,57 @@
|
||||
-- Author: Xinerki (https://forum.fivem.net/t/release-cellphone-camera/43599)
|
||||
|
||||
phone = false
|
||||
phoneId = 0
|
||||
|
||||
RegisterNetEvent('camera:open')
|
||||
AddEventHandler('camera:open', function()
|
||||
CreateMobilePhone(1)
|
||||
CellCamActivate(true, true)
|
||||
phone = true
|
||||
PhonePlayOut()
|
||||
end)
|
||||
|
||||
frontCam = false
|
||||
|
||||
function CellFrontCamActivate(activate)
|
||||
return Citizen.InvokeNative(0x2491A93618B7D838, activate)
|
||||
end
|
||||
|
||||
Citizen.CreateThread(function()
|
||||
DestroyMobilePhone()
|
||||
while true do
|
||||
Citizen.Wait(0)
|
||||
|
||||
if IsControlJustPressed(1, 177) and phone == true then -- CLOSE PHONE
|
||||
DestroyMobilePhone()
|
||||
phone = false
|
||||
CellCamActivate(false, false)
|
||||
if firstTime == true then
|
||||
firstTime = false
|
||||
Citizen.Wait(2500)
|
||||
displayDoneMission = true
|
||||
end
|
||||
end
|
||||
|
||||
if IsControlJustPressed(1, 27) and phone == true then -- SELFIE MODE
|
||||
frontCam = not frontCam
|
||||
CellFrontCamActivate(frontCam)
|
||||
end
|
||||
|
||||
if phone == true then
|
||||
HideHudComponentThisFrame(7)
|
||||
HideHudComponentThisFrame(8)
|
||||
HideHudComponentThisFrame(9)
|
||||
HideHudComponentThisFrame(6)
|
||||
HideHudComponentThisFrame(19)
|
||||
HideHudAndRadarThisFrame()
|
||||
end
|
||||
|
||||
ren = GetMobilePhoneRenderId()
|
||||
SetTextRenderId(ren)
|
||||
|
||||
-- Everything rendered inside here will appear on your phone.
|
||||
|
||||
SetTextRenderId(1) -- NOTE: 1 is default
|
||||
end
|
||||
end)
|
||||
82
HTML/gcphone/resources/gcphone/client/twitter.lua
Normal file
@@ -0,0 +1,82 @@
|
||||
--====================================================================================
|
||||
-- #Author: Jonathan D @ Gannon
|
||||
--====================================================================================
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_getTweets")
|
||||
AddEventHandler("gcPhone:twitter_getTweets", function(tweets)
|
||||
SendNUIMessage({event = 'twitter_tweets', tweets = tweets})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_getFavoriteTweets")
|
||||
AddEventHandler("gcPhone:twitter_getFavoriteTweets", function(tweets)
|
||||
SendNUIMessage({event = 'twitter_favoritetweets', tweets = tweets})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_newTweets")
|
||||
AddEventHandler("gcPhone:twitter_newTweets", function(tweet)
|
||||
SendNUIMessage({event = 'twitter_newTweet', tweet = tweet})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_updateTweetLikes")
|
||||
AddEventHandler("gcPhone:twitter_updateTweetLikes", function(tweetId, likes)
|
||||
SendNUIMessage({event = 'twitter_updateTweetLikes', tweetId = tweetId, likes = likes})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_setAccount")
|
||||
AddEventHandler("gcPhone:twitter_setAccount", function(username, password, avatarUrl)
|
||||
SendNUIMessage({event = 'twitter_setAccount', username = username, password = password, avatarUrl = avatarUrl})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_createAccount")
|
||||
AddEventHandler("gcPhone:twitter_createAccount", function(account)
|
||||
SendNUIMessage({event = 'twitter_createAccount', account = account})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_showError")
|
||||
AddEventHandler("gcPhone:twitter_showError", function(title, message)
|
||||
SendNUIMessage({event = 'twitter_showError', message = message, title = title})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_showSuccess")
|
||||
AddEventHandler("gcPhone:twitter_showSuccess", function(title, message)
|
||||
SendNUIMessage({event = 'twitter_showSuccess', message = message, title = title})
|
||||
end)
|
||||
|
||||
RegisterNetEvent("gcPhone:twitter_setTweetLikes")
|
||||
AddEventHandler("gcPhone:twitter_setTweetLikes", function(tweetId, isLikes)
|
||||
SendNUIMessage({event = 'twitter_setTweetLikes', tweetId = tweetId, isLikes = isLikes})
|
||||
end)
|
||||
|
||||
|
||||
|
||||
RegisterNUICallback('twitter_login', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_login', data.username, data.password)
|
||||
end)
|
||||
RegisterNUICallback('twitter_changePassword', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_changePassword', data.username, data.password, data.newPassword)
|
||||
end)
|
||||
|
||||
|
||||
RegisterNUICallback('twitter_createAccount', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_createAccount', data.username, data.password, data.avatarUrl)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('twitter_getTweets', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_getTweets', data.username, data.password)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('twitter_getFavoriteTweets', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_getFavoriteTweets', data.username, data.password)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('twitter_postTweet', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_postTweets', data.username or '', data.password or '', data.message)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('twitter_toggleLikeTweet', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_toogleLikeTweet', data.username or '', data.password or '', data.tweetId)
|
||||
end)
|
||||
|
||||
RegisterNUICallback('twitter_setAvatarUrl', function(data, cb)
|
||||
TriggerServerEvent('gcPhone:twitter_setAvatarUrl', data.username or '', data.password or '', data.avatarUrl)
|
||||
end)
|
||||
27
HTML/gcphone/resources/gcphone/config.lua
Normal file
@@ -0,0 +1,27 @@
|
||||
Config = {}
|
||||
|
||||
-- Script locale (only .Lua)
|
||||
Config.Locale = 'en'
|
||||
|
||||
Config.AutoFindFixePhones = true -- Automatically add pay phones as they are found by their models.
|
||||
|
||||
Config.FixePhone = {
|
||||
-- Mission Row
|
||||
['911'] = {
|
||||
name = _U('mission_row'),
|
||||
coords = { x = 441.2, y = -979.7, z = 30.58 }
|
||||
},
|
||||
|
||||
-- ['372-9663'] = {
|
||||
-- name = _U('phone_booth'),
|
||||
-- coords = { x = 372.305, y = -966.373, z = 28.413 }
|
||||
-- },
|
||||
}
|
||||
|
||||
Config.KeyOpenClose = 288 -- F1
|
||||
Config.KeyTakeCall = 38 -- E
|
||||
|
||||
Config.UseMumbleVoIP = true -- Use Frazzle's Mumble-VoIP Resource (Recomended!) https://github.com/FrazzIe/mumble-voip
|
||||
Config.UseTokoVoIP = false
|
||||
|
||||
Config.ShowNumberNotification = false -- Show Number or Contact Name when you receive new SMS
|
||||
99
HTML/gcphone/resources/gcphone/fxmanifest.lua
Normal file
@@ -0,0 +1,99 @@
|
||||
fx_version 'bodacious'
|
||||
|
||||
game 'gta5'
|
||||
|
||||
ui_page 'html/index.html'
|
||||
|
||||
files {
|
||||
'html/index.html',
|
||||
'html/static/css/app.css',
|
||||
'html/static/js/app.js',
|
||||
'html/static/js/manifest.js',
|
||||
'html/static/js/vendor.js',
|
||||
|
||||
'html/static/config/config.json',
|
||||
|
||||
-- Coque
|
||||
'html/static/img/coque/blue.png',
|
||||
'html/static/img/coque/s8.png',
|
||||
'html/static/img/coque/red.png',
|
||||
'html/static/img/coque/grey.png',
|
||||
'html/static/img/coque/pink.png',
|
||||
'html/static/img/coque/no_cover.png',
|
||||
|
||||
|
||||
-- Background
|
||||
'html/static/img/background/back001.jpg',
|
||||
'html/static/img/background/back002.jpg',
|
||||
'html/static/img/background/back003.jpg',
|
||||
'html/static/img/background/color.jpg',
|
||||
'html/static/img/background/humo.jpg',
|
||||
'html/static/img/background/iluminacion.jpg',
|
||||
'html/static/img/background/neon.jpg',
|
||||
'html/static/img/background/oscuridad.jpg',
|
||||
'html/static/img/background/paisajes.jpg',
|
||||
'html/static/img/background/playa.jpg',
|
||||
'html/static/img/background/tokio.jpg',
|
||||
|
||||
'html/static/img/icons_app/call.png',
|
||||
'html/static/img/icons_app/contacts.png',
|
||||
'html/static/img/icons_app/ff.png',
|
||||
'html/static/img/icons_app/itunes.svg',
|
||||
'html/static/img/icons_app/lsfd.png',
|
||||
'html/static/img/icons_app/sms.png',
|
||||
'html/static/img/icons_app/settings.png',
|
||||
'html/static/img/icons_app/menu.png',
|
||||
'html/static/img/icons_app/bourse1.png',
|
||||
'html/static/img/icons_app/tchat.png',
|
||||
'html/static/img/icons_app/photo.png',
|
||||
'html/static/img/icons_app/policia.png',
|
||||
'html/static/img/icons_app/reddit.png',
|
||||
'html/static/img/icons_app/notes.png',
|
||||
'html/static/img/icons_app/banco.png',
|
||||
'html/static/img/icons_app/wifi.png',
|
||||
'html/static/img/icons_app/9gag.png',
|
||||
'html/static/img/icons_app/twitter.png',
|
||||
'html/static/img/icons_app/borrado.png',
|
||||
|
||||
'html/static/img/app_bank/fleeca_tar.png',
|
||||
'html/static/img/app_bank/tarjetas.png',
|
||||
|
||||
'html/static/img/app_tchat/reddit.png',
|
||||
|
||||
'html/static/img/twitter/bird.png',
|
||||
'html/static/img/twitter/default_profile.png',
|
||||
'html/static/sound/Twitter_Sound_Effect.ogg',
|
||||
|
||||
'html/static/img/courbure.png',
|
||||
'html/static/fonts/fontawesome-webfont.eot',
|
||||
'html/static/fonts/fontawesome-webfont.ttf',
|
||||
'html/static/fonts/fontawesome-webfont.woff',
|
||||
'html/static/fonts/fontawesome-webfont.woff2',
|
||||
|
||||
'html/static/sound/*.ogg',
|
||||
|
||||
}
|
||||
|
||||
client_script {
|
||||
"@es_extended/locale.lua",
|
||||
"locales/en.lua",
|
||||
"locales/es.lua",
|
||||
"config.lua",
|
||||
"client/animation.lua",
|
||||
"client/client.lua",
|
||||
"client/photo.lua",
|
||||
"client/app_tchat.lua",
|
||||
"client/bank.lua",
|
||||
"client/twitter.lua"
|
||||
}
|
||||
|
||||
server_script {
|
||||
"@mysql-async/lib/MySQL.lua",
|
||||
"@es_extended/locale.lua",
|
||||
"locales/en.lua",
|
||||
"locales/es.lua",
|
||||
"config.lua",
|
||||
"server/server.lua",
|
||||
"server/app_tchat.lua",
|
||||
"server/twitter.lua",
|
||||
}
|
||||
1
HTML/gcphone/resources/gcphone/html/index.html
Normal file
@@ -0,0 +1 @@
|
||||
<!DOCTYPE html><html><head><meta charset=utf-8><link rel=stylesheet href=https://use.fontawesome.com/releases/v5.8.1/css/all.css integrity=sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf crossorigin=anonymous><link href=/html/static/css/app.css rel=stylesheet></head><body><div id=app></div><script src=https://code.jquery.com/jquery-3.2.1.min.js></script><script src=nui://game/ui/jquery.js type=text/javascript></script><script type=text/javascript src=/html/static/js/manifest.js></script><script type=text/javascript src=/html/static/js/vendor.js></script><script type=text/javascript src=/html/static/js/app.js></script></body></html>
|
||||
1088
HTML/gcphone/resources/gcphone/html/static/config/config.json
Normal file
4
HTML/gcphone/resources/gcphone/html/static/css/app.css
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 19 KiB |
|
After Width: | Height: | Size: 4.2 KiB |
|
After Width: | Height: | Size: 379 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 190 KiB |
|
After Width: | Height: | Size: 93 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 214 KiB |
|
After Width: | Height: | Size: 302 KiB |
|
After Width: | Height: | Size: 28 KiB |
|
After Width: | Height: | Size: 491 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 872 KiB |
|
After Width: | Height: | Size: 796 KiB |
|
After Width: | Height: | Size: 431 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/base.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/base.xcf
Normal file
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/blue.png
Normal file
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 90 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/grey.png
Normal file
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 74 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/pink.png
Normal file
|
After Width: | Height: | Size: 119 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/red.png
Normal file
|
After Width: | Height: | Size: 106 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/coque/s8.png
Normal file
|
After Width: | Height: | Size: 89 KiB |
|
After Width: | Height: | Size: 36 KiB |
|
After Width: | Height: | Size: 434 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 41 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 58 KiB |
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 21 KiB |
|
After Width: | Height: | Size: 117 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/icons_app/ff.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/icons_app/ff1.png
Normal file
|
After Width: | Height: | Size: 48 KiB |
|
After Width: | Height: | Size: 101 KiB |
|
After Width: | Height: | Size: 90 KiB |
@@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<svg enable-background="new 36.471 38.394 437.749 439.6" height="439.6" viewBox="36.471 38.394 437.749 439.6" width="437.749" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<linearGradient id="a" gradientTransform="matrix(.6278 .7783 -.7783 .6278 295.9889 -102.6574)" gradientUnits="userSpaceOnUse" x1="43.3452" x2="467.3457" y1="258.1934" y2="258.1934">
|
||||
<stop offset="0" stop-color="#fff"/>
|
||||
<stop offset=".5368" stop-color="#eee"/>
|
||||
<stop offset="1" stop-color="#e5e5e5"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="b" gradientTransform="matrix(.6278 .7783 -.7783 .6278 295.9889 -102.6574)" gradientUnits="userSpaceOnUse" x1="35.8452" x2="474.8457" y1="258.1934" y2="258.1934">
|
||||
<stop offset="0" stop-color="#ff5e4e"/>
|
||||
<stop offset=".1505" stop-color="#ff5c6d"/>
|
||||
<stop offset=".1694" stop-color="#ff5e73"/>
|
||||
<stop offset=".2476" stop-color="#ff6385"/>
|
||||
<stop offset=".3026" stop-color="#ff658c"/>
|
||||
<stop offset=".3685" stop-color="#e4729f"/>
|
||||
<stop offset=".4329" stop-color="#d17cad"/>
|
||||
<stop offset=".4772" stop-color="#ca7fb2"/>
|
||||
<stop offset=".5528" stop-color="#9d6cff"/>
|
||||
<stop offset=".5934" stop-color="#9870ff" stop-opacity=".9882"/>
|
||||
<stop offset=".6432" stop-color="#897afe" stop-opacity=".9725"/>
|
||||
<stop offset=".6979" stop-color="#708cfe" stop-opacity=".9529"/>
|
||||
<stop offset=".7556" stop-color="#4da4fd" stop-opacity=".9333"/>
|
||||
<stop offset=".8022" stop-color="#2cbcfc" stop-opacity=".9176"/>
|
||||
<stop offset="1" stop-color="#00c7ff"/>
|
||||
</linearGradient>
|
||||
<linearGradient id="c" gradientUnits="userSpaceOnUse" x1="128.63179295" x2="384.0201395" y1="90.89488104" y2="422.37177288">
|
||||
<stop offset="0" stop-color="#ff5e4e"/>
|
||||
<stop offset=".249" stop-color="#ff5c6d"/>
|
||||
<stop offset=".3765" stop-color="#ff658c"/>
|
||||
<stop offset=".497" stop-color="#ca7fb2"/>
|
||||
<stop offset=".6267" stop-color="#9d6cff"/>
|
||||
<stop offset=".7628" stop-color="#2cbcfc" stop-opacity=".9176"/>
|
||||
<stop offset="1" stop-color="#00c7ff"/>
|
||||
</linearGradient>
|
||||
<path d="m131.94 430.507c-94.767-68.476-116.341-201.133-48.188-296.3 68.149-95.165 200.227-116.803 294.996-48.327 94.767 68.473 116.342 201.13 48.193 296.3-68.154 95.165-200.228 116.803-295.001 48.327z" fill="url(#a)" stroke="url(#b)" stroke-miterlimit="10" stroke-width="15"/>
|
||||
<path d="m330.626 359.353c13.384-3.925 22.834-13.445 26.701-26.892l1.141-3.952.15-106.015c.111-79.393.004-106.509-.437-107.989-.464-1.569-1.2-2.885-2.163-3.925-1.417-.873-3.12-1.333-5.05-1.33-1.33 0-5.951.641-10.261 1.425-19.069 3.472-131.468 25.858-133.388 26.568-2.97 1.098-5.912 3.707-7.308 6.476l-1.183 2.346c0 0-.559 166.171-1.42 168.041-1.309 2.847-4.216 5.544-6.896 6.403-1.27.409-6.289 1.535-11.161 2.503-22.552 4.488-30.927 7.721-38.012 14.677-4.024 3.949-7.004 9.341-8.292 14.998-1.232 5.408-.82 13.5.935 18.421 1.839 5.146 4.799 9.541 8.669 12.999 3.518 2.711 7.671 4.729 12.34 5.927 10.323 2.643 29.65-.297 39.53-6.012 4.132-2.391 9.447-7.403 12.211-11.526 1.096-1.633 2.74-4.917 3.661-7.304 3.218-8.358 3.319-157.221 3.73-159.096.698-3.182 2.873-5.511 5.87-6.302 2.701-.709 110.93-22.107 113.977-22.534 2.68-.372 5.21.491 6.592 2.193.82.44 1.512 1.033 1.997 1.763.879 1.309.932 3.897 1.063 51.028.15 54.247.217 52.975-2.732 56.399-2.146 2.489-4.822 3.454-15.823 5.698-16.737 3.417-22.464 5.04-28.875 8.167-8.003 3.911-12.448 8.194-15.883 15.308-2.429 5.033-3.336 8.805-3.329 13.813.014 8.959 3.105 15.956 10.075 22.807.643.631 1.273 1.218 1.909 1.77 3.511 2.715 7.092 4.352 11.594 5.389 6.79 1.563 20.61.534 30.068-2.242z" fill="url(#c)"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.6 KiB |
|
After Width: | Height: | Size: 1.7 KiB |
|
After Width: | Height: | Size: 24 KiB |
|
After Width: | Height: | Size: 50 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 118 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 110 KiB |
|
After Width: | Height: | Size: 200 KiB |
|
After Width: | Height: | Size: 44 KiB |
|
After Width: | Height: | Size: 9.8 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/icons_app/sms.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 25 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/icons_app/tor.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 145 KiB |
|
After Width: | Height: | Size: 32 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 21 KiB |
BIN
HTML/gcphone/resources/gcphone/html/static/img/twitter/bird.png
Normal file
|
After Width: | Height: | Size: 33 KiB |
@@ -0,0 +1,35 @@
|
||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
version="1.1"
|
||||
id="svg3626"
|
||||
viewBox="0 0 300.00006 244.18703"
|
||||
height="244.18703"
|
||||
width="300.00006">
|
||||
<defs
|
||||
id="defs3628" />
|
||||
<metadata
|
||||
id="metadata3631">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title></dc:title>
|
||||
</cc:Work>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<g
|
||||
transform="translate(-539.17946,-568.85777)"
|
||||
id="layer1">
|
||||
<path
|
||||
id="path3611"
|
||||
style="fill:#1da1f2;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
||||
d="m 633.89823,812.04479 c 112.46038,0 173.95627,-93.16765 173.95627,-173.95625 0,-2.64628 -0.0539,-5.28062 -0.1726,-7.90305 11.93799,-8.63016 22.31446,-19.39999 30.49762,-31.65984 -10.95459,4.86937 -22.74358,8.14741 -35.11071,9.62551 12.62341,-7.56929 22.31446,-19.54304 26.88583,-33.81739 -11.81284,7.00307 -24.89517,12.09297 -38.82383,14.84055 -11.15723,-11.88436 -27.04079,-19.31655 -44.62892,-19.31655 -33.76374,0 -61.14426,27.38052 -61.14426,61.13233 0,4.79784 0.5364,9.46458 1.58538,13.94057 -50.81546,-2.55686 -95.87353,-26.88582 -126.02546,-63.87991 -5.25082,9.03545 -8.27852,19.53111 -8.27852,30.73006 0,21.21186 10.79366,39.93837 27.20766,50.89296 -10.03077,-0.30992 -19.45363,-3.06348 -27.69044,-7.64676 -0.009,0.25652 -0.009,0.50661 -0.009,0.78077 0,29.60957 21.07478,54.3319 49.0513,59.93435 -5.13757,1.40062 -10.54335,2.15158 -16.12196,2.15158 -3.93364,0 -7.76596,-0.38716 -11.49099,-1.1026 7.78383,24.2932 30.35457,41.97073 57.11525,42.46543 -20.92578,16.40207 -47.28712,26.17062 -75.93712,26.17062 -4.92898,0 -9.79834,-0.28036 -14.58427,-0.84634 27.05868,17.34379 59.18936,27.46396 93.72193,27.46396" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 10 KiB |
1
HTML/gcphone/resources/gcphone/html/static/js/app.js
Normal file
@@ -0,0 +1 @@
|
||||
!function(e){function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}var r=window.webpackJsonp;window.webpackJsonp=function(t,c,i){for(var u,a,f,s=0,l=[];s<t.length;s++)a=t[s],o[a]&&l.push(o[a][0]),o[a]=0;for(u in c)Object.prototype.hasOwnProperty.call(c,u)&&(e[u]=c[u]);for(r&&r(t,c,i);l.length;)l.shift()();if(i)for(s=0;s<i.length;s++)f=n(n.s=i[s]);return f};var t={},o={2:0};n.e=function(e){function r(){u.onerror=u.onload=null,clearTimeout(a);var n=o[e];0!==n&&(n&&n[1](new Error("Loading chunk "+e+" failed.")),o[e]=void 0)}var t=o[e];if(0===t)return new Promise(function(e){e()});if(t)return t[2];var c=new Promise(function(n,r){t=o[e]=[n,r]});t[2]=c;var i=document.getElementsByTagName("head")[0],u=document.createElement("script");u.type="text/javascript",u.charset="utf-8",u.async=!0,u.timeout=12e4,n.nc&&u.setAttribute("nonce",n.nc),u.src=n.p+"static/js/"+e+".js";var a=setTimeout(r,12e4);return u.onerror=u.onload=r,i.appendChild(u),c},n.m=e,n.c=t,n.i=function(e){return e},n.d=function(e,r,t){n.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:t})},n.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(r,"a",r),r},n.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},n.p="/html/",n.oe=function(e){throw console.error(e),e}}([]);
|
||||