πŸ“”Installation

This comprehensive guide will walk you through the installation process of GKSPHONE V2. Follow each step carefully to ensure a successful installation.

Installation Video Tutorial

Step 1: File Structure Setup

Create the proper directory structure for GKSPHONE V2:

  1. Navigate to your server's resources folder

  2. Create a [phone] folder inside the resources directory

  3. Extract all files from the downloaded zip into this [phone] folder

Expected Directory Structure:

resources/
└── [phone]/
    └── gksphone/
        β”œβ”€β”€ config/
        β”œβ”€β”€ client/
        β”œβ”€β”€ server/
        └── ...
Phone folder structure
Create [phone] folder in resources

Step 2: Item Configuration

Configure phone items based on your inventory system:

Add these items to your qb-core/shared/items.lua file:

-- Phone Items
phone = {
    name = 'phone',
    label = 'Phone',
    weight = 700,
    type = 'item',
    image = 'phone.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Neat phone ya got there'
},

iphone = {
    name = 'iphone',
    label = 'iPhone',
    weight = 1000,
    type = 'item',
    image = 'iphone.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'Very expensive phone'
},

-- Powerbank Item (Optional)
powerbank = {
    name = 'powerbank',
    label = 'Powerbank',
    weight = 200,
    type = 'item',
    image = 'powerbank.png',
    unique = true,
    useable = true,
    shouldClose = true,
    combinable = nil,
    description = 'To charge the phone'
},

Step 3: Database Setup

Manual Database Setup

  1. Important: Delete all existing gksphone_* tables from your database

  2. Run the gksphone/gksphonev2.sql file in your database management tool

Database Setup Tutorial

Step 4: Framework Configuration

Supported Frameworks: ESX, QB-Core, Qbox There is also a standalone file that you can customize for your own framework.

  1. Open gksphone/config/config.lua

  2. Set Config.Framework to match your server framework:

    • "esx" for ESX

    • "qb" for QB-Core

    • "qbx" for Qbox

    • "auto" for automatic detection

Framework configuration
Configure framework in gksphone/config/config.lua

Step 5: Server Configuration

Configure your server settings in gksphone/config/serverconfig.lua:

Media Service Setup

You can use any media service you prefer. We recommend GKS Media, Fivemerr, or Fivemanage.

If you are having trouble taking a photo, you may have filled out the fields below incorrectly.

serverconfig.lua
-- Available options: "fivemanage", "fivemerr", "gksmedia", "customMedia" 
Cfg.MediaService = ""

-- Authentication tokens for your chosen service
Cfg.AuthTokenImage = ""    -- Image upload token/API key
Cfg.AuthTokenAudio = ""    -- Audio upload token/API key
Cfg.AuthTokenVideo = ""    -- Video upload token/API key

Music and PlayTube App Configuration

You must enter your GKSPHONE purchase transaction ID in Cfg.TebexTransactionID in the serverconfig.lua file. If you don't know your transaction ID, check your Tebex purchase history.

Tebex configuration
Configure Tebex ID in gksphone/config/serverconfig.lua

Application Logging Configuration

Discord Webhooks: Enter Discord webhook URLs for applications you want to log in the serverconfig.lua file.

Fivemanage Logs: Ensure fmsdk is installed for Fivemanage logging support.

Logging configuration
Configure logging in gksphone/config/serverconfig.lua

Step 6: Server Startup Configuration

Add GKSPHONE to your server.cfg file. Order is important - ensure dependencies start before the phone system:

# Core Framework (Required first)
ensure pma-voice
ensure oxmysql
ensure es_extended  # or qb-core

# Dependencies (Must start before phone)
ensure your_eyetarget
ensure your_banking
ensure your_inventory
ensure your_housing
ensure your_garages

# Other scripts can start before or after phone
ensure other_scripts

# Phone System (Start last)
ensure [phone]

Last updated