esx_kasharacter

Guide how to edit rcore_identity to fit esx_kascharacter

esx_kasharacter/server/main.lua When user will try to create new character start rcore_identity

RegisterServerEvent("kashactersS:CharacterChosen")
AddEventHandler('kashactersS:CharacterChosen', function(charid, ischar)
    local src = source
    local new = true
    local spawn = {}

    SetLastCharacter(src, tonumber(charid))
    SetCharToIdentifier(GetRockstarID(src), tonumber(charid))

    if ischar == "true" then
        new = false
        spawn = GetSpawnPos(src)
        
--Spawn only when a character is created
        TriggerClientEvent("kashactersC:SpawnCharacter", src, spawn, new)
    else
        --start rcore_identity register
        TriggerClientEvent('rcore_identity:startRegistration', src)

        --Old code
    --TriggerClientEvent('skinchanger:loadDefaultModel', src, true, cb)
        --spawn = { x = 195.55, y = -933.36, z = 29.90 } -- DEFAULT SPAWN POSITION
    end
end)

rcore_identity/server/main.lua Comment sending startRegistration

Last updated

Was this helpful?