Page cover image

Installation

1. Log in to your keymaster account

Connect via this site: https://keymaster.fivem.net/ with your CFX account to which your purchase was made on the store https://www.var-fivem.com/

2. Download resource

Go to the Granted Assets category and download the most recent version of the Creator

3. Edit the scripts to align with the standard core resources

@esx_skin

If you not using multicharacter and using esx_skin you need change this

  • Open @esx_skin/client/main.lua

  • Replace TriggerEvent("skinchanger:loadSkin", { sex = 0 }, OpenSaveableMenu) with TriggerEvent('Creator:Init')

@esx_identity

  • Perform the same modification in @esx_identity/server/main.lua

  • Locate the lines TriggerClientEvent("esx_identity:showRegisterIdentity", xPlayer.source) and replace it with TriggerClientEvent('Creator:Init', xPlayer.source)

@esx_multicharacter

If you using multicharacter you need to change only this

  1. Open @esx_multicharacter/client/main.lua

  2. Search esx:playerLoaded event and replace it with the code below

  3. Search all trigger TriggerEvent("esx_identity:showRegisterIdentity")

  4. Replace it by TriggerEvent("Creator:Init")

RegisterNetEvent('esx:playerLoaded')
AddEventHandler('esx:playerLoaded', function(playerData, isNew, skin)
	local spawn = playerData.coords or Config.Spawn
	if isNew or not skin or #skin == 1 then
		skin = Config.Default[playerData.sex]
		skin.sex = playerData.sex == "m" and 0 or 1
		local model = skin.sex == 0 and mp_m_freemode_01 or mp_f_freemode_01
		RequestModel(model)
		while not HasModelLoaded(model) do
			RequestModel(model)
			Wait(0)
		end
		SetPlayerModel(PlayerId(), model)
		ResetEntityAlpha(PlayerPedId())
		SetModelAsNoLongerNeeded(model)
		TriggerEvent('skinchanger:loadSkin', skin, function()
			ResetEntityAlpha(PlayerPedId())
			SetPedAoBlobRendering(PlayerPedId(), true)
			TriggerEvent("Creator:Init")
		end)
	end
	if not isNew then
		DoScreenFadeOut(100)
	end
	SetCamActive(cam, false)
	RenderScriptCams(false, false, 0, true, true)
	cam = nil
	SetEntityCoordsNoOffset(PlayerPedId(), spawn.x, spawn.y, spawn.z, false, false, false, true)
	SetEntityHeading(PlayerPedId(), spawn.heading)
	if not isNew then 
		TriggerEvent('skinchanger:loadSkin', skin or Characters[spawned].skin) 
		Wait(400)
		DoScreenFadeIn(400)
		repeat Wait(200) until not IsScreenFadedOut()
	end
	TriggerServerEvent('esx:onPlayerSpawn')
	TriggerEvent('esx:onPlayerSpawn')
	TriggerEvent('playerSpawned')
	TriggerEvent('esx:restoreLoadout')
	Characters, hidePlayers = {}, false
end)

4. Launch your resource

Once the download is complete, unzip the file and drag it into the resources folder of your server.

refresh
ensure Var-Creator

Last updated