Documentation

On this page you will find the most frequently asked questions about our phone esx version and their answers.

How to add new background photo in phone?

First, put the wallpaper you will add in gksphone\html\static\img\background

Then add the wallpaper in gksphone\html\static\config\config.json as in the example.

How to add new ringtone photo in phone?

First, put the wallpaper you will add in gksphone\html\static\sound

Then add the music in gksphone\html\static\config\config.json as in the example

How do I switch between incoming languages on the phone?

When you buy the phone, the phone reaches you fully compatible with 6 languages. If the language you want is outside of these languages, you have to translate it yourself.

You need to write the name of the file you have put in the gksphone\locale\ folder in config.lua.

You need to write the name of the file you have put in the gksphone\html\static\config\lang\ folder in config.json.

Lua language files must be in the gksphone\locale\ folder. The json language files should be in the gksphone\html\static\config\lang\ folder. Otherwise the language files won't work.

How do I send an ambulance dispatch after die?

You can send ambulance dispatch in two ways on our phone. With /911e (message) and "G" key after death. Add the following line of code to your ambulancejob script for the G key configuration.

The sample code below is adapted for esx_ambulancejob only If you have a different script, you have to adapt it yourself.

Find the SendDistressSignal() function in esx_ambulancejob/client/main.lua and replace it with the following code.

function SendDistressSignal()
    local label = "Emergency aid notification"
    exports["gksphone"]:JobDispatch(label, '', '["ambulance"]', false)
end

How to disable an app on phone menu screen?

Find application line in gksphone\html\static\config\config.json and set "show" to false

How do I change the name of an application?

Find application line in gksphone\html\static\config\config.json and set "name" to what ever want to name

How do I set the visibility of apps by jobs?

Inside the gksphone\html\static\config\config.json file you can do it like in below examples.

allowjob: You can make the application appear only in the jobs you want.

blockedjobs: You can close the application to the jobs you want.

How can I change the phone's startup apps?

If you want to increase or decrease the startup applications on your phone, you can setting in gksphone\html\static\config\config.json.

Don't forget to set the "show" feature to "false" in the AppStore section of the application you have added here. Likewise, add the application you will remove to the AppStore section and don't forget to set the "show" feature to "true".

How to add filter in Yellowpages?

There are 3 filters on the phone by default. You can increase or decrease them if you want. You can make your changes in the following section in gksphone\html\static\config\config.json

How do I set the set the positions of notify icons on the screen?

You can set the positions of the application icons on your screen (when the notification comes) as top and left in px in gksphone\html\static\config\config.json

How do I add a job to the Jobs app?

You will make your additions into gksphone\html\static\config\config.json.

label : The name of the profession to appear in the application jobname : Occupational codes of message recipients (you can add more than one) logoname : it's usually better to write job codes. (gksphone\html\static\img\jobs) add the pictures to the location we provide and give the name you named logoname (must be png) category: Write one of the category options you have set in JobCategory.

How to add extra category in Jobs app?

Do it as you see in the examples in the picture above, the first value is the job code, the second value is the text that will appear in the Jobs app.

How do I activate loaf house?

Find "Config.loafHouse" in gksphone/config.lua and set it to true.

After you need to find "House" application in the gksphone/html/static/config/config.json and set the show part to true.

What's in ConfigAPI.lua?

Code BlockExplanation

Cfg.TebexTransactionID

This is the tbx-id number given to you by tebex when you buy this phone. You need to write for Music and PlayTube to work.

Cfg.MessagesWebhook

Set true if you want to log messages with webhook, false if you don't.

Cfg.CallWebhooks

Set true if you want to log calls with webhook, false if you don't.

Cfg.MediaServices

You should set it according to the type of media you will use. ( Value: discord, imgur, imgbb, gkshop)

Cfg.MediaToken

You must write the token of the media service you are using. (Except for Discord, the discord webhook should be added to the Cfg.PhotoWebhook section.)

Cfg.VoiceMail

For the voicemail feature to work, you must enter discord webhook.

Cfg.PhotoWebhook

For the taking photo to work, you must enter discord webhook.

Cfg.Carseller

If you want to keep the log of the Carseller sales, you must enter the discord webhook.

Cfg.NewCarSeller

If you want to keep the log of the added new car in application, you must enter the discord webhook.

Cfg.JobNotif

If you want to keep the log of the Jobs application, you must enter the discord webhook.

Cfg.TwitterWeb

If you want to keep the log of the Twitter application, you must enter the discord webhook.

Cfg.YellowWeb

If you want to keep the log of the Yellow Pages application, you must enter the discord webhook.

Cfg.InstagramWeb

If you want to keep the log of the Instagram application, you must enter the discord webhook.

Cfg.Crypto

If you want to keep the log of the Crypto application, you must enter the discord webhook.

Cfg.BankTransfer

If you want to keep the log of the Bank Transfers, you must enter the discord webhook.

Cfg.RaceWinning

If you want to keep the log of the Race Winnings, you must enter the discord webhook.

Cfg.RaceCreate

If you want to keep the log of the Race Creators, you must enter the discord webhook.

Cfg.MessageWeb

If you want to keep the log of the Messages application, you must enter the discord webhook.

Cfg.CallWebhook

If you want to keep the log of the Calls, you must enter the discord webhook.

Cfg.JobApplication

If you want to keep the log of the Job Application, you must enter the discord webhook.

Cfg.NewsWebhook

If you want to keep the log of the News Application, you must enter the discord webhook.

Cfg.BankLimit

Minimum transfer amount for Discord webhook.

Cfg.ExploitWebhook

Detects and logs players who engage in trying abuse over the phone.

Cfg.PlayerInfo

If you set this to true, you can access posting information in Squawk, Advertising, and SnapGram.

What's in Config.lua?

Code BlockExplanation

Config.PropActive

If you don't want to use prop set it to false.

Config.Fahrenheit

Weather on the phone uses the °F/°C degree format if you set it to false "°C" will be used.

Config.EyeTarget

Required qb-target (You can use it for contacts sharing and phone booth).

Config.DataUsersPhoneNumber

Set this to true if you want the phone number to be saved in the users table when a user's phone number is created.

Config.ESXonPlayerDeath

Trigger to be used when the player dies (If you have a custom ambulance script you may need to change it).

Config.ESXonPlayerSpawn

The trigger that should be when the player gets revive (If you have a custom ambulance script you may need to change it).

Config.UsableItem

Set to true if you want the phone to be used with the item.

Config.AirDropID

Set it to true if you want the player's ID to be seen in the Phone Airdrop option, and set it to false if you want the player's name to be seen.

Config.AutoMessageDelete

Your database is too bloated and if you want it deleted set this to true.

Config.AutoDeleteTime

How many days do you want the databases to be deleted?

Config.MumbleExport

If you changed the name of the audio script, rename it whichever suits you best.

Config.PMAVoiceExport

If you changed the name of the audio script, rename it whichever suits you best.

Config.UseMumbleVoIP

Activate whatever sound script you are using.

Config.PMAVoice

Activate whatever sound script you are using.

Config.UseTokoVoIP

Activate whatever sound script you are using.

Config.SaltyChat

Activate whatever sound script you are using.

Config.TaxiPrice

Taxi application price per km/h.

Config.BankTransferCom

Commission fee for bank transfers (percentage).

Config.ValePrice

Valet car bring fee.

Config.CarsSellerBlacklist

Type the hash code of the vehicle you want not to be sold.

Config.BillingCommissions

You can get commission from invoices, first value is jobs code, second value is commission (QBCore).

Config.YellowpagesPrice

Post fee per for Yellow Pages.

Config.PhoneBox

Set to true if you want to use phone booths.

Config.PhoneBoxKey

Interaction key of the phone booth.

Config.PhoneBoothMoney

Usage fee settings from the phone booth.

Config.PhoneBoothModel

Phone Model options you can add or turn off what you want.

Config.PhoneBootNumber

Phone number of the phone booth.

Config.Crytos

You can add or turn off any crypto you want. (https://api.coingecko.com/api/v3/coins/list?include_platform=false) Crypto list that can be added The id option will be the first value, and the second value will be true or false.

Config.TwitterSubsDate

You can set Twitter Verify subscription period time value(day)

Config.TwitterSubsPay

You can set Twitter Verify subscription price value(price)

What's in Config.json?

Code BlockExplanation

WebSiteURL

You can set which site to open in the Info application. Website must be iFrame compatible.

locales

You must write the name of the language file you are using.

Picturequality

You can adjust the quality of pictures taken on the phone. (Maximum value should be 1)

ImageSizeLimitMB

You can set the size (in MB) of images to be shared in Squawk and Advertising apps

PictureType

You can set the file type of pictures taken on the phone

NotifiKonumDebug

Set it to true to determine the location of the notification icons. Do not forget to close it after processing the necessary information.

Valebring

If you want the valet not to bring a vehicle, set it to "false".

Facetime

If you want to turn off Facetime, simply turn this function off.

GroupCall

You can activate or deactivate the group call feature.

MessageRecordMic

If you want to disable the Voicemail feature, set it to "false".

BottomNotif

If you want to turn off the bottom notification in the middle of the game, just turn it off.

RealTime

If you want to turn off real time set this to false.

AirDrop

Set this to "false" if you want to turn off number sharing.

RingtoneXsound

If everyone hears the ringtone or you don't want to use it, set it to "false" to turn it off.

JobMessageAnonymous

Set to false to turn off hidden submit option in Jobs application.

CurrencyComma

You can activate or deactivate the use of commas in the amount of money displayed on the phone.

GamblingGame

You can activate or deactivate the poker game inside the games.

RaceNOSPhasing

You can turn nos use on or off in races.

Race30sPhasing

You can turn the 30 second phasing feature on or off in races.

RaceFullPhasing

You can turn the full phasing feature on or off in races.

HomePageSkip

You can turn the lock screen on or off every time the phone is turned on.

LiveAPPGIF

In Live Stream App, you can set the amount of donations that the post-donate celebration gif will appear from.

NewBill

You can set whether or not to use the invoice creation feature in the Business application.

NewsPerm

You need to enter the code of the jobs that will use the News application on the phone.

Squawk -> image

Allows you to turn the post image attachment feature on or off

Squawk -> video

Allows you to turn the post video attachment feature on or off

Squawk -> audio

Allows you to turn the post audio attachment feature on or off

Squawk -> poll

Allows you to turn the post poll attachment feature on or off

Squawk -> emoji

Allows you to turn the post emoji attachment feature on or off

Squawk -> CharacterLimit

Allows you to set the post character limit in a post

Squawk -> verify

Allows you to turn the Verify Subscription feature off and on

What are the registercommands on the phone?

RegistercommandFunction

/answer

You can answer a call with this command.

/endcall

You can end a call with this command.

/911e dispatchmessage

You can dispatch emergency units with this command.

/911p dispatchmessage

You can dispatch police units with this command.

/raceauth id true/false

You can authorize a player to create a racemap with this command.

/twitterverify (true/false) username)

You can add a blue tick to a player's Twitter account with this command.

/instagramverify (true/false) username

You can add a blue tick to a player's Instagram account with this command.

/charge id percentage

You can set the percentage of a player's phone charge.

/endcharge

You can stop the charging process with this command.

/telfix

If a player is having trouble with their phone information, they can use this command.

/deletecharge

Before restarting the phone, you can delete the charging stations on a player basis using this command. (So that you can't get crash)

/logi

You can log out of your Instagram account with this command.

/logt

You can log out of your Twitter account with this command.

/logti

You can log out of your Tinder account with this command.

/blockAdd

You can turn send posting off and on in the Advertising app with this command.

/blocktwitter

You can turn send posting off and on in the Squawk app with this command.

/blockSnapgram

You can turn send posting off and on in the SnapGram app with this command.

/phonenumberchange (id) (newnumber)

With this command, you can change the number of the player in the ID you entered. The player must log out of the server completely for the number change to take effect (logout isn't enough!)

/bantwitter true/false username

Allows you to ban a squawk(twitter) user. Banned person can't use the app.

I forgot password, what should I do?

The person who forgets the password should delete the following file on his own computer.

Mouse stuck in the middle while using the phone. How can I fix?

Mouse Input Method : DirectInput should be set from in-game settings, Keyboard / Mouse category.

How to fix license error or config.json file?

Check your config.json file. There may be a mistake. You can repair or see your error on this page. https://jsonformatter.curiousconcept.com/

How to add image of items in Gotur and Ebay app

You need to add images of items to gks_gotur and gks_ebay/img folder.

How to change the phone numbers to be created?

File location: gksphone/server/serverAPI/serverAPI.lua

Find "GetPhoneRandomNumber" line in serverAPI.lua

You can reduce or shorten the number length by changing the numbers in random.

%07d => here replace digits based on number length

function GetPhoneRandomNumber()
  local numBase = math.random(1000000, 9999999) --Returns a number between 1000000 and 9999999.
  local num = string.format("%07d", numBase) 
  return num
end

--OUTPUT EXAMPLE: "1523657"

If you want to add a specific number to the beginning of the number

I added "05" to the beginning of the number as in the example below

function GetPhoneRandomNumber()
  local numBase = math.random(1000000, 9999999) --Returns a number between 1000000 and 9999999.
  local num = "05" ..string.format("%07d", numBase) -- %07d (only 7 numbers)
  return num
end

--OUTPUT EXAMPLE: "051523657"

If you want to put "-" sign between phone number, check below example

function GetPhoneRandomNumber()
  local numBase = math.random(1000, 9999) --Returns a number between 1000 and 9999.
  local numBase2 = math.random(0, 9999) --Returns a number between 0 and 9999.
  local num = string.format("%04d-%04d", numBase, numBase2) 
  return num
end

--OUTPUT EXAMPLE: "1567-1453"

How can I charge phone?

If you don't want to use the charging system on your phone, change the ChargeOn = true line to false in gksphone/charge/config.lua.

You can charge it in 2 ways using the charging system of our phone.

  • You can charge it with the powerbank item,

  • You can charge with our normal and fast charging stations.

How do I charge with the item?

You need to add the Powerbank item to your inventory.

File location: ox_inventory > data > items.lua

['powerbank'] = {
		label = 'Power Bank',
		stack = false,
		close = true,
		weight = 10,
		client = {
			event = 'gksphone:client:powerbank'
		}
	},

You can set how many percent the powerbank item will charge in how many seconds.

How do I charge with the charging stations?

You can find the charging station in any location on the map, go to it and press the "e" button to start the charging process.

We have placed normal and fast charging stations in some parts of the map for you. But you can move them wherever you want.

You can set how many percent per second the charging stations should charge, and how much fee should a 1 percent charge charge.

How do I set the signal system on the phone?

The signal system is that phone apps become unusable in some areas of the map. Don't forget that you need the polyzone script to use this script.

You can turn off the signal system by setting false in config.lua.

You can set which apps your players can and can't use when the phone signal is cut off.

You can enter in gksphone/html/static/config/config.json and set the signal line under the applications to true or false.

GetExtendedPlayers error

add the following code to the bottom line of es_extended > server > functions.lua

function ESX.GetExtendedPlayers(key, val)
  local xPlayers = {}
  for k, v in pairs(ESX.Players) do
    if key then
      if (key == 'job' and v.job.name == val) or v[key] == val then
        xPlayers[#xPlayers + 1] = v
      end
    else
      xPlayers[#xPlayers + 1] = v
    end
  end
  return xPlayers
end

How to add phone item in ox_inventory?

Open "ox_inventory > data > items.lua" , you must add line below.

Search for phone in this file. If an item exists, replace it with the following code. If not, add it. In case of 2 phone items you will get an error.

['phone'] = {
        label = 'Phone',
        weight = 190,
        stack = false,
        consume = 0,
        client = {
            export = "gksphone.OpenPhone"
        }
},

Esx Billing

Making esx_billing compatible for the new billing system

Clean the inside of esx_billing > server > main.lua and paste the code below. save the file at the end of this process and restart the server

This billing system only works with society The code below has only been tested with ESX Legacy and oxmysql.

If your system is not suitable, configure it yourself

RegisterServerEvent('esx_billing:sendBill')
AddEventHandler('esx_billing:sendBill', function(playerId, sharedAccountName, label, amount)
	if sharedAccountName == "" or sharedAccountName == "player" then
		xPlayer.showNotification("This invoice cannot be issued")
		return
	end
	local xPlayer = ESX.GetPlayerFromId(source)
	local xTarget = ESX.GetPlayerFromId(playerId)
	local system = false
	local systemId = xPlayer.identifier
	local societyName = sharedAccountName:gsub("society_", "")
	amount = ESX.Math.Round(amount)

	if amount > 0 and xTarget and societyName then

		if source == playerId then
			system = true
		end
		local name = xPlayer.name
		if not system then
			if name == GetPlayerName(xPlayer.source) then
				name = xPlayer.get('firstName') .. ' ' .. xPlayer.get('lastName')
			end
		else
			name = "It is an invoice issued automatically by the system."
			systemId = "system"
		end

		local newBilling = exports["gksphone"]:NewBilling(playerId, label, societyName, name, systemId, amount)
		if newBilling then
			xTarget.showNotification(TranslateCap('received_invoice'))
			if not system then
				xPlayer.showNotification("Bill has been invoiced")
			end
		end
	end
end)

ESX.RegisterServerCallback('esx_billing:getBills', function(source, cb)
	local xPlayer = ESX.GetPlayerFromId(source)

	MySQL.query('SELECT amount, id, label FROM gksphone_invoices WHERE citizenid = ?', {xPlayer.identifier},
	function(result)
		cb(result)
	end)
end)

ESX.RegisterServerCallback('esx_billing:getTargetBills', function(source, cb, target)
	local xPlayer = ESX.GetPlayerFromId(target)

	if xPlayer then
		MySQL.query('SELECT amount, id, label FROM gksphone_invoices WHERE citizenid = ?', {xPlayer.identifier},
		function(result)
			cb(result)
		end)
	else
		cb({})
	end
end)

ESX.RegisterServerCallback('esx_billing:payBill', function(source, cb, billId)
	local xPlayer = ESX.GetPlayerFromId(source)

	MySQL.single('SELECT sendercitizenid, society, amount FROM gksphone_invoices WHERE id = ?', {billId},
	function(result)
		if result then
			local amount = result.amount
			local xTarget = ESX.GetPlayerFromIdentifier(result.sendercitizenid)

				TriggerEvent('esx_addonaccount:getSharedAccount', "society_"..result.society, function(account)
					if xPlayer.getMoney() >= amount then
						MySQL.update('DELETE FROM gksphone_invoices WHERE id = ?', {billId},
						function(rowsChanged)
							if rowsChanged == 1 then
								xPlayer.removeMoney(amount, "Bill Paid")
								account.addMoney(amount)

								xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount)))
								if xTarget then
									xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount)))
								end
							end

							cb()
						end)
					elseif xPlayer.getAccount('bank').money >= amount then
						MySQL.update('DELETE FROM gksphone_invoices WHERE id = ?', {billId},
						function(rowsChanged)
							if rowsChanged == 1 then
								xPlayer.removeAccountMoney('bank', amount, "Bill Paid")
								account.addMoney(amount)
								xPlayer.showNotification(TranslateCap('paid_invoice', ESX.Math.GroupDigits(amount)))

								if xTarget then
									xTarget.showNotification(TranslateCap('received_payment', ESX.Math.GroupDigits(amount)))
								end
							end

							cb()
						end)
					else
						if xTarget then
							xTarget.showNotification(TranslateCap('target_no_money'))
						end

						xPlayer.showNotification(TranslateCap('no_money'))
						cb()
					end
				end)

		end
	end)
end)

Last updated