πŸ“ƒConfig

Config = {}

-- Auto-detect framework ('auto', 'esx', 'qbcore')
Config.Framework = 'auto'

-- Localization
Config.Locale = 'en' -- 'en' or 'pt'

-- -- If true the script will create necessary database tables on resource start
Config.AutoDatabase = true

-- Debug mode
Config.Debug = false

-- Server info (footer + logo)
Config.ServerInfo = {
    name = 'm-Scripts', -- Name showing in the footer of the NUI
    maxPlayers = 48,    -- Max players showing in the footer of the NUI
    logo = 'logo.png'   -- Logo show on top of the multicharacter NUI (put your logo file in nui/logo.png) or set to false to disable
}

-- Housing system integration
Config.Housing = {
    enabled = true, -- Enable housing integration for spawn locations
    system = 'auto', -- 'auto', 'ps-housing', 'qb-houses', 'qs-housing', 'none'
    include_player_houses = true, -- Add player houses to spawn locations
    house_spawn_icon = 'fa-solid fa-home', -- Icon for house spawns
}

-- Last Location system
Config.LastLocation = {
    enabled = true, -- Enable last location spawn option
    save_on_logout = true, -- Save player position on logout/resource stop
    icon = 'fa-solid fa-map-marker-alt', -- Icon for last location spawn
}

-- Weather system during character selection
Config.Weather = {
    enabled = true, -- Enable weather control during character selection
    character_selection = 'CLEAR', -- Weather type during character selection
    time = { hour = 12, minute = 0 } -- Time during character selection
}

-- Starter Items given to new characters
Config.NewCharacter = {
    spawn_location = vec4(192.17, -931.77, 29.6, 125.5),
    starter_items = {
        { item = 'bread', amount = 5 },
        { item = 'water', amount = 5 },
        { item = 'phone', amount = 1 },
    }
}

Config.Commands = {
    logout = {
        name = 'logout',
        help = 'Force logout a player to character selection',
        restricted = 'group.admin',
        params = {
            {
                name = 'player',
                type = 'playerId',
                help = 'Player ID to logout'
            }
        }
    },
    charadmin = {
        name = 'charadmin',
        help = 'Open character administration panel',
        restricted = 'group.admin',
    },
}

-- Spawn Locations with Camera Previews
Config.SpawnLocations = {
    {
        id = 'legion',
        name = 'Legion Square',
        icon = 'fa-solid fa-landmark',
        coords = vec4(192.17, -931.77, 29.6, 125.5),
        camera = {
            coords = vec3(246.3, -954.67, 49.7),
            rotation = vec3(-10.0, 0.0, 45.0),
            fov = 50.0
        }
    },
    {
        id = 'motel',
        name = 'Motel',
        icon = 'fa-solid fa-bed',
        coords = vec4(327.56, -205.08, 53.22, 163.5),
        camera = {
            coords = vec3(336.07, -263.31, 63.12),
            rotation = vec3(-10.0, 0.0, 20.0),
            fov = 50.0
        }
    },
    {
        id = 'paleto',
        name = 'Paleto Bay',
        icon = 'fa-solid fa-mountain',
        coords = vec4(-397.12, 6053.21, 30.5, 137.86),
        camera = {
            coords = vec3(-424.42, 6024.09, 38.56),
            rotation = vec3(-10.0, 0.0, -45.0),
            fov = 50.0
        }
    },
}

-- Job Spawn Locations (shown only if character has the specific job)
Config.JobSpawnLocations = {
    enabled = true, -- Enable job-specific spawn locations
    ['police'] = {
        {
            id = 'mrpd',
            name = 'Mission Row PD',
            icon = 'fa-solid fa-shield-halved',
            coords = vec4(441.07, -982.35, 30.69, 90.0),
            camera = {
                coords = vec3(448.0, -982.0, 35.0),
                rotation = vec3(-10.0, 0.0, 270.0),
                fov = 50.0
            }
        },
        {
            id = 'vespucci_pd',
            name = 'Vespucci PD',
            icon = 'fa-solid fa-shield-halved',
            coords = vec4(-1096.35, -834.66, 19.00, 127.0),
            camera = {
                coords = vec3(-1090.0, -838.0, 22.0),
                rotation = vec3(-10.0, 0.0, 300.0),
                fov = 50.0
            }
        },
        {
            id = 'paleto_pd',
            name = 'Paleto Bay PD',
            icon = 'fa-solid fa-shield-halved',
            coords = vec4(-448.56, 6012.03, 31.72, 315.0),
            camera = {
                coords = vec3(-443.0, 6007.0, 34.0),
                rotation = vec3(-10.0, 0.0, 135.0),
                fov = 50.0
            }
        }
    },
    ['ambulance'] = {
        {
            id = 'pillbox',
            name = 'Pillbox Hospital',
            icon = 'fa-solid fa-hospital',
            coords = vec4(298.93, -584.61, 43.26, 70.0),
            camera = {
                coords = vec3(305.0, -585.0, 47.0),
                rotation = vec3(-10.0, 0.0, 250.0),
                fov = 50.0
            }
        },
        {
            id = 'sandy_medical',
            name = 'Sandy Shores Medical',
            icon = 'fa-solid fa-hospital',
            coords = vec4(1839.57, 3672.90, 34.28, 210.0),
            camera = {
                coords = vec3(1835.0, 3677.0, 37.0),
                rotation = vec3(-10.0, 0.0, 30.0),
                fov = 50.0
            }
        },
        {
            id = 'paleto_medical',
            name = 'Paleto Bay Medical',
            icon = 'fa-solid fa-hospital',
            coords = vec4(-254.88, 6324.50, 32.43, 315.0),
            camera = {
                coords = vec3(-250.0, 6320.0, 35.0),
                rotation = vec3(-10.0, 0.0, 135.0),
                fov = 50.0
            }
        }
    },
    ['mechanic'] = {
        {
            id = 'bennys',
            name = 'Benny\'s Garage',
            icon = 'fa-solid fa-wrench',
            coords = vec4(-212.13, -1325.03, 30.89, 270.0),
            camera = {
                coords = vec3(-205.0, -1325.0, 34.0),
                rotation = vec3(-10.0, 0.0, 90.0),
                fov = 50.0
            }
        },
        {
            id = 'ls_customs',
            name = 'LS Customs',
            icon = 'fa-solid fa-wrench',
            coords = vec4(-337.85, -136.84, 39.01, 160.0),
            camera = {
                coords = vec3(-334.0, -142.0, 42.0),
                rotation = vec3(-10.0, 0.0, 340.0),
                fov = 50.0
            }
        }
    },
    ['taxi'] = {
        {
            id = 'taxi_depot',
            name = 'Taxi Depot',
            icon = 'fa-solid fa-taxi',
            coords = vec4(895.26, -179.19, 74.70, 240.0),
            camera = {
                coords = vec3(900.0, -175.0, 77.0),
                rotation = vec3(-10.0, 0.0, 60.0),
                fov = 50.0
            }
        }
    },
}

Config.Multicharacter = {
    max_slots = 4,  -- Default max slots per player
    max_dob = 2005, -- Default max year of birth
    min_dob = 1970, -- Default min year of birth
    max_name_length = 25, -- Default max first/last name length
    min_name_length = 3, -- Default min first/last name length
    max_lastname_length = 25, -- Default max last name length
    min_lastname_length = 3, -- Default min last name length
    allow_delete = true, -- Allow deleting characters from the menu (global toggle)
    delete_whitelist = {
        -- Examples (strings):
        -- 'license:11000010abcdef01',
        -- '11000010abcdef01',
        -- 'char1:license:11000010abcdef01',
        -- 'ABC12345', -- citizenid or any custom id you use
    },
    custom_slots = {
        -- Example configurations:
        -- [1] = {
        --     id = 'license2:110000100b313ff', -- Player's license identifier
        --     slots = 6, -- Total slots for this player
        -- },
        -- [2] = {
        --     id = 'ABC12345', -- Or player's citizenid
        --     slots = 8, -- Total slots for this player
        -- },
    }
}

-- Character Selection Scene - 4 slots with different vehicles and positions
Config.CharacterSelection = {
    -- Slot 1
    {
        dict = 'amb@world_human_leaning@female@wall@back@holding_elbow@idle_a',
        anim = 'idle_a',
        vehicle = 't20',
        location = vec4(-10.78, -1061.12, 37.15, 287.34),
        vehiclelocation = vec4(-11.9, -1062.06, 36.73, 250.02),
        camlocation = vec4(-7.50, -1060.14, 37.50, 117.97),
        camrotation = vec4(10.0, 10.0, 125.0, 0.0),
        fov = 40.0,
    },
    -- Slot 2
    {
        dict = 'amb@world_human_leaning@female@wall@back@holding_elbow@idle_a',
        anim = 'idle_a',
        vehicle = 'zentorno',
        location = vec4(-10.78, -1061.12, 37.15, 287.34),
        vehiclelocation = vec4(-11.9, -1062.06, 36.73, 250.02),
        camlocation = vec4(-7.50, -1060.14, 37.50, 117.97),
        camrotation = vec4(10.0, 10.0, 125.0, 0.0),
        fov = 40.0,
    },
    -- Slot 3
    {
        dict = 'amb@world_human_leaning@female@wall@back@holding_elbow@idle_a',
        anim = 'idle_a',
        vehicle = 'turismor',
        location = vec4(-10.78, -1061.12, 37.15, 287.34),
        vehiclelocation = vec4(-11.9, -1062.06, 36.73, 250.02),
        camlocation = vec4(-7.50, -1060.14, 37.50, 117.97),
        camrotation = vec4(10.0, 10.0, 125.0, 0.0),
        fov = 40.0,
    },
    -- Slot 4
    {
        dict = 'amb@world_human_leaning@female@wall@back@holding_elbow@idle_a',
        anim = 'idle_a',
        vehicle = 'osiris',
        location = vec4(-10.78, -1061.12, 37.15, 287.34),
        vehiclelocation = vec4(-11.9, -1062.06, 36.73, 250.02),
        camlocation = vec4(-7.50, -1060.14, 37.50, 117.97),
        camrotation = vec4(10.0, 10.0, 125.0, 0.0),
        fov = 40.0,
    }
}

-- World Countries for nationality selection
Config.WorldCountries = {
    'Afghanistan', 'Albania', 'Algeria', 'Andorra', 'Angola', 'Antigua and Barbuda',
    'Argentina', 'Armenia', 'Australia', 'Austria', 'Azerbaijan', 'Bahamas',
    'Bahrain', 'Bangladesh', 'Barbados', 'Belarus', 'Belgium', 'Belize',
    'Benin', 'Bhutan', 'Bolivia', 'Bosnia and Herzegovina', 'Botswana', 'Brazil',
    'Brunei', 'Bulgaria', 'Burkina Faso', 'Burundi', 'Cabo Verde', 'Cambodia',
    'Cameroon', 'Canada', 'Central African Republic', 'Chad', 'Chile', 'China',
    'Colombia', 'Comoros', 'Congo', 'Costa Rica', 'Croatia', 'Cuba',
    'Cyprus', 'Czech Republic', 'Denmark', 'Djibouti', 'Dominica', 'Dominican Republic',
    'Ecuador', 'Egypt', 'El Salvador', 'Equatorial Guinea', 'Eritrea', 'Estonia',
    'Eswatini', 'Ethiopia', 'Fiji', 'Finland', 'France', 'Gabon',
    'Gambia', 'Georgia', 'Germany', 'Ghana', 'Greece', 'Grenada',
    'Guatemala', 'Guinea', 'Guinea-Bissau', 'Guyana', 'Haiti', 'Honduras',
    'Hungary', 'Iceland', 'India', 'Indonesia', 'Iran', 'Iraq',
    'Ireland', 'Israel', 'Italy', 'Jamaica', 'Japan', 'Jordan',
    'Kazakhstan', 'Kenya', 'Kiribati', 'Kuwait', 'Kyrgyzstan', 'Laos',
    'Latvia', 'Lebanon', 'Lesotho', 'Liberia', 'Libya', 'Liechtenstein',
    'Lithuania', 'Luxembourg', 'Madagascar', 'Malawi', 'Malaysia', 'Maldives',
    'Mali', 'Malta', 'Marshall Islands', 'Mauritania', 'Mauritius', 'Mexico',
    'Micronesia', 'Moldova', 'Monaco', 'Mongolia', 'Montenegro', 'Morocco',
    'Mozambique', 'Myanmar', 'Namibia', 'Nauru', 'Nepal', 'Netherlands',
    'New Zealand', 'Nicaragua', 'Niger', 'Nigeria', 'North Korea', 'North Macedonia',
    'Norway', 'Oman', 'Pakistan', 'Palau', 'Palestine', 'Panama',
    'Papua New Guinea', 'Paraguay', 'Peru', 'Philippines', 'Poland', 'Portugal',
    'Qatar', 'Romania', 'Russia', 'Rwanda', 'Saint Kitts and Nevis', 'Saint Lucia',
    'Saint Vincent and the Grenadines', 'Samoa', 'San Marino', 'Sao Tome and Principe',
    'Saudi Arabia', 'Senegal', 'Serbia', 'Seychelles', 'Sierra Leone', 'Singapore',
    'Slovakia', 'Slovenia', 'Solomon Islands', 'Somalia', 'South Africa', 'South Korea',
    'South Sudan', 'Spain', 'Sri Lanka', 'Sudan', 'Suriname', 'Sweden',
    'Switzerland', 'Syria', 'Taiwan', 'Tajikistan', 'Tanzania', 'Thailand',
    'Timor-Leste', 'Togo', 'Tonga', 'Trinidad and Tobago', 'Tunisia', 'Turkey',
    'Turkmenistan', 'Tuvalu', 'Uganda', 'Ukraine', 'United Arab Emirates', 'United Kingdom',
    'United States', 'Uruguay', 'Uzbekistan', 'Vanuatu', 'Vatican City', 'Venezuela',
    'Vietnam', 'Yemen', 'Zambia', 'Zimbabwe'
}

-- Months for date of birth selection
Config.Months = {
    {value = '01', label = 'January'},
    {value = '02', label = 'February'},
    {value = '03', label = 'March'},
    {value = '04', label = 'April'},
    {value = '05', label = 'May'},
    {value = '06', label = 'June'},
    {value = '07', label = 'July'},
    {value = '08', label = 'August'},
    {value = '09', label = 'September'},
    {value = '10', label = 'October'},
    {value = '11', label = 'November'},
    {value = '12', label = 'December'}
}

-- Clock and date configuration
Config.DateTime = {
    days = {'Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'},
    months = {'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'}
} 

-- Tips shown on the left panel (rotates every 15 seconds)
Config.Tips = {
    "Explore the city and discover hidden locations",
    "Respect others to build a better community",
    "Use /help to see available commands",
    "Always check your surroundings before acting",
    "Roleplay realistically for the best experience",
    "Read the server rules to avoid issues",
    "Report bugs to help improve the server",
    "Make friends and create your own story",
    "Your choices matter - think before you act",
    "Join a job to start earning money",
    "Visit businesses to discover new opportunities",
    "Customize your character appearance anytime",
    "Participate in server events for rewards",
    "Drive safely and follow traffic rules",
    "Build relationships to unlock new storylines"
}

Config.BlacklistedNames = {
    'admin', 'administrator', 'mod', 'moderator', 'staff',
    'owner', 'founder', 'ceo', 'dev', 'developer',
    'test', 'tester', 'support', 'helper', 'gm',
    'game master', 'system', 'server', 'script',
    'null', 'undefined', 'void', 'voided', 'player',
    'user', 'name', 'character', 'guest'
}


-- Dont edit below this line
Locales = {}

LoadLocale(Config.Locale)

function _(key, ...)
    local text = Locales[key] or key
    if ... then
        return string.format(text, ...)
    end
    return text
end

Last updated