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
  • Exports
  • Send Notification
  • Send Mail
  • isPhoneOpen
  • PhoneOpen
  • PhoneClose
  • PhoneOpenBlock
  • PhoneOpenUnBlock
  • PhoneOpenBlockStatus
  • PhoneNumber
  • PhoneUniqueId
  • SendDispatch
  • GetPhoneBattery
  • SetPhoneBattery
  • SavePhoneBattery
  • ToggleCharging
  • IsPhoneBatteryDead
  • IsPhoneCharging
  1. GKSPHONE v2
  2. Exports

Client

You will find client events of our gksphonev2 that you can use in this page.

Exports

Send Notification


local NotifData = {
    title = "Notification header", -- Notification header
    message = "Notification Message", -- Notification content message
    icon    = '/html/img/icons/messages.png', -- Icon of the notification
    duration = 5000, -- specify how many seconds,
    type = "success", -- the home screen will also appear on the notification side.
    buttonactive = false, -- Activate if you want to use the button function
    button = {
       buttonEvent = "gksphone:client:Test", -- event name to use if the button approves
       buttonData = "test", -- If you want to transfer any data in the button
    }
}
exports["gksphone"]:Notification(NotifData)

Send Mail

local waitingDelivery = { location = { x = 0, y = 0, z = 0 }, name = "Test Location" }
local MailData = {
  sender = 'GKSHOP',
  image = '/html/img/icons/mail.png',
  subject = "GKSPHONE",
  message = 'TEST',
  button = {   --- If you don't want it to be a button, please remove it.
       enabled = true,
       buttonEvent = "gksphone:client:mailtest",
       buttonData = waitingDelivery,  -- data
       buttonname = "Test Button"
  }
}
exports["gksphone"]:SendNewMail(MailData)

------

RegisterNetEvent("gksphone:client:mailtest", function (data)
    debugprint("gksphone:client:mailtest")
    print(data.name)  -- Test Location
    print(data.location) -- { x = 0, y = 0, z = 0 }
end)

isPhoneOpen

local isPhoneOpen = exports["gksphone"]:isPhoneOpen()
print(isPhoneOpen) -- true / false

PhoneOpen

In order for the phone to be open, a player must first open it from the inventory.

exports["gksphone"]:PhoneOpen()

PhoneClose

exports["gksphone"]:PhoneClose()

PhoneOpenBlock

Prevent the phone from turning on

local reason = "Phone cannot be used while handcuffed"
exports["gksphone"]:PhoneOpenBlock(reason)

PhoneOpenUnBlock

If you have blocked the phone from turning on, you can activate it again with this export.

exports["gksphone"]:PhoneOpenUnBlock()

PhoneOpenBlockStatus

local status, reason = exports["gksphone"]:PhoneOpenBlockStatus()
print(status, reason) -- true/false, reason

PhoneNumber

local phoneNumber = exports["gksphone"]:PhoneNumber()
print(phoneNumber) -- nil or 5555555

PhoneUniqueId

local phoneUniqId = exports["gksphone"]:PhoneUniqueId()
print(phoneUniqId) -- GKS2222222

SendDispatch

local reportMessage = "Report Message"
local reportPhoto = "Image Link" or nil
local job = "ambulance" -- job code
local anonymous = false -- or true

exports["gksphone"]:SendDispatch(reportMessage, reportPhoto, job, anonymous)

GetPhoneBattery

local battery = exports["gksphone"]:GetPhoneBattery()
print(battery) -- The battery percentage, 0-100

SetPhoneBattery

local battery = 100 -- The battery percentage, 0-100
exports["gksphone"]:SetPhoneBattery(battery)

SavePhoneBattery

local battery = 100 -- The battery percentage, 0-100
exports["gksphone"]:SavePhoneBattery(battery)

ToggleCharging

local charging = true -- true or false
exports["gksphone"]:ToggleCharging(charging)

IsPhoneBatteryDead

local isBatteryDead = exports["gksphone"]:IsPhoneBatteryDead()
print(isBatteryDead) -- true or false / If the phone has 0% battery

IsPhoneCharging

local isCharging = exports["gksphone"]:IsPhoneCharging()
print(isCharging) -- true or false
PreviousExportsNextServer

Last updated 1 month ago

👷