GeN Scripts
YoutubeDiscordGithub
  • 👋Welcome!
  • Information
    • 👮‍♂️Discord Customer Role
    • ❓How can i download my script
    • 🔒Whats escrow system?
    • 😥You lack the required entitlement
  • Scripts
    • gen_spawnselector
      • Installation guide
      • Accessible files
    • gen_loading
      • Installation guide
      • Accessible files
    • gen_pausev1
      • Installation guide
      • Accessible files
    • gen_pausev2
      • Installation guide
      • Accessible files
    • gen_caseopening
      • Installation guide
      • Accessible files
      • Config adjustment
    • gen_fishing
    • gen_hud
Powered by GitBook
On this page

Was this helpful?

  1. Scripts
  2. gen_spawnselector

Accessible files

config.lua

GenScripts = {}

GenScripts.Framework = "qb" -- es_extended = "esx" - qb-core = "qb"

GenScripts.Language = "en" -- English = "en" - Turkish = "tr" - Deutsch = "de"
-- you can add another language on locales folder

GenScripts.CoreExport = function()
    if GenScripts.Framework == "esx" then
        return exports['es_extended']:getSharedObject() -- for ESX
    elseif GenScripts.Framework == "qb" then
        return exports['qb-core']:GetCoreObject() -- for QB Core
    end
end

GenScripts.SQL = "oxmysql" -- "oxmysql", "ghmattimysql", "mysql-async"

GenScripts.ServerName = "GEN" -- for ui Server Name side
 
-- for ui Menu Description side

------------------------
------ General Configs
------------------------

GenScripts.TestCommand = false -- "/spawnuitest"

GenScripts.Theme = "green" -- "green", "purple", "blue", "red"

GenScripts.ColorExport = function()
    if GenScripts.Theme == "green" then return "#24FCD6"
    elseif GenScripts.Theme == "blue" then return "#1870D8"
    elseif GenScripts.Theme == "red" then return "#D81824"
    elseif GenScripts.Theme == "purple" then return "#6F1BDB"
    end
end

GenScripts.Description = 'Lorem Ipsum is <span class="text-['..GenScripts.ColorExport()..']">simply dummy</span> text of the <span class="text-['..GenScripts.ColorExport()..']">printing</span> and typesetting industry.' 

GenScripts.WeatherSync = "qb-weathersync" -- "cd_easytime", "qb-weathersync", "vSync"
GenScripts.Weather = 'CLEAR' -- weather type

GenScripts.OnDeadOnlyLastPosition = true -- if this is true, when the person is dead, the spawn selector will force them to the last position

GenScripts.SpawnLocations = {
    [0] = {
        spawnCoords = vector4(315.3, -237.64, 53.97, 157.85),
        image = "/src/assets/image/locations/pinkcage.png",
        label = "Pinkcage Motel",
        description = "A warm place",
    },
    [1] = {
        spawnCoords = vector4(289.82, -607.32, 43.2, 57.4),
        image = "/src/assets/image/locations/pillboxhospital.png",
        label = "Pillbox Hospital",
        description = "The best hospital in Los Santos",
    },
    [2] = {
        spawnCoords = vector4(-60.01, -1113.56, 26.44, 132.66),
        image = "/src/assets/image/locations/vehicleshop.png",
        label = "Vehicle Shop",
        description = "New model vehicles are here",
    },
    [3] = {
        spawnCoords = vector4(421.77, -1019.33, 29.02, 86.45),
        image = "/src/assets/image/locations/mrpd.png",
        label = "MRPD Police",
        description = "LS Police Department",
    },
    [4] = {
        spawnCoords = vector4(39.69, -1733.91, 29.3, 15.66),
        image = "/src/assets/image/locations/megamall.png",
        label = "South Side MegaMall",
        description = "The Mall of LS",
    },
    [5] = {
        spawnCoords = vector4(1127.14, -645.29, 55.79, 281.89),
        image = "/src/assets/image/locations/mirrorpark.png",
        label = "Mirror Park",
        description = "Mirror Park Blvd",
    },
    -- you can add max 6 locations
}
server_config.lua
SteamApiKey = "CHANGE_THIS" -- https://steamcommunity.com/dev
server/database.lua
function ExecuteSql(query, parameters, cb)
    local promise = promise:new()

    if Config.SQL == "oxmysql" then
        exports.oxmysql:execute(query, parameters, function(data)
            promise:resolve(data)
            if cb then
                cb(data)
            end
        end)
    elseif Config.SQL == "ghmattimysql" then
        exports.ghmattimysql:execute(query, parameters, function(data)
            promise:resolve(data)
            if cb then
                cb(data)
            end
        end)
    elseif Config.SQL == "mysql-async" then
        MySQL.Async.fetchAll(query, parameters, function(data)
            promise:resolve(data)
            if cb then
                cb(data)
            end
        end)
    end
    return Citizen.Await(promise)
end
locales (EN/TR/DE Ready)

EN

Locales = {
    ["spawn_selector"] = "SPAWN SELECTOR",
    ["last_location"] = "LAST LOCATION",
    ["spawn"] = "SPAWN",
    ["select_spawn"] = "SELECT SPAWN LOCATION",
    ["spawn_last_location"] = "SPAWN LAST LOCATION",
    ["force_last_location"] = "You left while you were dead! Spawn just last location",
    ["choose_valid_location"] = "Please choose a valid location",
    ["error"] = "ERROR",
    ["username"] = "USERNAME",
    ["online_players"] = "ONLINE PLAYERS",

}

PreviousInstallation guideNextgen_loading

Last updated 1 year ago

Was this helpful?

Page cover image