GKSHOP
Web StoreDiscord
  • 👋GKSHOP Documentation
  • INFORMATION
    • ⁉️FAQ
    • 💡Discord Roles
    • ⚠️FiveM Asset Escrow System
  • GKSPHONE v2
    • 📔Installation
    • ❓Documentation
    • 👷Exports
      • Client
      • Server
    • 🪛Custom App
    • Configuration
      • Unique phones
      • Custom inventory
      • Custom Wallpapers
      • Custom ringtones and notifications
      • Apps
      • Currency
    • Common Issues
    • 🚒Job Center
  • GKSPHONE v1
    • 📱ESX
      • 📔Installation
      • ❓Documentation
      • Application Usages
      • Developers
        • Server Event
        • Client Event
    • 📱QB
      • 📔Installation
      • ❓Documentation
      • Application Usages
      • Developers
        • Server Event
        • Client Event
  • Other Products
    • ⚒️GKSCRAFT
      • 📘Installation
      • Config
      • Developers
        • Server Event
    • ⛽GKS FUEL
      • 📔Installation
      • Config
      • Exports
    • 📸Media Services (GKSMEDIA)
    • 📲GKSPHONE Real App
  • OTHER
    • Policy
      • Privacy Policy
Powered by GitBook
On this page
  • Adding stock market coins
  • Remove coins from stock market
  • Find player id from phone number
  • Find phone number with source
  • How to use phone notification?
  • Send Mail
  • Send Offline Mail
  • Specific Number
  • New Billing
  • Changing Phone Number
  1. GKSPHONE v1
  2. ESX
  3. Developers

Server Event

You will find server events of our phone that you can use in this page.

Adding stock market coins

source : Player ID coinid : In gksphone\config.lua there is a coinid in "Config.Crytos". amount : Coin amount

local cryptoadd = exports["gksphone"]:cryptoadd(source, coinid, amount)
print(cryptoadd) => as true or false

Remove coins from stock market

source : Player ID coinid : In gksphone\config.lua there is a coinid in "Config.Crytos". amount : Coin amount

local cryptoremove = exports["gksphone"]:cryptoremove(source, coinid, amount)
print(cryptoremove) => as true or false

Find player id from phone number

local FindSource = exports["gksphone"]:GetSourceByPhone("PhoneNumber")
print(FindSource)

Find phone number with source

-- src => Player's ID
local src = source
local FindPhoneNumber = exports["gksphone"]:GetPhoneBySource(src)
print(FindPhoneNumber)

How to use phone notification?

title : Notification title message : Notification message img : You can use icons from the phone or use .png or .jpg in a photo duration : To set how long the notification stays (You must type the millisecond value) - default duration 5000

-- src => Player's ID
local src = source
local NotifData = {
    title = "Notification header", 
    message = "Notification Message", 
    img    = '/html/static/img/icons/messages.png', 
    duration = 5000
}
exports["gksphone"]:SendNotification(src, NotifData)

If you want a button with notification

buttonactive : Set to true to enable button button : buttonEvent : Which client will be triggered button : buttonData : data to add to button

-- src => Player's ID
local src = source
local NotifData = {
    title = "Notification header", 
    message = "Notification Message", 
    img= '/html/static/img/icons/messages.png', 
    duration = 5000,
    buttonactive = true, 
    button = {
        buttonEvent = "clientevent", 
        buttonData = "Test"
    }
}
exports["gksphone"]:SendNotification(src, NotifData)

Send Mail

-- src => Player's ID
local src = source
local MailData = {
  sender = 'GKSHOP',
  image = '/html/static/img/icons/mail.png',
  subject = "GKSPHONE",
  message = 'TEST'
}
exports["gksphone"]:SendNewMail(src, MailData)

Send Offline Mail

-- PlayerId => ESX Identifier
local PlayerId = source
local MailData = {
  sender = 'GKSHOP',
  image = '/html/static/img/icons/mail.png',
  subject = "GKSPHONE",
  message = 'TEST'
}
exports["gksphone"]:SendNewMailOffline(PlayerId, MailData)

Specific Number

This function is an event that works for the phone numbers you specify "Config.SpecificNumber" in config.lua.

RegisterNetEvent('gksphone:server:specificNumber', function(source, phoneNumber)
    ---- You can add the function you want to do to this part
end)

New Billing

-- src => Player's ID
-- label => Billing description
-- society => By which job the billingwas created
-- senderBilling => Who is the person sending the billing?
-- senderID => ESX Identifier of the billing originator
-- amount => Billing price
local src = source
local label = "Excessive Speed"
local society = "police"
local senderBilling = "GKSHOP XENKNIGHT"  -- Player Name
local senderID = "char1:4b110a7811" -- xPlayer.identifier
local amount = 500
exports["gksphone"]:NewBilling(src, label, society, senderBilling, senderID, amount)

Changing Phone Number

Changing the player's phone number

-- src => Player's ID
-- newNumber => new phone number (phone number must be string)
local src = source
local newNumber = "5555555"
exports["gksphone"]:NumberChange(src, newNumber)

PreviousDevelopersNextClient Event

Last updated 1 year ago

📱