HexscriptsVersion 3.0Charcreator
Configurations
Here you will get all configurations & open source files that are included within this script.
Config Files
Config = {}
Config.Debug = false -- Set to true to enable debug messages in the console
Config.Locale = 'automatic' -- automatic, en, de, es, fr, it, nl, pl, pt, tr, ar
Config.Framework = 'automatic' -- automatic, esx, qbcore, standalone
Config.FreezeCharacter = true -- Freeze the character fully while in the Charcreator UI
Config.FadeOutAnimation = true -- Fade out the screen when applying changes only works when charCreatorPosition is definied
Config.CharCreatorPosition = vector4(-811.8445, 175.1555, 76.7453, 113.2220) -- Position where the character creation takes place (vector4) or false to use current position
Config.FinishPosition = false -- Position where the player will be teleported after finishing the character creation (vector4) or false to teleport back to the original position
Config.UseDimensions = false -- Use dimensions when opening the charcreator otherwise the player gets invisible and muted in the same dimension (only works when charCreatorPosition is definied!)
--[[
to open the skinchanger menu
TriggerEvent('hex_3_charcreator:openCharCreator')
or
exports['hex_3_charcreator']:OpenCharCreator()
]]
Config.Commands = {
['skinchanger'] = {
enabled = true,
command = 'skinchanger', -- skinchanger <id>
access = {
'projektleitung',
'superadmin',
'admin',
'user'
}
}
}
Config.Selection = {
['dna'] = {
{
type = 'sex',
name = 'sex'
},
{
type = 'select',
name = 'mom'
},
{
type = 'select',
name = 'dad'
},
{
type = 'select',
name = 'grandparents'
},
{
type = 'slider',
name = 'face_md_weight'
},
{
type = 'slider',
name = 'face_g_weight'
},
{
type = 'slider',
name = 'skin_md_weight'
},
{
type = 'slider',
name = 'nose_1'
},
{
type = 'slider',
name = 'nose_2'
},
{
type = 'slider',
name = 'nose_3'
},
{
type = 'slider',
name = 'nose_4'
},
{
type = 'slider',
name = 'nose_5'
},
{
type = 'slider',
name = 'nose_6'
},
{
type = 'slider',
name = 'eyebrows_5'
},
{
type = 'slider',
name = 'eyebrows_6'
},
{
type = 'slider',
name = 'cheeks_1'
},
{
type = 'slider',
name = 'cheeks_2'
},
{
type = 'slider',
name = 'cheeks_3'
},
{
type = 'slider',
name = 'eye_squint'
},
{
type = 'slider',
name = 'lip_thickness'
},
{
type = 'slider',
name = 'jaw_1'
},
{
type = 'slider',
name = 'jaw_2'
},
{
type = 'slider',
name = 'chin_1'
},
{
type = 'slider',
name = 'chin_2'
},
{
type = 'slider',
name = 'chin_3'
},
{
type = 'slider',
name = 'chin_4'
},
{
type = 'slider',
name = 'neck_thickness'
},
{
type = 'select',
name = 'age_1'
},
{
type = 'slider',
name = 'age_2'
},
{
type = 'select',
name = 'sun_1'
},
{
type = 'slider',
name = 'sun_2'
},
{
type = 'select',
name = 'moles_1'
},
{
type = 'slider',
name = 'moles_2'
}
},
['face'] = {
{
type = 'select',
name = 'eye_color'
},
{
type = 'select',
name = 'eyebrows_1'
},
{
type = 'slider',
name = 'eyebrows_2'
},
{
type = 'color',
name = 'eyebrows_3'
},
{
type = 'select',
name = 'beard_1'
},
{
type = 'slider',
name = 'beard_2'
},
{
type = 'color',
name = 'beard_3'
},
{
type = 'select',
name = 'bodyb_1'
},
{
type = 'slider',
name = 'bodyb_2'
},
{
type = 'select',
name = 'blemishes_1'
},
{
type = 'slider',
name = 'blemishes_2'
},
{
type = 'select',
name = 'blush_1'
},
{
type = 'slider',
name = 'blush_2'
},
{
type = 'color',
name = 'blush_3'
},
{
type = 'select',
name = 'complexion_1'
},
{
type = 'slider',
name = 'complexion_2'
},
},
['outfit'] = {
{
type = 'select2',
name = 'tshirt_1',
name2 = 'tshirt_2'
},
{
type = 'select2',
name = 'torso_1',
name2 = 'torso_2'
},
{
type = 'select2',
name = 'arms',
name2 = 'arms_2',
},
{
type = 'select2',
name = 'pants_1',
name2 = 'pants_2',
},
{
type = 'select2',
name = 'shoes_1',
name2 = 'shoes_2',
},
{
type = 'select2',
name = 'bags_1',
name2 = 'bags_2',
},
{
type = 'select2',
name = 'bproof_1',
name2 = 'bproof_2',
},
},
['hair'] = {
{
type = 'select2',
name = 'hair_1',
name2 = 'hair_2'
},
{
type = 'color',
name = 'hair_color_1'
},
{
type = 'color',
name = 'hair_color_2'
},
{
type = 'select',
name = 'chest_1'
},
{
type = 'slider',
name = 'chest_2'
},
{
type = 'color',
name = 'chest_3'
}
},
['accessories'] = {
{
type = 'select2',
name = 'helmet_1',
name2 = 'helmet_2'
},
{
type = 'select2',
name = 'glasses_1',
name2 = 'glasses_2'
},
{
type = 'select2',
name = 'ears_1',
name2 = 'ears_2'
},
{
type = 'select2',
name = 'mask_1',
name2 = 'mask_2'
},
{
type = 'select2',
name = 'chain_1',
name2 = 'chain_2'
},
{
type = 'select2',
name = 'bracelets_1',
name2 = 'bracelets_2'
},
{
type = 'select2',
name = 'watches_1',
name2 = 'watches_2'
},
{
type = 'select2',
name = 'decals_1',
name2 = 'decals_2'
},
},
['makeup'] = {
{
type = 'select',
name = 'lipstick_1'
},
{
type = 'slider',
name = 'lipstick_2'
},
{
type = 'color',
name = 'lipstick_3'
},
{
type = 'select',
name = 'makeup_1'
},
{
type = 'slider',
name = 'makeup_2'
},
{
type = 'color',
name = 'makeup_3'
}
},
}Client Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
function DrawHelpNotify(message)
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HelpNotify(message)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HelpNotify(message)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HelpNotify(message)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:HelpNotify(message)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HelpNotify(message)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:HelpNotify(message)
else
SetTextComponentFormat('STRING')
AddTextComponentString(message)
DisplayHelpTextFromStringLabel(0, 0, 1, -1)
end
end
function Notify(title, message, notifyType, timeout)
if timeout == nil then timeout = 5000 end
if notifyType == nil then notifyType = 'info' end
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_1_hud') == 'started' then
exports['hex_1_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:Notify(title, message, notifyType, timeout)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:Notify(title, message, notifyType, timeout)
else
print(('Notify: %s, %s, %s, %s'):format(title, message, notifyType, timeout))
end
end
function HideHud()
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HideHud(true)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HideHud(true)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HideHud(true)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HideHud(true)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:HideHud(true)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:HideHud(true)
else
-- own implementation
end
end
function ShowHud()
if GetResourceState('hex_final_hud') == 'started' then
exports['hex_final_hud']:HideHud(false)
elseif GetResourceState('hex_2_hud') == 'started' then
exports['hex_2_hud']:HideHud(false)
elseif GetResourceState('hex_future_hud') == 'started' then
exports['hex_future_hud']:HideHud(false)
elseif GetResourceState('hex_hud_prem') == 'started' then
exports['hex_hud_prem']:HideHud(false)
elseif GetResourceState('hex_hud') == 'started' then
exports['hex_hud']:HideHud(false)
elseif GetResourceState('hex_4_hud') == 'started' then
exports['hex_4_hud']:HideHud(false)
else
-- own implementation
end
endServer Open Source Files
if Config.Framework == 'automatic' then
if GetResourceState('es_extended') == 'started' then
Config.Framework = 'esx'
elseif GetResourceState('qb-core') == 'started' then
Config.Framework = 'qbcore'
else
Config.Framework = 'standalone'
end
end
function SetPlayerDimension(playerId, dimension)
SetPlayerRoutingBucket(playerId, dimension)
end