Frequently Asked Questions (FAQ)
Frequently asked questions and answers about SW Multicharacter
1.0
How can I change spawn points?:
sw-multicharacter > config > Config.PedCoords
Config.PedCoords = vector4(-1042.14, -2745.15, 21.36, 331) -- Spawn coordinates
Config.SpawnSelector = "sw_spawn" --"sw_spawn" - "nospawnselector" - "qb-spawn"
- You can set spawn coordinates directly by changing the
Config.PedCoordsvalue - Three different spawn systems are supported: "sw_spawn", "nospawnselector" and "qb-spawn"
- If the
SpawnSelectoroption is set to "nospawnselector", the specifiedPedCoordswill be used
1.1
How can I configure character slots?:
sw-multicharacter > config > Config.CharacterSlots
Config.CharacterSlots = {
default = {
name = "Basic User",
slots = 2
},
donator = {
name = "Donator User",
slots = 4
},
premium = {
name = "Premium User",
slots = 8
},
locked = true
}
defaultsetting: Default number of slots for all usersdonatorandpremium: Provides additional slots when matched with Discord roleslocked: When set to true, users can only use the allowed number of slots
1.2
How can I configure Discord integration?:
sw-multicharacter > config > Config.Discord
Config.Discord = {
GuildID = "123456789012345678", -- Discord server ID
BotToken = "", -- Token will be loaded from server.cfg
Roles = {
donator = "123456789012345678", -- Donator role ID
premium = "123456789012345679" -- Premium role ID
},
InviteURL = "https://discord.gg/yourserver" -- Discord invite link
}
- Set the Discord server ID, bot token, and role IDs correctly
- Make sure the bot has the necessary permissions on your server
- Role IDs must match the key names in the
Config.CharacterSlotssetting - How to get the Server Guild ID? Get Guild ID
- How to get the Server Bot Token? Get Bot Token
1.2.1
set discord_bot_token "DISCORD_BOT_TOKEN"
1.3
How can I customize starter items?:
sw-multicharacter > config > Config.StarterItems / Config.ESXStarterItems
For QBCore:
Config.StarterItems = {
['phone'] = {
amount = 1,
item = 'phone'
},
['id_card'] = {
amount = 1,
item = 'id_card'
},
['driver_license'] = {
amount = 1,
item = 'driver_license'
}
}
For ESX:
Config.ESXStarterItems = {
{item = 'phone', amount = 1},
{item = 'water', amount = 5},
{item = 'bread', amount = 5}
}
- Different starter item formats are used for each framework
- Make sure the items are defined in your inventory system
- Separate configurations should be made for QBCore and ESX
1.4
How can I add my own custom coordinates to the preview location?:
sw-multicharacter > preview > previewlocation.lua
-- Example location addition
Locations = {
["LegionSquare"] = { -- Location name, must be the same as the photo name
coords = vector4(195.55, -933.36, 30.69, 90.0), -- Coordinates (x, y, z, heading)
name = "Legion Square",
description = "City square"
},
["BeachSide"] = {
coords = vector4(-1350.21, -1123.64, 4.12, 124.0),
name = "Vespucci Beach",
description = "Beach side"
}
-- You can add your own location here
}
- You can make necessary adjustments and additions in the
previewlocation.luafile in thesw_multichar - previewfolder - The location photo must have the same name as the location (e.g., LegionSquare.jpg)
- You need to specify the correct coordinate and rotation values for each location you add
- You should add location photos to the
sw-multicharacter/html/img/locationsfolder
1.5
How can I customize the tips screen?:
sw-multicharacter > config > Config.LoadingScreen / Config.LoadingTips
Config.LoadingScreen = {
backgrounds = {
"img/tip1.jpg",
"img/tip2.jpg",
"img/tip3.jpg",
"img/tip4.jpg",
"img/tip5.jpg",
"img/tip6.jpg",
},
overlayOpacity = 0.45,
displayDuration = 5000,
cardDelay = 3500
}
Config.LoadingTips = {
{
title = "Did You Know?",
description = "You can earn extra money by working as a taxi driver during peak hours."
},
{
title = "Roleplay Tip",
description: "Take time to develop your character's backstory."
}
// Other tips...
}
backgrounds: Define the tip screen background imagesoverlayOpacity: Set the opacity of the overlay on the backgrounddisplayDuration: Display duration for each tip (ms)LoadingTips: Specify a title and description for each tip
1.6
How can I disable the character deletion feature?:
sw-multicharacter > config > Config.EnableDeleteButton
Config.EnableDeleteButton = true -- True: Delete Button Active, False: Delete Button Disabled
- You can completely disable the character deletion button with the
Config.EnableDeleteButton = falsesetting - This setting helps prevent players from accidentally deleting their characters
- Note: Character deletion cannot be undone
1.7
What are the common troubleshooting steps?:
Discord Integration Issue:
- Check that the bot token is correct
- Make sure the bot has the necessary permissions on your server
- Verify from the Discord Developer Portal that the bot is online
Character Creation Error:
- Make sure your framework selection (ESX/QBCore) is set correctly in the config.lua file
- Check that SQL tables are created correctly
- Restart your server and check for script errors
Screen Display Issues:
- Make sure the UI files are complete
- Check for JavaScript errors in the browser console