Files
esx_core/readme.md
T
2021-06-05 14:22:16 +10:00

3.9 KiB

Requirements

ESX Legacy

  • Minimum commit: 89f8d87
  • Legacy is an update from v1 Final with bug fixes, optimisations and some new features

ESX Identity

  • Minimum commit: 5d28b23
  • Required for character registration

ESX Skin

  • Minimum commit: 3a81208
  • If you wish to use other resources, you will need to adjust events in multicharacter

Spawnmanager

  • Required for spawning as well as ESX Legacy

Installation

  • Modify your ESX config with Config.Multichar = true
  • Set your database name for Config.Database in server/main.lua
  • All owner and identifier columns should be set to VARCHAR(60) to ensure correct data entry
  • Add the following command to easily update all of your SQL tables
	RegisterCommand('varchar', function(source)
		if source == 0 then
			for _, itable in pairs(IdentifierTables) do
				print('Setting `'..itable.table..'` column `'..itable.column..'` to VARCHAR(60)')
				MySQL.Sync.execute("ALTER TABLE "..itable.table.." MODIFY COLUMN "..itable.column.." VARCHAR(60)", {})
			end
		end
	end, true)

Relogging

  • Modify the config with Config.Relog = true
  • Use the latest version of ESX Status
  • Add the following event to any resources that will benefit from clearing ESX.PlayerData
RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(xPlayer)
	ESX.PlayerData = xPlayer
 	ESX.PlayerLoaded = true
end)

RegisterNetEvent('esx:onPlayerLogout')
AddEventHandler('esx:onPlayerLogout', function()
	ESX.PlayerLoaded = false
	ESX.PlayerData = {}
end)
  • If you have any threads running with while true do you should change them to while ESX.PlayerLoaded do

The menu interface is esx_menu_default - you can use any version if you want a different appearance

image

Conflicts

- essentialsmode
- basic-gamemode
- fivem-maps
- cui_character

Notes

  • This resource is not compatible with ExtendedMode or previous versions of ESX
  • Legacy, skin, and identity must be updated to at least the minimum commits specified above
  • Characters are stored in the users table as char#:license - if you need to use a different identifier then you need to modify ESX itself
  • Character deletion does not require manual entries for the tables to remove
  • As characters are stored with unique identifiers, there is no excessive queries being executed

Kashacters

  • This project is forked from the kashacters multicharacter resource
  • Most of the code has been entirely rewritten
  • KASH has given permission for this resource to use his code and the addition of a license
  • The license obviously does not apply to previous versions and KASH has stated his resource is free to be used however

Notice

Copyright© 2021 Linden and KASH

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses.

Thanks to KASH, XxFri3ndlyxX, and all those who have contributed