2. Unpack the Zip File and Drag&Drop next-char-creator resource into the resources folder of your server
3. Go to you server.cfg and add the following on the bottom
start next-char-creator
2. Add the SQL
To make the char creator work you have to import the small sql file which comes with the download, called char_creator.sql into your database.
Or you just run these two lines in you database
ALTERTABLE`users`ADD`skin_created`INT(1) NOT NULLDEFAULT'0'; -- Create skin_created columnUPDATE`users`SET skin_created =2WHERE identifier IS NOT NULL-- Set every existing player to 1
3. Modify esx_skin
In order for the new players on your server to really be able to use the new char creator system, we need to make some modifications to esx_skin, which is usually responsible for skin creation.
First you need to find esx_skin in your resources folder
esx_skin in the resources folder
2. Replace code in client.lua
Open esx_skin/client/main.lua and replace the following parts.
Replace this
with this
this
with this
and this
with this
4. Restart Server
Now everything is set correctly and all you have to do is restart your server
AddEventHandler('esx_skin:playerRegistered', function()
CreateThread(function()
while not ESX.PlayerLoaded do
Wait(100)
end
if firstSpawn then
ESX.TriggerServerCallback('esx_skin:getPlayerSkin', function(skin, jobSkin)
if skin == nil then
TriggerEvent('skinchanger:loadSkin', {sex = 0}, OpenSaveableMenu)
Wait(100)
skinLoaded = true
else
TriggerEvent('skinchanger:loadSkin', skin)
Wait(100)
skinLoaded = true
end
end)
firstSpawn = false
end
end)
end)
AddEventHandler('esx_skin:playerRegistered', function()
CreateThread(function()
while not ESX.PlayerLoaded do
Wait(100)
end
if firstSpawn then
TriggerServerEvent('nextSkin:PlayerRegistered')
firstSpawn = false
end
end)
end)