From 7a79e41e97a20ada5507e238a24a91bc5257028c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:19:02 +0200 Subject: [PATCH 01/52] Initial commit --- README.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 00000000..d61d51c1 --- /dev/null +++ b/README.md @@ -0,0 +1,2 @@ +# fxserver-skinchanger +FXServer SkinChanger From 70bf511780831b6ad5e48e7937f5ddabccdc6b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:21:32 +0200 Subject: [PATCH 02/52] Add files --- README.md | 13 +++ __resource.lua | 8 ++ client/main.lua | 217 ++++++++++++++++++++++++++++++++++++++++++++ skinchanger.net.dll | Bin 0 -> 8192 bytes 4 files changed, 238 insertions(+) create mode 100644 __resource.lua create mode 100644 client/main.lua create mode 100644 skinchanger.net.dll diff --git a/README.md b/README.md index d61d51c1..31d80153 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,15 @@ # fxserver-skinchanger FXServer SkinChanger + +[INSTALLATION] + +1) CD in your resources folder +2) Clone the repository +``` +git clone https://github.com/FXServer-ESX/fxserver-skinchanger skinchanger +``` +3) Add this in your server.cfg : + +``` +start skinchanger +``` diff --git a/__resource.lua b/__resource.lua new file mode 100644 index 00000000..430df89c --- /dev/null +++ b/__resource.lua @@ -0,0 +1,8 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + +description 'SkinChanger' + +client_scripts { + 'skinchanger.net.dll', + 'client/main.lua' +} \ No newline at end of file diff --git a/client/main.lua b/client/main.lua new file mode 100644 index 00000000..314858e0 --- /dev/null +++ b/client/main.lua @@ -0,0 +1,217 @@ +local Components = { + {label = 'Sexe', name = 'sex', value = 0}, + {label = 'Visage', name = 'face', value = 0}, + {label = 'Peau', name = 'skin', value = 0}, + {label = 'Type Barbe', name = 'beard_1', value = 0}, + {label = 'Taille barbe', name = 'beard_2', value = 0}, + {label = 'Couleur barbe 1', name = 'beard_3', value = 0}, + {label = 'Couleur barbe 2', name = 'beard_4', value = 0}, + {label = 'Cheveux 1', name = 'hair_1', value = 0}, + {label = 'Cheveux 2', name = 'hair_2', value = 0}, + {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0}, + {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0}, + {label = 'T-Shirt 1', name = 'tshirt_1', value = 0}, + {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, textureof = 'tshirt_1'}, + {label = 'Torse 1', name = 'torso_1', value = 0}, + {label = 'Torse 2', name = 'torso_2', value = 0, textureof = 'torso_1'}, + {label = 'Calques 1', name = 'decals_1', value = 0}, + {label = 'Calques 2', name = 'decals_2', value = 0, textureof = 'decals_1'}, + {label = 'Bras', name = 'arms', value = 0}, + {label = 'Jambes 1', name = 'pants_1', value = 0}, + {label = 'Jambes 2', name = 'pants_2', value = 0, textureof = 'pants_1'}, + {label = 'Chaussures 1', name = 'shoes_1', value = 0}, + {label = 'Chaussures 2', name = 'shoes_2', value = 0, textureof = 'shoes_1'}, + {label = 'Masque 1', name = 'mask_1', value = 0}, + {label = 'Masque 2', name = 'mask_2', value = 0, textureof = 'mask_1'}, + {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0}, + {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, textureof = 'bproof_1'}, + {label = 'Chaine 1', name = 'chain_1', value = 0}, + {label = 'Chaine 2', name = 'chain_2', value = 0, textureof = 'chain_1'}, + {label = 'Casque 1', name = 'helmet_1', value = 0}, + {label = 'Casque 2', name = 'helmet_2', value = 0, textureof = 'helmet_1'}, + {label = 'Lunettes 1', name = 'glasses_1', value = 0}, + {label = 'Lunettes 2', name = 'glasses_2', value = 0, textureof = 'glasses_1'}, +} + +local LastSex = 0 +local LoadSkin = nil +local LoadClothes = nil +local Character = {} + +for i=1, #Components, 1 do + Character[Components[i].name] = Components[i].value +end + +function GetMaxVals() + + local playerPed = GetPlayerPed(-1) + + local data = { + sex = 1, + face = 45, + skin = 45, + beard_1 = GetNumHeadOverlayValues(1), + beard_2 = 10, + beard_3 = 63, + beard_4 = 63, + hair_1 = GetNumberOfPedDrawableVariations(playerPed, 2) - 1, + hair_2 = GetNumberOfPedTextureVariations(playerPed, 2, Character['hair_1']) - 1, + hair_color_1 = 22, + hair_color_2 = 4, + tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, + tshirt_2 = GetNumberOfPedTextureVariations(playerPed, 8, Character['tshirt_1']) - 1, + torso_1 = GetNumberOfPedDrawableVariations(playerPed, 11) - 1, + torso_2 = GetNumberOfPedTextureVariations(playerPed, 11, Character['torso_1']) - 1, + decals_1 = GetNumberOfPedDrawableVariations(playerPed, 10) - 1, + decals_2 = GetNumberOfPedTextureVariations(playerPed, 10, Character['decals_1']) - 1, + arms = GetNumberOfPedDrawableVariations(playerPed, 3) - 1, + pants_1 = GetNumberOfPedDrawableVariations(playerPed, 4) - 1, + pants_2 = GetNumberOfPedTextureVariations(playerPed, 4, Character['pants_1']) - 1, + shoes_1 = GetNumberOfPedDrawableVariations(playerPed, 6) - 1, + shoes_2 = GetNumberOfPedTextureVariations(playerPed, 6, Character['shoes_1']) - 1, + mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, + mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, + bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, + bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, + chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, + chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, + helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, + helmet_2 = GetNumberOfPedTextureVariations(playerPed, 0, Character['helmet_1']) - 1, + glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, + glasses_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['glasses_1'] - 1), + } + + return data + +end + +function ApplySkin(skin, clothes) + + local playerPed = GetPlayerPed(-1) + + for k,v in pairs(skin) do + Character[k] = v + end + + if clothes ~= nil then + + for k,v in pairs(clothes) do + if + k ~= 'sex' and + k ~= 'face' and + k ~= 'skin' and + k ~= 'beard_1' and + k ~= 'beard_2' and + k ~= 'beard_3' and + k ~= 'beard_4' and + k ~= 'hair_1' and + k ~= 'hair_2' and + k ~= 'hair_color_1' and + k ~= 'hair_color_2' + then + Character[k] = v + end + end + + end + + SetPedHeadBlendData(playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) + SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair + SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt + SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts + SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso + SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals + SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants + SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes + SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask + SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof + SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain + SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses + +end + +AddEventHandler('skinchanger:getData', function(cb) + + local components = json.decode(json.encode(Components)) + + for k,v in pairs(Character) do + for i=1, #components, 1 do + if k == components[i].name then + components[i].value = v + end + end + end + + cb(components, GetMaxVals()) +end) + +AddEventHandler('skinchanger:change', function(key, val) + + Character[key] = val + + if key == 'sex' then + TriggerEvent('skinchanger:loadSkin', Character) + else + ApplySkin(Character) + end + +end) + +AddEventHandler('skinchanger:getSkin', function(cb) + cb(Character) +end) + +AddEventHandler('skinchanger:modelLoaded', function() + + if LoadSkin ~= nil then + + ApplySkin(LoadSkin) + LoadSkin = nil + + end + + if LoadClothes ~= nil then + + ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) + LoadClothes = nil + + end + +end) + +RegisterNetEvent('skinchanger:loadSkin') +AddEventHandler('skinchanger:loadSkin', function(skin) + + LoadSkin = skin + + if skin['sex'] == 0 then + TriggerEvent('skinchanger:LoadDefaultModel', true) + else + TriggerEvent('skinchanger:LoadDefaultModel', false) + end + + LastSex = skin['sex'] + +end) + +RegisterNetEvent('skinchanger:loadClothes') +AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) + + LoadClothes = { + playerSkin = playerSkin, + clothesSkin = clothesSkin + } + + if playerSkin['sex'] == 0 then + TriggerEvent('skinchanger:LoadDefaultModel', true) + else + TriggerEvent('skinchanger:LoadDefaultModel', false) + end + + LastSex = skin['sex'] + +end) \ No newline at end of file diff --git a/skinchanger.net.dll b/skinchanger.net.dll new file mode 100644 index 0000000000000000000000000000000000000000..315d79e572ca46eba6b42ac480c88da7ca77d449 GIT binary patch literal 8192 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 literal 0 HcmV?d00001 From d533effb9741bc0c954669036b4c3519a6d8e4e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:31:24 +0200 Subject: [PATCH 03/52] Update README.md --- README.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/README.md b/README.md index 31d80153..f09dba02 100644 --- a/README.md +++ b/README.md @@ -13,3 +13,72 @@ git clone https://github.com/FXServer-ESX/fxserver-skinchanger skinchanger ``` start skinchanger ``` + +[HOWTO] + +``` +local isMale = true + +local skin = { + sex = 1, + face = 0, + skin = 0, + beard_1 = 0, + beard_2 = 0, + beard_3 = 0, + beard_4 = 0, + hair_1 = 0, + hair_2 = 0, + hair_color_1 = 0, + hair_color_2 = 0, + tshirt_1 = 0, + tshirt_2 = 0, + torso_1 = 0, + torso_2 = 0, + decals_1 = 0, + decals_2 = 0, + arms = 0, + pants_1 = 0, + pants_2 = 0, + shoes_1 = 0, + shoes_2 = 0, + mask_1 = 0, + mask_2 = 0, + bproof_1 = 0, + bproof_2 = 0, + chain_1 = 0, + chain_2 = 0, + helmet_1 = 0, + helmet_2 = 0, + glasses_1 = 0, + glasses_2 = 0, + } +} + +-- Load freemode model +TriggerEvent('skinchanger:LoadDefaultModel', isMale) + +-- Load skin +TriggerEvent('skinchanger:loadSkin', skin) + +-- you can also load only some components : +TriggerEvent('skinchanger:loadSkin', { + beard_1 = 0, + beard_2 = 0, + } +}) + +-- Get list of components and maxVals +TriggerEvent('skinchanger:getData', function(components, maxVals) + + print('Components => ' .. json.encode(components)) + print('MaxVals => ' .. json.encode(maxVals)) + +end) + +-- Get current skin +TriggerEvent('skinchanger:getSkin', function(skin) + print(json.encode(skin)) +end) + +``` From ebecf8e0e28ce6fa9d006fdf44dd1f5b9d92f1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:32:19 +0200 Subject: [PATCH 04/52] Update README.md --- README.md | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index f09dba02..7f9e4cb0 100644 --- a/README.md +++ b/README.md @@ -42,17 +42,16 @@ local skin = { pants_2 = 0, shoes_1 = 0, shoes_2 = 0, - mask_1 = 0, - mask_2 = 0, - bproof_1 = 0, - bproof_2 = 0, - chain_1 = 0, - chain_2 = 0, + mask_1 = 0, + mask_2 = 0, + bproof_1 = 0, + bproof_2 = 0, + chain_1 = 0, + chain_2 = 0, helmet_1 = 0, helmet_2 = 0, glasses_1 = 0, glasses_2 = 0, - } } -- Load freemode model From ecc06ced9acf193d692fde4e851ad86ad9b4c2d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:32:48 +0200 Subject: [PATCH 05/52] Update README.md --- README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/README.md b/README.md index 7f9e4cb0..d9183941 100644 --- a/README.md +++ b/README.md @@ -64,15 +64,12 @@ TriggerEvent('skinchanger:loadSkin', skin) TriggerEvent('skinchanger:loadSkin', { beard_1 = 0, beard_2 = 0, - } }) -- Get list of components and maxVals TriggerEvent('skinchanger:getData', function(components, maxVals) - print('Components => ' .. json.encode(components)) print('MaxVals => ' .. json.encode(maxVals)) - end) -- Get current skin From 047f22841a6e5a1e9bca851fbc21c4d357f6f229 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 1 Aug 2017 11:39:06 +0200 Subject: [PATCH 06/52] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d9183941..9e133a9b 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ git clone https://github.com/FXServer-ESX/fxserver-skinchanger skinchanger start skinchanger ``` -[HOWTO] +[USAGE] ``` local isMale = true From de2e4b3c1717a355799e466c0a8c60b862787e66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 2 Aug 2017 00:29:02 +0200 Subject: [PATCH 07/52] Add skinchanger.net.dll source --- skinchanger_dll/.vs/skinchanger/v15/.suo | Bin 0 -> 43520 bytes skinchanger_dll/skinchanger.sln | 22 +++++++ .../skinchanger/Properties/AssemblyInfo.cs | 36 +++++++++++ .../obj/Debug/CoreCompileInputs.cache | 1 + ...gnTimeResolveAssemblyReferencesInput.cache | Bin 0 -> 6820 bytes ...le_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs | 0 ...le_5937a670-0e60-4077-877b-f7221da3dda1.cs | 0 ...le_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs | 0 skinchanger_dll/skinchanger/skinchanger.cs | 58 ++++++++++++++++++ .../skinchanger/skinchanger.csproj | 51 +++++++++++++++ .../skinchanger/skinchanger.csproj.user | 6 ++ 11 files changed, 174 insertions(+) create mode 100644 skinchanger_dll/.vs/skinchanger/v15/.suo create mode 100644 skinchanger_dll/skinchanger.sln create mode 100644 skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs create mode 100644 skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache create mode 100644 skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache create mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs create mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs create mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs create mode 100644 skinchanger_dll/skinchanger/skinchanger.cs create mode 100644 skinchanger_dll/skinchanger/skinchanger.csproj create mode 100644 skinchanger_dll/skinchanger/skinchanger.csproj.user diff --git a/skinchanger_dll/.vs/skinchanger/v15/.suo b/skinchanger_dll/.vs/skinchanger/v15/.suo new file mode 100644 index 0000000000000000000000000000000000000000..267f914db4066b1f4ab1b64aa492387b57a627d2 GIT binary patch literal 43520 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 UrB58~-p+O2@7{#juae>ZA3D9w2mk;8 literal 0 HcmV?d00001 diff --git a/skinchanger_dll/skinchanger.sln b/skinchanger_dll/skinchanger.sln new file mode 100644 index 00000000..edb4061d --- /dev/null +++ b/skinchanger_dll/skinchanger.sln @@ -0,0 +1,22 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.26403.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skinchanger", "skinchanger\skinchanger.csproj", "{0B36C12C-4C7A-4C24-B204-161034340C8A}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {0B36C12C-4C7A-4C24-B204-161034340C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0B36C12C-4C7A-4C24-B204-161034340C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0B36C12C-4C7A-4C24-B204-161034340C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0B36C12C-4C7A-4C24-B204-161034340C8A}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs b/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs new file mode 100644 index 00000000..29ce8cfb --- /dev/null +++ b/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Les informations générales relatives à un assembly dépendent de +// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations +// associées à un assembly. +[assembly: AssemblyTitle("es_skinchanger")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("es_skinchanger")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly +// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de +// COM, affectez la valeur true à l'attribut ComVisible sur ce type. +[assembly: ComVisible(false)] + +// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM +[assembly: Guid("0b36c12c-4c7a-4c24-b204-161034340c8a")] + +// Les informations de version pour un assembly se composent des quatre valeurs suivantes : +// +// Version principale +// Version secondaire +// Numéro de build +// Révision +// +// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut +// en utilisant '*', comme indiqué ci-dessous : +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache b/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache new file mode 100644 index 00000000..172d913a --- /dev/null +++ b/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache @@ -0,0 +1 @@ +001bf808026bfc7fe5228d45535464d5f6b2318e diff --git a/skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache new file mode 100644 index 0000000000000000000000000000000000000000..f2235478b7f3ddf9a107c8e98745a9015695e83e GIT binary patch literal 6820 zcmeHMZByGu5Vms-}KxVK;gXMwiHU# zwE3Q^fVpKII9!-{;d#PeFRW!V??Eaq{FRw`Ge>{fOg?aRAYsLaKuhLkGn+xx<@T>| zR1tgNuT*ohwfWjYZDz)q&#_rHOez;Yqv@A`yAJ7F_cch-{2*Dg3DPVvx$ZXut?uIB zyUcaP0XVBlfmd~p)($oJG%GcRz4OAa@p_TFFkv&_;SST#=}EO}x)!)@Q8Et>gxu>i zRah0<#?Q1Bh3lZb52&)jWF2%gtQ=Go=nVu>k9ge|5(-db=!$h;X`J8b>{`H2zuc(> z*XnwQUk-8qLVfqBjEiWbw+3!XVS`da zuHx*uMw>9?+C#u81-|AUw1=EWYI#Xb1`0}00|`Dt6{YYH^b;c8l%3kpEyjQ`Xc&pa zAj*McGHKukWn$pZ;qsBv;9+>;`r4WT&U^_zNN$_2(ODm7wzt2~1$V@I<_56IxcvA$ z>RQ&4`}J(bQ?`&Uub%F)x&OVz78cmNJ^x~6X?6~Bi%UD%FU{kMPPG?)*ooJzR~#;x z?1yMCqA1!;y#T-BF%|O$>IY~qVyGXWalJTqlEi~kgD6H*LsT3lfpj2|x`qP3Mo6Sc zjFPyHV$`^SGGUCNC>)pC%xSrdMEZb9up+W+nHy`Bh(l)g=gfKYdA37A+jMj7@Wi-@ zNQZ@Gs{s4p3Z%du_}VJ+eRyNlPD{)u4`2AqlM@ zQ7VBF?ta9IPg#*^GrIw)ugI8NDDIt|Z-@N1=53_0$2j%KL?&fIi;UX@(C+m$mWMpW zU1JvvU6+WWx-l)HVaHM>$R|%+xAoFEfa49md!Q)1ANPN<#P)umW8(&Vc}G*e5<9n zg``eGsBa3ve~Se?T6QyEZZO#l;inOvAv}`LI^IDt;guxw_;B&X6DwMXOgkiyws!?j ze2el|hTi@1+_@ngONZSRbX zq`t>fuk)mdUQ$-nc!c6zPhJ>lVy~f&AFwb~#EfQ=m~2RIyC;(*YI~tJO}vYqH1S=+ zGJZrcd7QsA#d=~q#@4l1-WkRdgt~qFiu;=KbCkGS$9;HWJjME{0ZT>lq?4cX8D literal 0 HcmV?d00001 diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs new file mode 100644 index 00000000..e69de29b diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs new file mode 100644 index 00000000..e69de29b diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs new file mode 100644 index 00000000..e69de29b diff --git a/skinchanger_dll/skinchanger/skinchanger.cs b/skinchanger_dll/skinchanger/skinchanger.cs new file mode 100644 index 00000000..1276ba24 --- /dev/null +++ b/skinchanger_dll/skinchanger/skinchanger.cs @@ -0,0 +1,58 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using CitizenFX.Core; +using CitizenFX.Core.UI; +using CitizenFX.Core.Native; + +namespace skinchanger +{ + public class Main : BaseScript + { + public Main() + { + Tick += OnTick; + + EventHandlers["skinchanger:LoadDefaultModel"] += new Action(async (dynamic LoadMale) => + { + await LoadDefaultModel((bool) LoadMale); + + TriggerEvent("skinchanger:modelLoaded"); + }); + + } + + public async Task LoadDefaultModel(bool LoadMale) + { + + PedHash CharacterModel; + + if (LoadMale) + CharacterModel = PedHash.FreemodeMale01; + else + CharacterModel = PedHash.FreemodeFemale01; + + Model characterModel = new Model(CharacterModel); + + characterModel.Request(500); + + if (characterModel.IsInCdImage && characterModel.IsValid) + { + while (!characterModel.IsLoaded) + await BaseScript.Delay(0); + + Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, characterModel.Hash); + Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, Game.Player.Character.Handle); + } + + characterModel.MarkAsNoLongerNeeded(); + } + + public async Task OnTick() + { + + } + } +} diff --git a/skinchanger_dll/skinchanger/skinchanger.csproj b/skinchanger_dll/skinchanger/skinchanger.csproj new file mode 100644 index 00000000..d2c9d418 --- /dev/null +++ b/skinchanger_dll/skinchanger/skinchanger.csproj @@ -0,0 +1,51 @@ + + + + + Debug + AnyCPU + {0B36C12C-4C7A-4C24-B204-161034340C8A} + Library + Properties + skinchanger + skinchanger.net + v4.5.2 + 512 + + + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + copy /y "$(TargetPath)" "C:\Users\NGD\Desktop\cfx-server\resources\skinchanger" + + \ No newline at end of file diff --git a/skinchanger_dll/skinchanger/skinchanger.csproj.user b/skinchanger_dll/skinchanger/skinchanger.csproj.user new file mode 100644 index 00000000..e997092b --- /dev/null +++ b/skinchanger_dll/skinchanger/skinchanger.csproj.user @@ -0,0 +1,6 @@ + + + + C:\Users\NGD\AppData\Local\FiveM\FiveM.app\citizen\clr2\lib\mono\4.5\ + + \ No newline at end of file From eb2e22349f5a33ea8377a324eebeb400196b2ab4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 2 Aug 2017 00:29:41 +0200 Subject: [PATCH 08/52] Delete obj folder --- .../obj/Debug/CoreCompileInputs.cache | 1 - ...esignTimeResolveAssemblyReferencesInput.cache | Bin 6820 -> 0 bytes ...dFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs | 0 ...dFile_5937a670-0e60-4077-877b-f7221da3dda1.cs | 0 ...dFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs | 0 5 files changed, 1 deletion(-) delete mode 100644 skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache delete mode 100644 skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache delete mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs delete mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs delete mode 100644 skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs diff --git a/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache b/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache deleted file mode 100644 index 172d913a..00000000 --- a/skinchanger_dll/skinchanger/obj/Debug/CoreCompileInputs.cache +++ /dev/null @@ -1 +0,0 @@ -001bf808026bfc7fe5228d45535464d5f6b2318e diff --git a/skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/skinchanger_dll/skinchanger/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache deleted file mode 100644 index f2235478b7f3ddf9a107c8e98745a9015695e83e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6820 zcmeHMZByGu5Vms-}KxVK;gXMwiHU# zwE3Q^fVpKII9!-{;d#PeFRW!V??Eaq{FRw`Ge>{fOg?aRAYsLaKuhLkGn+xx<@T>| zR1tgNuT*ohwfWjYZDz)q&#_rHOez;Yqv@A`yAJ7F_cch-{2*Dg3DPVvx$ZXut?uIB zyUcaP0XVBlfmd~p)($oJG%GcRz4OAa@p_TFFkv&_;SST#=}EO}x)!)@Q8Et>gxu>i zRah0<#?Q1Bh3lZb52&)jWF2%gtQ=Go=nVu>k9ge|5(-db=!$h;X`J8b>{`H2zuc(> z*XnwQUk-8qLVfqBjEiWbw+3!XVS`da zuHx*uMw>9?+C#u81-|AUw1=EWYI#Xb1`0}00|`Dt6{YYH^b;c8l%3kpEyjQ`Xc&pa zAj*McGHKukWn$pZ;qsBv;9+>;`r4WT&U^_zNN$_2(ODm7wzt2~1$V@I<_56IxcvA$ z>RQ&4`}J(bQ?`&Uub%F)x&OVz78cmNJ^x~6X?6~Bi%UD%FU{kMPPG?)*ooJzR~#;x z?1yMCqA1!;y#T-BF%|O$>IY~qVyGXWalJTqlEi~kgD6H*LsT3lfpj2|x`qP3Mo6Sc zjFPyHV$`^SGGUCNC>)pC%xSrdMEZb9up+W+nHy`Bh(l)g=gfKYdA37A+jMj7@Wi-@ zNQZ@Gs{s4p3Z%du_}VJ+eRyNlPD{)u4`2AqlM@ zQ7VBF?ta9IPg#*^GrIw)ugI8NDDIt|Z-@N1=53_0$2j%KL?&fIi;UX@(C+m$mWMpW zU1JvvU6+WWx-l)HVaHM>$R|%+xAoFEfa49md!Q)1ANPN<#P)umW8(&Vc}G*e5<9n zg``eGsBa3ve~Se?T6QyEZZO#l;inOvAv}`LI^IDt;guxw_;B&X6DwMXOgkiyws!?j ze2el|hTi@1+_@ngONZSRbX zq`t>fuk)mdUQ$-nc!c6zPhJ>lVy~f&AFwb~#EfQ=m~2RIyC;(*YI~tJO}vYqH1S=+ zGJZrcd7QsA#d=~q#@4l1-WkRdgt~qFiu;=KbCkGS$9;HWJjME{0ZT>lq?4cX8D diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_036C0B5B-1481-4323-8D20-8F5ADCB23D92.cs deleted file mode 100644 index e69de29b..00000000 diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_5937a670-0e60-4077-877b-f7221da3dda1.cs deleted file mode 100644 index e69de29b..00000000 diff --git a/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs b/skinchanger_dll/skinchanger/obj/Debug/TemporaryGeneratedFile_E7A71F73-0F8D-4B9B-B56E-8E70B10BC5D3.cs deleted file mode 100644 index e69de29b..00000000 From d0125d99e1c53066bd695639deae9fb01470437c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sat, 5 Aug 2017 17:51:48 +0200 Subject: [PATCH 09/52] Remove DLL, everything is in lua now --- __resource.lua | 3 +- client/main.lua | 45 ++++++++++++-- skinchanger.net.dll | Bin 8192 -> 0 bytes skinchanger_dll/.vs/skinchanger/v15/.suo | Bin 43520 -> 0 bytes skinchanger_dll/skinchanger.sln | 22 ------- .../skinchanger/Properties/AssemblyInfo.cs | 36 ----------- skinchanger_dll/skinchanger/skinchanger.cs | 58 ------------------ .../skinchanger/skinchanger.csproj | 51 --------------- .../skinchanger/skinchanger.csproj.user | 6 -- 9 files changed, 42 insertions(+), 179 deletions(-) delete mode 100644 skinchanger.net.dll delete mode 100644 skinchanger_dll/.vs/skinchanger/v15/.suo delete mode 100644 skinchanger_dll/skinchanger.sln delete mode 100644 skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs delete mode 100644 skinchanger_dll/skinchanger/skinchanger.cs delete mode 100644 skinchanger_dll/skinchanger/skinchanger.csproj delete mode 100644 skinchanger_dll/skinchanger/skinchanger.csproj.user diff --git a/__resource.lua b/__resource.lua index 430df89c..80a13e52 100644 --- a/__resource.lua +++ b/__resource.lua @@ -2,7 +2,6 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'SkinChanger' -client_scripts { - 'skinchanger.net.dll', +client_scripts {, 'client/main.lua' } \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index 314858e0..33713191 100644 --- a/client/main.lua +++ b/client/main.lua @@ -42,6 +42,39 @@ for i=1, #Components, 1 do Character[Components[i].name] = Components[i].value end +function LoadDefaultModel(loadMale) + + local playerPed = GetPlayerPed(-1) + local characterModel + + if loadMale then + characterModel = GetHashKey('mp_m_freemode_01') + else + characterModel = GetHashKey('mp_f_freemode_01'); + end + + RequestModel(characterModel) + + Citizen.CreateThread(function() + + while not HasModelLoaded(characterModel) do + RequestModel(characterModel) + Citizen.Wait(0) + end + + if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then + SetPlayerModel(PlayerId(), characterModel) + SetPedDefaultComponentVariation(playerPed) + end + + SetModelAsNoLongerNeeded(characterModel) + + TriggerEvent('skinchanger:modelLoaded') + + end) + +end + function GetMaxVals() local playerPed = GetPlayerPed(-1) @@ -134,6 +167,10 @@ function ApplySkin(skin, clothes) end +AddEventHandler('skinchanger:loadDefaultModel', function(loadMale) + LoadDefaultModel(loadMale) +end) + AddEventHandler('skinchanger:getData', function(cb) local components = json.decode(json.encode(Components)) @@ -189,9 +226,9 @@ AddEventHandler('skinchanger:loadSkin', function(skin) LoadSkin = skin if skin['sex'] == 0 then - TriggerEvent('skinchanger:LoadDefaultModel', true) + LoadDefaultModel(true) else - TriggerEvent('skinchanger:LoadDefaultModel', false) + LoadDefaultModel(false) end LastSex = skin['sex'] @@ -207,9 +244,9 @@ AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) } if playerSkin['sex'] == 0 then - TriggerEvent('skinchanger:LoadDefaultModel', true) + LoadDefaultModel(true) else - TriggerEvent('skinchanger:LoadDefaultModel', false) + LoadDefaultModel(false) end LastSex = skin['sex'] diff --git a/skinchanger.net.dll b/skinchanger.net.dll deleted file mode 100644 index 315d79e572ca46eba6b42ac480c88da7ca77d449..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 8192 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 diff --git a/skinchanger_dll/.vs/skinchanger/v15/.suo b/skinchanger_dll/.vs/skinchanger/v15/.suo deleted file mode 100644 index 267f914db4066b1f4ab1b64aa492387b57a627d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 43520 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 UrB58~-p+O2@7{#juae>ZA3D9w2mk;8 diff --git a/skinchanger_dll/skinchanger.sln b/skinchanger_dll/skinchanger.sln deleted file mode 100644 index edb4061d..00000000 --- a/skinchanger_dll/skinchanger.sln +++ /dev/null @@ -1,22 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26403.0 -MinimumVisualStudioVersion = 10.0.40219.1 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "skinchanger", "skinchanger\skinchanger.csproj", "{0B36C12C-4C7A-4C24-B204-161034340C8A}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Any CPU = Debug|Any CPU - Release|Any CPU = Release|Any CPU - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0B36C12C-4C7A-4C24-B204-161034340C8A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {0B36C12C-4C7A-4C24-B204-161034340C8A}.Debug|Any CPU.Build.0 = Debug|Any CPU - {0B36C12C-4C7A-4C24-B204-161034340C8A}.Release|Any CPU.ActiveCfg = Release|Any CPU - {0B36C12C-4C7A-4C24-B204-161034340C8A}.Release|Any CPU.Build.0 = Release|Any CPU - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs b/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs deleted file mode 100644 index 29ce8cfb..00000000 --- a/skinchanger_dll/skinchanger/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// Les informations générales relatives à un assembly dépendent de -// l'ensemble d'attributs suivant. Changez les valeurs de ces attributs pour modifier les informations -// associées à un assembly. -[assembly: AssemblyTitle("es_skinchanger")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("es_skinchanger")] -[assembly: AssemblyCopyright("Copyright © 2017")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// L'affectation de la valeur false à ComVisible rend les types invisibles dans cet assembly -// aux composants COM. Si vous devez accéder à un type dans cet assembly à partir de -// COM, affectez la valeur true à l'attribut ComVisible sur ce type. -[assembly: ComVisible(false)] - -// Le GUID suivant est pour l'ID de la typelib si ce projet est exposé à COM -[assembly: Guid("0b36c12c-4c7a-4c24-b204-161034340c8a")] - -// Les informations de version pour un assembly se composent des quatre valeurs suivantes : -// -// Version principale -// Version secondaire -// Numéro de build -// Révision -// -// Vous pouvez spécifier toutes les valeurs ou indiquer les numéros de build et de révision par défaut -// en utilisant '*', comme indiqué ci-dessous : -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/skinchanger_dll/skinchanger/skinchanger.cs b/skinchanger_dll/skinchanger/skinchanger.cs deleted file mode 100644 index 1276ba24..00000000 --- a/skinchanger_dll/skinchanger/skinchanger.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using CitizenFX.Core; -using CitizenFX.Core.UI; -using CitizenFX.Core.Native; - -namespace skinchanger -{ - public class Main : BaseScript - { - public Main() - { - Tick += OnTick; - - EventHandlers["skinchanger:LoadDefaultModel"] += new Action(async (dynamic LoadMale) => - { - await LoadDefaultModel((bool) LoadMale); - - TriggerEvent("skinchanger:modelLoaded"); - }); - - } - - public async Task LoadDefaultModel(bool LoadMale) - { - - PedHash CharacterModel; - - if (LoadMale) - CharacterModel = PedHash.FreemodeMale01; - else - CharacterModel = PedHash.FreemodeFemale01; - - Model characterModel = new Model(CharacterModel); - - characterModel.Request(500); - - if (characterModel.IsInCdImage && characterModel.IsValid) - { - while (!characterModel.IsLoaded) - await BaseScript.Delay(0); - - Function.Call(Hash.SET_PLAYER_MODEL, Game.Player, characterModel.Hash); - Function.Call(Hash.SET_PED_DEFAULT_COMPONENT_VARIATION, Game.Player.Character.Handle); - } - - characterModel.MarkAsNoLongerNeeded(); - } - - public async Task OnTick() - { - - } - } -} diff --git a/skinchanger_dll/skinchanger/skinchanger.csproj b/skinchanger_dll/skinchanger/skinchanger.csproj deleted file mode 100644 index d2c9d418..00000000 --- a/skinchanger_dll/skinchanger/skinchanger.csproj +++ /dev/null @@ -1,51 +0,0 @@ - - - - - Debug - AnyCPU - {0B36C12C-4C7A-4C24-B204-161034340C8A} - Library - Properties - skinchanger - skinchanger.net - v4.5.2 - 512 - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - - - - - - - - - - - - - - - - - copy /y "$(TargetPath)" "C:\Users\NGD\Desktop\cfx-server\resources\skinchanger" - - \ No newline at end of file diff --git a/skinchanger_dll/skinchanger/skinchanger.csproj.user b/skinchanger_dll/skinchanger/skinchanger.csproj.user deleted file mode 100644 index e997092b..00000000 --- a/skinchanger_dll/skinchanger/skinchanger.csproj.user +++ /dev/null @@ -1,6 +0,0 @@ - - - - C:\Users\NGD\AppData\Local\FiveM\FiveM.app\citizen\clr2\lib\mono\4.5\ - - \ No newline at end of file From c9180284f12281f832625af2f62c0e5e6a675529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sat, 5 Aug 2017 18:10:11 +0200 Subject: [PATCH 10/52] Update __resource.lua --- __resource.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/__resource.lua b/__resource.lua index 80a13e52..9ebdaa11 100644 --- a/__resource.lua +++ b/__resource.lua @@ -2,6 +2,6 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'SkinChanger' -client_scripts {, +client_scripts { 'client/main.lua' -} \ No newline at end of file +} From ab98a36f273cbc1cde87de327fd8a6eb2b561fdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sat, 5 Aug 2017 19:00:56 +0200 Subject: [PATCH 11/52] Add removable helmet - need new version of esx_menu_default --- client/main.lua | 74 ++++++++++++++++++++++++++----------------------- 1 file changed, 40 insertions(+), 34 deletions(-) diff --git a/client/main.lua b/client/main.lua index 33713191..f6409523 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,36 +1,36 @@ -local Components = { - {label = 'Sexe', name = 'sex', value = 0}, - {label = 'Visage', name = 'face', value = 0}, - {label = 'Peau', name = 'skin', value = 0}, - {label = 'Type Barbe', name = 'beard_1', value = 0}, - {label = 'Taille barbe', name = 'beard_2', value = 0}, - {label = 'Couleur barbe 1', name = 'beard_3', value = 0}, - {label = 'Couleur barbe 2', name = 'beard_4', value = 0}, - {label = 'Cheveux 1', name = 'hair_1', value = 0}, - {label = 'Cheveux 2', name = 'hair_2', value = 0}, - {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0}, - {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0}, - {label = 'T-Shirt 1', name = 'tshirt_1', value = 0}, - {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, textureof = 'tshirt_1'}, - {label = 'Torse 1', name = 'torso_1', value = 0}, - {label = 'Torse 2', name = 'torso_2', value = 0, textureof = 'torso_1'}, - {label = 'Calques 1', name = 'decals_1', value = 0}, - {label = 'Calques 2', name = 'decals_2', value = 0, textureof = 'decals_1'}, - {label = 'Bras', name = 'arms', value = 0}, - {label = 'Jambes 1', name = 'pants_1', value = 0}, - {label = 'Jambes 2', name = 'pants_2', value = 0, textureof = 'pants_1'}, - {label = 'Chaussures 1', name = 'shoes_1', value = 0}, - {label = 'Chaussures 2', name = 'shoes_2', value = 0, textureof = 'shoes_1'}, - {label = 'Masque 1', name = 'mask_1', value = 0}, - {label = 'Masque 2', name = 'mask_2', value = 0, textureof = 'mask_1'}, - {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0}, - {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, textureof = 'bproof_1'}, - {label = 'Chaine 1', name = 'chain_1', value = 0}, - {label = 'Chaine 2', name = 'chain_2', value = 0, textureof = 'chain_1'}, - {label = 'Casque 1', name = 'helmet_1', value = 0}, - {label = 'Casque 2', name = 'helmet_2', value = 0, textureof = 'helmet_1'}, - {label = 'Lunettes 1', name = 'glasses_1', value = 0}, - {label = 'Lunettes 2', name = 'glasses_2', value = 0, textureof = 'glasses_1'}, +local Components = { + {label = 'Sexe', name = 'sex', value = 0, min = 0 }, + {label = 'Visage', name = 'face', value = 0, min = 0 }, + {label = 'Peau', name = 'skin', value = 0, min = 0 }, + {label = 'Type Barbe', name = 'beard_1', value = 0, min = 0 }, + {label = 'Taille barbe', name = 'beard_2', value = 0, min = 0 }, + {label = 'Couleur barbe 1', name = 'beard_3', value = 0, min = 0 }, + {label = 'Couleur barbe 2', name = 'beard_4', value = 0, min = 0 }, + {label = 'Cheveux 1', name = 'hair_1', value = 0, min = 0 }, + {label = 'Cheveux 2', name = 'hair_2', value = 0, min = 0 }, + {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0, min = 0 }, + {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0, min = 0 }, + {label = 'T-Shirt 1', name = 'tshirt_1', value = 0, min = 0 }, + {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, min = 0 , textureof = 'tshirt_1'}, + {label = 'Torse 1', name = 'torso_1', value = 0, min = 0 }, + {label = 'Torse 2', name = 'torso_2', value = 0, min = 0 , textureof = 'torso_1'}, + {label = 'Calques 1', name = 'decals_1', value = 0, min = 0 }, + {label = 'Calques 2', name = 'decals_2', value = 0, min = 0 , textureof = 'decals_1'}, + {label = 'Bras', name = 'arms', value = 0, min = 0 }, + {label = 'Jambes 1', name = 'pants_1', value = 0, min = 0 }, + {label = 'Jambes 2', name = 'pants_2', value = 0, min = 0 , textureof = 'pants_1'}, + {label = 'Chaussures 1', name = 'shoes_1', value = 0, min = 0 }, + {label = 'Chaussures 2', name = 'shoes_2', value = 0, min = 0 , textureof = 'shoes_1'}, + {label = 'Masque 1', name = 'mask_1', value = 0, min = 0 }, + {label = 'Masque 2', name = 'mask_2', value = 0, min = 0 , textureof = 'mask_1'}, + {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0, min = 0 }, + {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, min = 0 , textureof = 'bproof_1'}, + {label = 'Chaine 1', name = 'chain_1', value = 0, min = 0 }, + {label = 'Chaine 2', name = 'chain_2', value = 0, min = 0 , textureof = 'chain_1'}, + {label = 'Casque 1', name = 'helmet_1', value = -1, min = -1, componentId = 0}, + {label = 'Casque 2', name = 'helmet_2', value = 0, min = 0 , textureof = 'helmet_1'}, + {label = 'Lunettes 1', name = 'glasses_1', value = 0, min = 0 }, + {label = 'Lunettes 2', name = 'glasses_2', value = 0, min = 0 , textureof = 'glasses_1'}, } local LastSex = 0 @@ -162,7 +162,13 @@ function ApplySkin(skin, clothes) SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain - SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + + if Character['helmet_1'] == -1 then + ClearPedProp(playerPed, 0) + else + SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + end + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end From d65849ab97404afb51f890701cc002910f940c4f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sat, 5 Aug 2017 22:58:47 +0200 Subject: [PATCH 12/52] LastSex fix for loadClothes --- __resource.lua | 2 +- client/main.lua | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/__resource.lua b/__resource.lua index 9ebdaa11..5afa8772 100644 --- a/__resource.lua +++ b/__resource.lua @@ -4,4 +4,4 @@ description 'SkinChanger' client_scripts { 'client/main.lua' -} +} \ No newline at end of file diff --git a/client/main.lua b/client/main.lua index f6409523..aa9fa324 100644 --- a/client/main.lua +++ b/client/main.lua @@ -255,6 +255,6 @@ AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) LoadDefaultModel(false) end - LastSex = skin['sex'] + LastSex = playerSkin['sex'] end) \ No newline at end of file From 434a4cabfe2d58fbb877e70707a20ba56a8a02b9 Mon Sep 17 00:00:00 2001 From: renaiku Date: Sun, 6 Aug 2017 12:47:09 +0200 Subject: [PATCH 13/52] Add bags, makeup, ageing, eyebrows ... --- client/main.lua | 210 +++++++++++++++++++++++++++++++----------------- 1 file changed, 136 insertions(+), 74 deletions(-) diff --git a/client/main.lua b/client/main.lua index aa9fa324..8bf6469b 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,36 +1,54 @@ -local Components = { - {label = 'Sexe', name = 'sex', value = 0, min = 0 }, - {label = 'Visage', name = 'face', value = 0, min = 0 }, - {label = 'Peau', name = 'skin', value = 0, min = 0 }, - {label = 'Type Barbe', name = 'beard_1', value = 0, min = 0 }, - {label = 'Taille barbe', name = 'beard_2', value = 0, min = 0 }, - {label = 'Couleur barbe 1', name = 'beard_3', value = 0, min = 0 }, - {label = 'Couleur barbe 2', name = 'beard_4', value = 0, min = 0 }, - {label = 'Cheveux 1', name = 'hair_1', value = 0, min = 0 }, - {label = 'Cheveux 2', name = 'hair_2', value = 0, min = 0 }, - {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0, min = 0 }, - {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0, min = 0 }, - {label = 'T-Shirt 1', name = 'tshirt_1', value = 0, min = 0 }, - {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, min = 0 , textureof = 'tshirt_1'}, - {label = 'Torse 1', name = 'torso_1', value = 0, min = 0 }, - {label = 'Torse 2', name = 'torso_2', value = 0, min = 0 , textureof = 'torso_1'}, - {label = 'Calques 1', name = 'decals_1', value = 0, min = 0 }, - {label = 'Calques 2', name = 'decals_2', value = 0, min = 0 , textureof = 'decals_1'}, - {label = 'Bras', name = 'arms', value = 0, min = 0 }, - {label = 'Jambes 1', name = 'pants_1', value = 0, min = 0 }, - {label = 'Jambes 2', name = 'pants_2', value = 0, min = 0 , textureof = 'pants_1'}, - {label = 'Chaussures 1', name = 'shoes_1', value = 0, min = 0 }, - {label = 'Chaussures 2', name = 'shoes_2', value = 0, min = 0 , textureof = 'shoes_1'}, - {label = 'Masque 1', name = 'mask_1', value = 0, min = 0 }, - {label = 'Masque 2', name = 'mask_2', value = 0, min = 0 , textureof = 'mask_1'}, - {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0, min = 0 }, - {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, min = 0 , textureof = 'bproof_1'}, - {label = 'Chaine 1', name = 'chain_1', value = 0, min = 0 }, - {label = 'Chaine 2', name = 'chain_2', value = 0, min = 0 , textureof = 'chain_1'}, - {label = 'Casque 1', name = 'helmet_1', value = -1, min = -1, componentId = 0}, - {label = 'Casque 2', name = 'helmet_2', value = 0, min = 0 , textureof = 'helmet_1'}, - {label = 'Lunettes 1', name = 'glasses_1', value = 0, min = 0 }, - {label = 'Lunettes 2', name = 'glasses_2', value = 0, min = 0 , textureof = 'glasses_1'}, +local Components = { + {label = 'Sexe', name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Visage', name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Peau', name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Rides', name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Epaisseur rides', name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Type Barbe', name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Taille barbe', name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur barbe 1', name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur barbe 2', name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Cheveux 1', name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Cheveux 2', name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Type Sourcils', name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Taille Sourcils', name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Sourcils 1', name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Sourcils 2', name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Type Maquillage', name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Epaisseur Maquillage', name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Maquillage 1', name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Maquillage 2', name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Type Lipstick', name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Epaisseur Lipstick', name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Lipstick 1', name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Lipstick 2', name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Accessoire Oreilles',name = 'ears_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Couleur Accessoire', name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- + {label = 'T-Shirt 1', name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- + {label = 'Torse 1', name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = 'Torse 2', name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- + {label = 'Calques 1', name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = 'Calques 2', name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- + {label = 'Bras', name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = 'Jambes 1', name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- + {label = 'Jambes 2', name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- + {label = 'Chaussures 1', name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = 'Chaussures 2', name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = 'Masque 1', name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Masque 2', name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- + {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- + {label = 'Chaine 1', name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Chaine 2', name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- + {label = 'Casque 1', name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Casque 2', name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- + {label = 'Lunettes 1', name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = 'Lunettes 2', name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- + {label = 'Sac', name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = 'Couleur Sac', name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } local LastSex = 0 @@ -43,35 +61,35 @@ for i=1, #Components, 1 do end function LoadDefaultModel(loadMale) - + local playerPed = GetPlayerPed(-1) - local characterModel + local characterModel - if loadMale then - characterModel = GetHashKey('mp_m_freemode_01') - else - characterModel = GetHashKey('mp_f_freemode_01'); - end + if loadMale then + characterModel = GetHashKey('mp_m_freemode_01') + else + characterModel = GetHashKey('mp_f_freemode_01'); + end - RequestModel(characterModel) + RequestModel(characterModel) - Citizen.CreateThread(function() - - while not HasModelLoaded(characterModel) do - RequestModel(characterModel) - Citizen.Wait(0) - end + Citizen.CreateThread(function() - if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then - SetPlayerModel(PlayerId(), characterModel) - SetPedDefaultComponentVariation(playerPed) - end + while not HasModelLoaded(characterModel) do + RequestModel(characterModel) + Citizen.Wait(0) + end - SetModelAsNoLongerNeeded(characterModel) + if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then + SetPlayerModel(PlayerId(), characterModel) + SetPedDefaultComponentVariation(playerPed) + end - TriggerEvent('skinchanger:modelLoaded') + SetModelAsNoLongerNeeded(characterModel) - end) + TriggerEvent('skinchanger:modelLoaded') + + end) end @@ -83,14 +101,30 @@ function GetMaxVals() sex = 1, face = 45, skin = 45, - beard_1 = GetNumHeadOverlayValues(1), + age_1 = GetNumHeadOverlayValues(3)-1, + age_2 = 10, + beard_1 = GetNumHeadOverlayValues(1)-1, beard_2 = 10, - beard_3 = 63, - beard_4 = 63, + beard_3 = GetNumHairColors()-1, + beard_4 = GetNumHairColors()-1, hair_1 = GetNumberOfPedDrawableVariations(playerPed, 2) - 1, hair_2 = GetNumberOfPedTextureVariations(playerPed, 2, Character['hair_1']) - 1, - hair_color_1 = 22, - hair_color_2 = 4, + hair_color_1 = GetNumHairColors()-1, + hair_color_2 = GetNumHairColors()-1, + eyebrows_1 = GetNumHeadOverlayValues(2)-1, + eyebrows_2 = 10, + eyebrows_3 = GetNumHairColors()-1, + eyebrows_4 = GetNumHairColors()-1, + makeup_1 = GetNumHeadOverlayValues(4)-1, + makeup_2 = 10, + makeup_3 = 74, + makeup_4 = 74, + lipstick_1 = GetNumHeadOverlayValues(8)-1, + lipstick_2 = 10, + lipstick_3 = 9, + lipstick_4 = 9, + ears_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, + ears_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['ears_1'] - 1), tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, tshirt_2 = GetNumberOfPedTextureVariations(playerPed, 8, Character['tshirt_1']) - 1, torso_1 = GetNumberOfPedDrawableVariations(playerPed, 11) - 1, @@ -102,12 +136,14 @@ function GetMaxVals() pants_2 = GetNumberOfPedTextureVariations(playerPed, 4, Character['pants_1']) - 1, shoes_1 = GetNumberOfPedDrawableVariations(playerPed, 6) - 1, shoes_2 = GetNumberOfPedTextureVariations(playerPed, 6, Character['shoes_1']) - 1, - mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, - mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, - bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, - bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, - chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, - chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, + mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, + mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, + bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, + bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, + chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, + chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, + bags_1 = GetNumberOfPedDrawableVariations(playerPed, 5) - 1, + bags_2 = GetNumberOfPedTextureVariations(playerPed, 5, Character['bags_1']) - 1, helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, helmet_2 = GetNumberOfPedTextureVariations(playerPed, 0, Character['helmet_1']) - 1, glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, @@ -133,6 +169,8 @@ function ApplySkin(skin, clothes) k ~= 'sex' and k ~= 'face' and k ~= 'skin' and + k ~= 'age_1' and + k ~= 'age_2' and k ~= 'beard_1' and k ~= 'beard_2' and k ~= 'beard_3' and @@ -140,7 +178,19 @@ function ApplySkin(skin, clothes) k ~= 'hair_1' and k ~= 'hair_2' and k ~= 'hair_color_1' and - k ~= 'hair_color_2' + k ~= 'hair_color_2' and + k ~= 'eyebrows_1' and + k ~= 'eyebrows_2' and + k ~= 'eyebrows_3' and + k ~= 'eyebrows_4' and + k ~= 'makeup_1' and + k ~= 'makeup_2' and + k ~= 'makeup_3' and + k ~= 'makeup_4' and + k ~= 'lipstick_1' and + k ~= 'lipstick_2' and + k ~= 'lipstick_3' and + k ~= 'lipstick_4' then Character[k] = v end @@ -149,26 +199,34 @@ function ApplySkin(skin, clothes) end SetPedHeadBlendData(playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) - SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard - SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + + SetPedHeadOverlay(playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity + SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity + SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedHeadOverlay(playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity + SetPedHeadOverlayColor(playerPed, 1, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color + SetPedHeadOverlay(playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity + SetPedHeadOverlayColor(playerPed, 1, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color + SetPedHeadOverlay(playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity + SetPedHeadOverlayColor(playerPed, 2, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair - SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes - SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask - SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof + SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask + SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain - + SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag if Character['helmet_1'] == -1 then ClearPedProp(playerPed, 0) else SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet end - SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end @@ -185,6 +243,8 @@ AddEventHandler('skinchanger:getData', function(cb) for i=1, #components, 1 do if k == components[i].name then components[i].value = v + --components[i].zoomOffset = Components[i].zoomOffset + --components[i].camOffset = Components[i].camOffset end end end @@ -210,6 +270,8 @@ end) AddEventHandler('skinchanger:modelLoaded', function() + ClearPedProp(GetPlayerPed(-1), 0) + if LoadSkin ~= nil then ApplySkin(LoadSkin) @@ -236,7 +298,7 @@ AddEventHandler('skinchanger:loadSkin', function(skin) else LoadDefaultModel(false) end - + LastSex = skin['sex'] end) From d6b50975fca18026e43ec980ec6416db4c59254f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sun, 6 Aug 2017 18:08:54 +0200 Subject: [PATCH 14/52] bring back skinchanger:loadDefaultModel event --- client/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/main.lua b/client/main.lua index 8bf6469b..69edcafa 100644 --- a/client/main.lua +++ b/client/main.lua @@ -294,9 +294,9 @@ AddEventHandler('skinchanger:loadSkin', function(skin) LoadSkin = skin if skin['sex'] == 0 then - LoadDefaultModel(true) + TriggerEvent('skinchanger:loadDefaultModel', true) else - LoadDefaultModel(false) + TriggerEvent('skinchanger:loadDefaultModel', false) end LastSex = skin['sex'] @@ -312,9 +312,9 @@ AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) } if playerSkin['sex'] == 0 then - LoadDefaultModel(true) + TriggerEvent('skinchanger:loadDefaultModel', true) else - LoadDefaultModel(false) + TriggerEvent('skinchanger:loadDefaultModel', false) end LastSex = playerSkin['sex'] From 9885e5dcb3538122df6ec02fca9391985ae8ab2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 9 Aug 2017 14:16:44 +0200 Subject: [PATCH 15/52] Add LICENSE.txt --- LICENSE.txt | 674 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 674 insertions(+) create mode 100644 LICENSE.txt diff --git a/LICENSE.txt b/LICENSE.txt new file mode 100644 index 00000000..30ace6a8 --- /dev/null +++ b/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + {one line to give the program's name and a brief idea of what it does.} + Copyright (C) {year} {name of author} + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + {project} Copyright (C) {year} {fullname} + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. \ No newline at end of file From 949e69bbb4aa52eee5d321a24a098ba900607e3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 9 Aug 2017 14:24:13 +0200 Subject: [PATCH 16/52] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9e133a9b..baf78590 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ local skin = { } -- Load freemode model -TriggerEvent('skinchanger:LoadDefaultModel', isMale) +TriggerEvent('skinchanger:loadDefaultModel', isMale) -- Load skin TriggerEvent('skinchanger:loadSkin', skin) From 2214ff975bf63ea737c87c9006ad5ca67ade656f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Wed, 16 Aug 2017 16:46:30 +0200 Subject: [PATCH 17/52] Fix ear accessories (can remove now) --- client/main.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 69edcafa..5428b3a5 100644 --- a/client/main.lua +++ b/client/main.lua @@ -24,7 +24,7 @@ local Components = { {label = 'Epaisseur Lipstick', name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- {label = 'Couleur Lipstick 1', name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- {label = 'Couleur Lipstick 2', name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Accessoire Oreilles',name = 'ears_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = 'Accessoire Oreilles',name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- {label = 'Couleur Accessoire', name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- {label = 'T-Shirt 1', name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- @@ -211,7 +211,13 @@ function ApplySkin(skin, clothes) SetPedHeadOverlayColor(playerPed, 2, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color - SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories + + if Character['ears_1'] == -1 then + ClearPedProp(playerPed, 2) + else + SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories + end + SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso @@ -222,11 +228,13 @@ function ApplySkin(skin, clothes) SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag + if Character['helmet_1'] == -1 then ClearPedProp(playerPed, 0) else SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet end + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end From 0df0ee8273b0fd949563c38db82d071b85ca3a8a Mon Sep 17 00:00:00 2001 From: nearbyplayer Date: Wed, 16 Aug 2017 18:16:10 -0400 Subject: [PATCH 18/52] Multi-language support --- __resource.lua | 6 ++- client/main.lua | 132 ++++++++++++++++++++++++------------------------ config.lua | 2 + locales/en.lua | 53 +++++++++++++++++++ locales/fr.lua | 54 ++++++++++++++++++++ 5 files changed, 180 insertions(+), 67 deletions(-) create mode 100644 config.lua create mode 100644 locales/en.lua create mode 100644 locales/fr.lua diff --git a/__resource.lua b/__resource.lua index 5afa8772..472826ea 100644 --- a/__resource.lua +++ b/__resource.lua @@ -3,5 +3,9 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'SkinChanger' client_scripts { + '@es_extended/locale.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'config.lua', 'client/main.lua' -} \ No newline at end of file +} diff --git a/client/main.lua b/client/main.lua index 5428b3a5..e1cfabac 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,54 +1,54 @@ local Components = { - {label = 'Sexe', name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Visage', name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Peau', name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Rides', name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Epaisseur rides', name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Type Barbe', name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Taille barbe', name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur barbe 1', name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur barbe 2', name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Cheveux 1', name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Cheveux 2', name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Couleur cheveux 1', name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Couleur cheveux 2', name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Type Sourcils', name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Taille Sourcils', name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Sourcils 1', name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Sourcils 2', name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Type Maquillage', name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Epaisseur Maquillage', name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Maquillage 1', name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Maquillage 2', name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Type Lipstick', name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Epaisseur Lipstick', name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Lipstick 1', name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Lipstick 2', name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Accessoire Oreilles',name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = 'Couleur Accessoire', name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- - {label = 'T-Shirt 1', name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = 'T-Shirt 2', name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- - {label = 'Torse 1', name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = 'Torse 2', name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- - {label = 'Calques 1', name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = 'Calques 2', name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- - {label = 'Bras', name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = 'Jambes 1', name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- - {label = 'Jambes 2', name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- - {label = 'Chaussures 1', name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, - {label = 'Chaussures 2', name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = 'Masque 1', name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Masque 2', name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- - {label = 'Gilet pare-balle 1', name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = 'Gilet pare-balle 2', name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- - {label = 'Chaine 1', name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Chaine 2', name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- - {label = 'Casque 1', name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Casque 2', name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- - {label = 'Lunettes 1', name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = 'Lunettes 2', name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- - {label = 'Sac', name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = 'Couleur Sac', name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} + {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- + {label = _('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- + {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- + {label = U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- + {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } local LastSex = 0 @@ -122,7 +122,7 @@ function GetMaxVals() lipstick_1 = GetNumHeadOverlayValues(8)-1, lipstick_2 = 10, lipstick_3 = 9, - lipstick_4 = 9, + lipstick_4 = 9, ears_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, ears_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['ears_1'] - 1), tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, @@ -155,13 +155,13 @@ function GetMaxVals() end function ApplySkin(skin, clothes) - + local playerPed = GetPlayerPed(-1) for k,v in pairs(skin) do Character[k] = v end - + if clothes ~= nil then for k,v in pairs(clothes) do @@ -199,10 +199,10 @@ function ApplySkin(skin, clothes) end SetPedHeadBlendData(playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) - + SetPedHeadOverlay(playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity - SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color SetPedHeadOverlay(playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity SetPedHeadOverlayColor(playerPed, 1, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color SetPedHeadOverlay(playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity @@ -211,13 +211,13 @@ function ApplySkin(skin, clothes) SetPedHeadOverlayColor(playerPed, 2, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color - + if Character['ears_1'] == -1 then ClearPedProp(playerPed, 2) else SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories end - + SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso @@ -228,13 +228,13 @@ function ApplySkin(skin, clothes) SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag - + if Character['helmet_1'] == -1 then ClearPedProp(playerPed, 0) else SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet end - + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end @@ -244,7 +244,7 @@ AddEventHandler('skinchanger:loadDefaultModel', function(loadMale) end) AddEventHandler('skinchanger:getData', function(cb) - + local components = json.decode(json.encode(Components)) for k,v in pairs(Character) do @@ -284,11 +284,11 @@ AddEventHandler('skinchanger:modelLoaded', function() ApplySkin(LoadSkin) LoadSkin = nil - + end if LoadClothes ~= nil then - + ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) LoadClothes = nil @@ -298,7 +298,7 @@ end) RegisterNetEvent('skinchanger:loadSkin') AddEventHandler('skinchanger:loadSkin', function(skin) - + LoadSkin = skin if skin['sex'] == 0 then @@ -306,14 +306,14 @@ AddEventHandler('skinchanger:loadSkin', function(skin) else TriggerEvent('skinchanger:loadDefaultModel', false) end - + LastSex = skin['sex'] end) RegisterNetEvent('skinchanger:loadClothes') AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) - + LoadClothes = { playerSkin = playerSkin, clothesSkin = clothesSkin @@ -327,4 +327,4 @@ AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) LastSex = playerSkin['sex'] -end) \ No newline at end of file +end) diff --git a/config.lua b/config.lua new file mode 100644 index 00000000..56a8b5e9 --- /dev/null +++ b/config.lua @@ -0,0 +1,2 @@ +Config = {} +Config.Locale = 'fr' diff --git a/locales/en.lua b/locales/en.lua new file mode 100644 index 00000000..b3eee58b --- /dev/null +++ b/locales/en.lua @@ -0,0 +1,53 @@ +Locales['en'] = { + + ['sex'] = 'sex', + ['face'] = 'face', + ['skin'] = 'skin', + ['wrinkles'] = 'wrinkles', + ['wrinkle_thickness'] = 'wrinkle thickness', + ['beard_type'] = 'beard type', + ['beard_size'] = 'beard size', + ['beard_color_1'] = 'beard color 1', + ['beard_color_2'] = 'beard color 2', + ['hair_1'] = 'hair 1', + ['hair_2'] = 'hair 2', + ['hair_color_1'] = 'hair color 1', + ['hair_color_2'] = 'hair color 2', + ['eyebrow_type'] = 'eyebrow type', + ['eyebrow_size'] = 'eyebrow size', + ['eyebrow_color_1'] = 'eyebrow color 1', + ['eyebrow_color_2'] = 'eyebrow color 2', + ['makeup_type'] = 'makeup type', + ['makeup_thickness'] = 'makeup thickness', + ['makeup_color_1'] = 'makeup color 1', + ['makeup_color_2'] = 'makeup color 2', + ['lipstick_type'] = 'lipstick type', + ['lipstick_thickness'] = 'lipstick thickness', + ['lipstick_color_1'] = 'lipstick color 1', + ['lipstick_color_2'] = 'lipstick color 2', + ['ear_accessories'] = 'ear accessories', + ['ear_accessories_color'] = 'ear accessories color', + ['tshirt_1'] = 't-Shirt 1', + ['tshirt_2'] = 't-Shirt 2', + ['torso_1'] = 'torso 1', + ['torso_2'] = 'torso 2', + ['decals_1'] = 'decals 1', + ['decals_2'] = 'decals 2', + ['arms'] = 'arms', + ['pants_1'] = 'pants 1', + ['pants_2'] = 'pants 2', + ['shoes_1'] = 'shoes 1', + ['shoes_2'] = 'shoes 2', + ['mask_1'] = 'mask 1', + ['mask_2'] = 'mask 2', + ['bproof_1'] = 'bulletproof vest 1', + ['bproof_2'] = 'bulletproof vest 2', + ['chain_1'] = 'chain 1', + ['chain_2'] = 'chain 2', + ['helmet_1'] = 'helmet 1', + ['helmet_2'] = 'helmet 2', + ['glasses_1'] = 'glasses 1', + ['glasses_2'] = 'glasses 2', + ['bag'] = 'bag', + ['bag_color'] = 'bag color', +} diff --git a/locales/fr.lua b/locales/fr.lua new file mode 100644 index 00000000..61cec30c --- /dev/null +++ b/locales/fr.lua @@ -0,0 +1,54 @@ +Locales['fr'] = { + + ['sex'] = 'sexe', + ['face'] = 'visage', + ['skin'] = 'peau', + ['wrinkles'] = 'rides', + ['wrinkle_thickness'] = 'épaisseur rides', + ['beard_type'] = 'type barbe', + ['beard_size'] = 'taille barbe', + ['beard_color_1'] = 'couleur barbe 1', + ['beard_color_2'] = 'couleur barbe 2', + ['hair_1'] = 'cheveux 1', + ['hair_2'] = 'cheveux 2', + ['hair_color_1'] = 'couleur cheveux 1', + ['hair_color_2'] = 'couleur cheveux 2', + ['eyebrow_type'] = 'type sourcils', + ['eyebrow_size'] = 'taille sourcils', + ['eyebrow_color_1'] = 'couleur sourcils 1', + ['eyebrow_color_2'] = 'couleur sourcils 2', + ['makeup_type'] = 'type maquillage', + ['makeup_thickness'] = 'épaisseur maquillage', + ['makeup_color_1'] = 'couleur maquillage 1', + ['makeup_color_2'] = 'couleur maquillage 2', + ['lipstick_type'] = 'type lipstick', + ['lipstick_thickness'] = 'épaisseur lipstick', + ['lipstick_color_1'] = 'couleur lipstick 1', + ['lipstick_color_2'] = 'couleur lipstick 2', + ['ear_accessories'] = 'accessoire oreilles', + ['ear_accessories_color'] = 'couleur accessoire', + ['tshirt_1'] = 't-Shirt 1', + ['tshirt_2'] = 't-Shirt 2', + ['torso_1'] = 'torse 1', + ['torso_2'] = 'torse 2', + ['decals_1'] = 'calques 1', + ['decals_2'] = 'calques 2', + ['arms'] = 'bras', + ['pants_1'] = 'jambes 1', + ['pants_2'] = 'jambes 2', + ['shoes_1'] = 'chaussures 1', + ['shoes_2'] = 'chaussures 2', + ['mask_1'] = 'masque 1', + ['mask_2'] = 'masque 2', + ['bproof_1'] = 'gilet pare-balle 1', + ['bproof_2'] = 'gilet pare-balle 2', + ['chain_1'] = 'chaine 1', + ['chain_2'] = 'chaine 2', + ['helmet_1'] = 'casque 1', + ['helmet_2'] = 'casque 2', + ['glasses_1'] = 'lunettes 1', + ['glasses_2'] = 'lunettes 2', + ['bag'] = 'sac', + ['bag_color'] = 'couleur sac', + +} From f25c679e764cccb9c5fa883da0ca47ce1dc1372a Mon Sep 17 00:00:00 2001 From: renaiku Date: Thu, 17 Aug 2017 01:30:29 +0200 Subject: [PATCH 19/52] MOAR helmets, caps and glasses colors --- client/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index e1cfabac..3c81a518 100644 --- a/client/main.lua +++ b/client/main.lua @@ -145,9 +145,9 @@ function GetMaxVals() bags_1 = GetNumberOfPedDrawableVariations(playerPed, 5) - 1, bags_2 = GetNumberOfPedTextureVariations(playerPed, 5, Character['bags_1']) - 1, helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, - helmet_2 = GetNumberOfPedTextureVariations(playerPed, 0, Character['helmet_1']) - 1, + helmet_2 = GetNumberOfPedPropTextureVariations(playerPed, 0, Character['helmet_1']) - 1, glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, - glasses_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['glasses_1'] - 1), + glasses_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['glasses_1'] - 1), } return data From b291c1b95b38805e5772c5fc7d50f7be8fe0bcfb Mon Sep 17 00:00:00 2001 From: nearbyplayer <3721216+nearbyplayer@users.noreply.github.com> Date: Thu, 17 Aug 2017 02:12:36 -0400 Subject: [PATCH 20/52] Update main.lua Added missing underscore --- client/main.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/main.lua b/client/main.lua index 3c81a518..8415cde1 100644 --- a/client/main.lua +++ b/client/main.lua @@ -41,7 +41,7 @@ local Components = { {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- - {label = U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- From 44db2b5471427fd59419864ad3909f0d0dc599ba Mon Sep 17 00:00:00 2001 From: renaiku Date: Sat, 19 Aug 2017 21:02:16 +0200 Subject: [PATCH 21/52] Fix colors for hairs, beards, lipstick, eyebrows, makeup --- client/main.lua | 206 ++++++++++++++++++++++++------------------------ 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/client/main.lua b/client/main.lua index 8415cde1..86194fc9 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,54 +1,54 @@ local Components = { - {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- - {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- - {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- - {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- - {label = _('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- - {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- - {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, - {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- - {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- - {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- - {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- - {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} + {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- + {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- + {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- + {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } local LastSex = 0 @@ -117,37 +117,37 @@ function GetMaxVals() eyebrows_4 = GetNumHairColors()-1, makeup_1 = GetNumHeadOverlayValues(4)-1, makeup_2 = 10, - makeup_3 = 74, - makeup_4 = 74, + makeup_3 = GetNumHairColors()-1, + makeup_4 = GetNumHairColors()-1, lipstick_1 = GetNumHeadOverlayValues(8)-1, lipstick_2 = 10, - lipstick_3 = 9, - lipstick_4 = 9, - ears_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, - ears_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['ears_1'] - 1), - tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, - tshirt_2 = GetNumberOfPedTextureVariations(playerPed, 8, Character['tshirt_1']) - 1, - torso_1 = GetNumberOfPedDrawableVariations(playerPed, 11) - 1, - torso_2 = GetNumberOfPedTextureVariations(playerPed, 11, Character['torso_1']) - 1, - decals_1 = GetNumberOfPedDrawableVariations(playerPed, 10) - 1, - decals_2 = GetNumberOfPedTextureVariations(playerPed, 10, Character['decals_1']) - 1, - arms = GetNumberOfPedDrawableVariations(playerPed, 3) - 1, - pants_1 = GetNumberOfPedDrawableVariations(playerPed, 4) - 1, - pants_2 = GetNumberOfPedTextureVariations(playerPed, 4, Character['pants_1']) - 1, - shoes_1 = GetNumberOfPedDrawableVariations(playerPed, 6) - 1, - shoes_2 = GetNumberOfPedTextureVariations(playerPed, 6, Character['shoes_1']) - 1, - mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, - mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, - bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, - bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, - chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, - chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, - bags_1 = GetNumberOfPedDrawableVariations(playerPed, 5) - 1, - bags_2 = GetNumberOfPedTextureVariations(playerPed, 5, Character['bags_1']) - 1, - helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, - helmet_2 = GetNumberOfPedPropTextureVariations(playerPed, 0, Character['helmet_1']) - 1, - glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, - glasses_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['glasses_1'] - 1), + lipstick_3 = GetNumHairColors()-1, + lipstick_4 = GetNumHairColors()-1, + ears_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, + ears_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['ears_1'] - 1), + tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, + tshirt_2 = GetNumberOfPedTextureVariations(playerPed, 8, Character['tshirt_1']) - 1, + torso_1 = GetNumberOfPedDrawableVariations(playerPed, 11) - 1, + torso_2 = GetNumberOfPedTextureVariations(playerPed, 11, Character['torso_1']) - 1, + decals_1 = GetNumberOfPedDrawableVariations(playerPed, 10) - 1, + decals_2 = GetNumberOfPedTextureVariations(playerPed, 10, Character['decals_1']) - 1, + arms = GetNumberOfPedDrawableVariations(playerPed, 3) - 1, + pants_1 = GetNumberOfPedDrawableVariations(playerPed, 4) - 1, + pants_2 = GetNumberOfPedTextureVariations(playerPed, 4, Character['pants_1']) - 1, + shoes_1 = GetNumberOfPedDrawableVariations(playerPed, 6) - 1, + shoes_2 = GetNumberOfPedTextureVariations(playerPed, 6, Character['shoes_1']) - 1, + mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, + mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, + bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, + bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, + chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, + chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, + bags_1 = GetNumberOfPedDrawableVariations(playerPed, 5) - 1, + bags_2 = GetNumberOfPedTextureVariations(playerPed, 5, Character['bags_1']) - 1, + helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, + helmet_2 = GetNumberOfPedPropTextureVariations(playerPed, 0, Character['helmet_1']) - 1, + glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, + glasses_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['glasses_1'] - 1), } return data @@ -200,42 +200,42 @@ function ApplySkin(skin, clothes) SetPedHeadBlendData(playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) - SetPedHeadOverlay(playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity - SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity - SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color - SetPedHeadOverlay(playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity - SetPedHeadOverlayColor(playerPed, 1, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color - SetPedHeadOverlay(playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity - SetPedHeadOverlayColor(playerPed, 1, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color - SetPedHeadOverlay(playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity - SetPedHeadOverlayColor(playerPed, 2, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color - SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair - SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedHeadOverlay(playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity + SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity + SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedHeadOverlay(playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity + SetPedHeadOverlayColor(playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color + SetPedHeadOverlay(playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity + SetPedHeadOverlayColor(playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color + SetPedHeadOverlay(playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity + SetPedHeadOverlayColor(playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color + SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair + SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color if Character['ears_1'] == -1 then ClearPedProp(playerPed, 2) else - SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories + SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories end - SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt - SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts - SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso - SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals - SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants - SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes - SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask - SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof - SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain - SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag + SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt + SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts + SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso + SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals + SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants + SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes + SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask + SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof + SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain + SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag if Character['helmet_1'] == -1 then ClearPedProp(playerPed, 0) else - SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet end - SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end From 03dc3126f5dcad5cdbff43d1d68483d578e540ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Mon, 21 Aug 2017 13:25:55 +0200 Subject: [PATCH 22/52] Dont reload character inf sex don't changed --- client/main.lua | 36 ++++++++++++++++++++++++------------ 1 file changed, 24 insertions(+), 12 deletions(-) diff --git a/client/main.lua b/client/main.lua index 86194fc9..6f42bb3a 100644 --- a/client/main.lua +++ b/client/main.lua @@ -51,7 +51,7 @@ local Components = { {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } -local LastSex = 0 +local LastSex = -1 local LoadSkin = nil local LoadClothes = nil local Character = {} @@ -299,12 +299,18 @@ end) RegisterNetEvent('skinchanger:loadSkin') AddEventHandler('skinchanger:loadSkin', function(skin) - LoadSkin = skin + if skin['sex'] ~= LastSex then + + LoadSkin = skin + + if skin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true) + else + TriggerEvent('skinchanger:loadDefaultModel', false) + end - if skin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true) else - TriggerEvent('skinchanger:loadDefaultModel', false) + ApplySkin(skin) end LastSex = skin['sex'] @@ -314,15 +320,21 @@ end) RegisterNetEvent('skinchanger:loadClothes') AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) - LoadClothes = { - playerSkin = playerSkin, - clothesSkin = clothesSkin - } + if playerSkin['sex'] ~= LastSex then + + LoadClothes = { + playerSkin = playerSkin, + clothesSkin = clothesSkin + } + + if playerSkin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true) + else + TriggerEvent('skinchanger:loadDefaultModel', false) + end - if playerSkin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true) else - TriggerEvent('skinchanger:loadDefaultModel', false) + ApplySkin(playerSkin, clothesSkin) end LastSex = playerSkin['sex'] From 3dc731f2e55a6aeacdf8f030fe98a992ec7a68f0 Mon Sep 17 00:00:00 2001 From: ultratm Date: Sat, 26 Aug 2017 12:59:44 +0200 Subject: [PATCH 23/52] Add German Language --- __resource.lua | 1 + locales/de.lua | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 locales/de.lua diff --git a/__resource.lua b/__resource.lua index 472826ea..be3c0c0c 100644 --- a/__resource.lua +++ b/__resource.lua @@ -4,6 +4,7 @@ description 'SkinChanger' client_scripts { '@es_extended/locale.lua', + 'locales/de.lua', 'locales/en.lua', 'locales/fr.lua', 'config.lua', diff --git a/locales/de.lua b/locales/de.lua new file mode 100644 index 00000000..7353cec9 --- /dev/null +++ b/locales/de.lua @@ -0,0 +1,53 @@ +Locales['de'] = { + + ['sex'] = 'Geschlecht', + ['face'] = 'Gesicht', + ['skin'] = 'Skin', + ['wrinkles'] = 'Falten', + ['wrinkle_thickness'] = 'Faltendicke', + ['beard_type'] = 'Bart Typ', + ['beard_size'] = 'Bartdichte', + ['beard_color_1'] = 'Bartfarbe 1', + ['beard_color_2'] = 'Bartfarbe 2', + ['hair_1'] = 'Haare 1', + ['hair_2'] = 'Haare 2', + ['hair_color_1'] = 'Haarfarbe 1', + ['hair_color_2'] = 'Haarfarbe 2', + ['eyebrow_type'] = 'Augenbrauen Typ', + ['eyebrow_size'] = 'Augenbrauen Größe', + ['eyebrow_color_1'] = 'Augenbrauenfarbe 1', + ['eyebrow_color_2'] = 'Augenbrauenfarbe 2', + ['makeup_type'] = 'Makeup Typ', + ['makeup_thickness'] = 'Makeup dicke', + ['makeup_color_1'] = 'Makeupfarbe 1', + ['makeup_color_2'] = 'Makeupfarbe 2', + ['lipstick_type'] = 'Lippenstift Typ', + ['lipstick_thickness'] = 'Lippenstift dicke', + ['lipstick_color_1'] = 'Lippenstiffarbe 1', + ['lipstick_color_2'] = 'Lippenstiftfarbe 2', + ['ear_accessories'] = 'Ohr Accessories', + ['ear_accessories_color'] = 'Ohr Accessories Farbe', + ['tshirt_1'] = 'T-Shirt 1', + ['tshirt_2'] = 'T-Shirt 2', + ['torso_1'] = 'Torso 1', + ['torso_2'] = 'Torso 2', + ['decals_1'] = 'Tattoos 1', + ['decals_2'] = 'Tattoos 2', + ['arms'] = 'Arme', + ['pants_1'] = 'Hosen 1', + ['pants_2'] = 'Hosen 2', + ['shoes_1'] = 'Schuhe 1', + ['shoes_2'] = 'Schuhe 2', + ['mask_1'] = 'Maske 1', + ['mask_2'] = 'Maske 2', + ['bproof_1'] = 'Schusssichere Weste 1', + ['bproof_2'] = 'Schusssichere Weste 2', + ['chain_1'] = 'Kette 1', + ['chain_2'] = 'Kette 2', + ['helmet_1'] = 'Helm 1', + ['helmet_2'] = 'Helm 2', + ['glasses_1'] = 'Brille 1', + ['glasses_2'] = 'Brille 2', + ['bag'] = 'Rucksack', + ['bag_color'] = 'Rucksackfarbe', +} From 6e12cc852804b5a8aec1e635adaf44a01896ab67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Sat, 9 Sep 2017 17:18:08 +0200 Subject: [PATCH 24/52] Remove ESX dependency --- __resource.lua | 2 +- locale.lua | 21 +++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 locale.lua diff --git a/__resource.lua b/__resource.lua index be3c0c0c..33163d49 100644 --- a/__resource.lua +++ b/__resource.lua @@ -3,7 +3,7 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'SkinChanger' client_scripts { - '@es_extended/locale.lua', + 'locale.lua', 'locales/de.lua', 'locales/en.lua', 'locales/fr.lua', diff --git a/locale.lua b/locale.lua new file mode 100644 index 00000000..03e2271f --- /dev/null +++ b/locale.lua @@ -0,0 +1,21 @@ +Locales = {} + +function _(str, ...) -- Translate string + + if Locales[Config.Locale] ~= nil then + + if Locales[Config.Locale][str] ~= nil then + return string.format(Locales[Config.Locale][str], ...) + else + return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exists' + end + + else + return 'Locale [' .. Config.Locale .. '] does not exists' + end + +end + +function _U(str, ...) -- Translate string first char uppercase + return tostring(_(str, ...):gsub("^%l", string.upper)) +end From 3a52a609b9c5814f7f23cfa70190a6fd5341842b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Thu, 14 Sep 2017 23:19:09 +0200 Subject: [PATCH 25/52] Update LICENSE.txt --- LICENSE.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/LICENSE.txt b/LICENSE.txt index 30ace6a8..60fccac9 100644 --- a/LICENSE.txt +++ b/LICENSE.txt @@ -631,8 +631,8 @@ to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - {one line to give the program's name and a brief idea of what it does.} - Copyright (C) {year} {name of author} + fxserver-skinchanger + Copyright (C) 2015 Jérémie N'gadi 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 @@ -652,7 +652,7 @@ Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: - {project} Copyright (C) {year} {fullname} + fxserver-skinchanger Copyright (C) 2015 Jérémie N'gadi This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. From 4b908395cafe85bda5da403300cd611c9b72fc5b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 26 Sep 2017 21:45:41 +0200 Subject: [PATCH 26/52] feat(model loading): Add callback --- client/main.lua | 82 +++++++++++++++++++++++++++---------------------- 1 file changed, 46 insertions(+), 36 deletions(-) diff --git a/client/main.lua b/client/main.lua index 6f42bb3a..088da67c 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,31 +1,31 @@ local Components = { {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- @@ -35,20 +35,20 @@ local Components = { {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- - {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, - {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- - {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } local LastSex = -1 @@ -60,7 +60,7 @@ for i=1, #Components, 1 do Character[Components[i].name] = Components[i].value end -function LoadDefaultModel(loadMale) +function LoadDefaultModel(loadMale, cb) local playerPed = GetPlayerPed(-1) local characterModel @@ -87,6 +87,10 @@ function LoadDefaultModel(loadMale) SetModelAsNoLongerNeeded(characterModel) + if cb ~= nil then + cb() + end + TriggerEvent('skinchanger:modelLoaded') end) @@ -239,8 +243,8 @@ function ApplySkin(skin, clothes) end -AddEventHandler('skinchanger:loadDefaultModel', function(loadMale) - LoadDefaultModel(loadMale) +AddEventHandler('skinchanger:loadDefaultModel', function(loadMale, cb) + LoadDefaultModel(loadMale, cb) end) AddEventHandler('skinchanger:getData', function(cb) @@ -297,20 +301,26 @@ AddEventHandler('skinchanger:modelLoaded', function() end) RegisterNetEvent('skinchanger:loadSkin') -AddEventHandler('skinchanger:loadSkin', function(skin) +AddEventHandler('skinchanger:loadSkin', function(skin, cb) if skin['sex'] ~= LastSex then LoadSkin = skin if skin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true) + TriggerEvent('skinchanger:loadDefaultModel', true, cb) else - TriggerEvent('skinchanger:loadDefaultModel', false) + TriggerEvent('skinchanger:loadDefaultModel', false, cb) end else + ApplySkin(skin) + + if cb ~= nil then + cb() + end + end LastSex = skin['sex'] From 947bd1b9354b3edf1ac2659d82b36ab4c92fe570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20N=27gadi?= Date: Tue, 26 Sep 2017 21:47:47 +0200 Subject: [PATCH 27/52] chore(version): Add version --- __resource.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/__resource.lua b/__resource.lua index 33163d49..80d8978a 100644 --- a/__resource.lua +++ b/__resource.lua @@ -1,6 +1,8 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' -description 'SkinChanger' +description 'Skin Changer' + +version '1.0.1' client_scripts { 'locale.lua', From 5e98f6712a5fc9acc5ca2f319732cc336600dbc9 Mon Sep 17 00:00:00 2001 From: Romain Lanz Date: Sat, 30 Sep 2017 15:39:32 +0200 Subject: [PATCH 28/52] chore(coding-style): change tabs to space --- .editorconfig | 9 + __resource.lua | 14 +- client/main.lua | 510 ++++++++++++++++++++++++------------------------ locale.lua | 20 +- locales/de.lua | 101 +++++----- locales/en.lua | 101 +++++----- locales/fr.lua | 100 +++++----- 7 files changed, 432 insertions(+), 423 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..4bfca33b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,9 @@ +root = true + +[*] +indent_size = 2 +indent_style = space +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/__resource.lua b/__resource.lua index 80d8978a..f4b940b3 100644 --- a/__resource.lua +++ b/__resource.lua @@ -1,14 +1,12 @@ -resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' - description 'Skin Changer' version '1.0.1' client_scripts { - 'locale.lua', - 'locales/de.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'config.lua', - 'client/main.lua' + 'locale.lua', + 'locales/de.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'config.lua', + 'client/main.lua' } diff --git a/client/main.lua b/client/main.lua index 088da67c..1ace50fa 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,54 +1,54 @@ local Components = { - {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- - {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- - {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- - {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- - {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- - {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- - {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, - {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- - {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- - {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, componentId = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- - {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- - {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} + {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- + {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- + {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- + {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, -- + {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- + {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } local LastSex = -1 @@ -57,43 +57,43 @@ local LoadClothes = nil local Character = {} for i=1, #Components, 1 do - Character[Components[i].name] = Components[i].value + Character[Components[i].name] = Components[i].value end function LoadDefaultModel(loadMale, cb) - local playerPed = GetPlayerPed(-1) - local characterModel + local playerPed = GetPlayerPed(-1) + local characterModel - if loadMale then - characterModel = GetHashKey('mp_m_freemode_01') - else - characterModel = GetHashKey('mp_f_freemode_01'); - end + if loadMale then + characterModel = GetHashKey('mp_m_freemode_01') + else + characterModel = GetHashKey('mp_f_freemode_01'); + end - RequestModel(characterModel) + RequestModel(characterModel) - Citizen.CreateThread(function() + Citizen.CreateThread(function() - while not HasModelLoaded(characterModel) do - RequestModel(characterModel) - Citizen.Wait(0) - end + while not HasModelLoaded(characterModel) do + RequestModel(characterModel) + Citizen.Wait(0) + end - if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then - SetPlayerModel(PlayerId(), characterModel) - SetPedDefaultComponentVariation(playerPed) - end + if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then + SetPlayerModel(PlayerId(), characterModel) + SetPedDefaultComponentVariation(playerPed) + end - SetModelAsNoLongerNeeded(characterModel) + SetModelAsNoLongerNeeded(characterModel) - if cb ~= nil then - cb() - end + if cb ~= nil then + cb() + end - TriggerEvent('skinchanger:modelLoaded') + TriggerEvent('skinchanger:modelLoaded') - end) + end) end @@ -101,252 +101,252 @@ function GetMaxVals() local playerPed = GetPlayerPed(-1) - local data = { - sex = 1, - face = 45, - skin = 45, - age_1 = GetNumHeadOverlayValues(3)-1, - age_2 = 10, - beard_1 = GetNumHeadOverlayValues(1)-1, - beard_2 = 10, - beard_3 = GetNumHairColors()-1, - beard_4 = GetNumHairColors()-1, - hair_1 = GetNumberOfPedDrawableVariations(playerPed, 2) - 1, - hair_2 = GetNumberOfPedTextureVariations(playerPed, 2, Character['hair_1']) - 1, - hair_color_1 = GetNumHairColors()-1, - hair_color_2 = GetNumHairColors()-1, - eyebrows_1 = GetNumHeadOverlayValues(2)-1, - eyebrows_2 = 10, - eyebrows_3 = GetNumHairColors()-1, - eyebrows_4 = GetNumHairColors()-1, - makeup_1 = GetNumHeadOverlayValues(4)-1, - makeup_2 = 10, - makeup_3 = GetNumHairColors()-1, - makeup_4 = GetNumHairColors()-1, - lipstick_1 = GetNumHeadOverlayValues(8)-1, - lipstick_2 = 10, - lipstick_3 = GetNumHairColors()-1, - lipstick_4 = GetNumHairColors()-1, - ears_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, - ears_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['ears_1'] - 1), - tshirt_1 = GetNumberOfPedDrawableVariations(playerPed, 8) - 1, - tshirt_2 = GetNumberOfPedTextureVariations(playerPed, 8, Character['tshirt_1']) - 1, - torso_1 = GetNumberOfPedDrawableVariations(playerPed, 11) - 1, - torso_2 = GetNumberOfPedTextureVariations(playerPed, 11, Character['torso_1']) - 1, - decals_1 = GetNumberOfPedDrawableVariations(playerPed, 10) - 1, - decals_2 = GetNumberOfPedTextureVariations(playerPed, 10, Character['decals_1']) - 1, - arms = GetNumberOfPedDrawableVariations(playerPed, 3) - 1, - pants_1 = GetNumberOfPedDrawableVariations(playerPed, 4) - 1, - pants_2 = GetNumberOfPedTextureVariations(playerPed, 4, Character['pants_1']) - 1, - shoes_1 = GetNumberOfPedDrawableVariations(playerPed, 6) - 1, - shoes_2 = GetNumberOfPedTextureVariations(playerPed, 6, Character['shoes_1']) - 1, - mask_1 = GetNumberOfPedDrawableVariations(playerPed, 1) - 1, - mask_2 = GetNumberOfPedTextureVariations(playerPed, 1, Character['mask_1']) - 1, - bproof_1 = GetNumberOfPedDrawableVariations(playerPed, 9) - 1, - bproof_2 = GetNumberOfPedTextureVariations(playerPed, 9, Character['bproof_1']) - 1, - chain_1 = GetNumberOfPedDrawableVariations(playerPed, 7) - 1, - chain_2 = GetNumberOfPedTextureVariations(playerPed, 7, Character['chain_1']) - 1, - bags_1 = GetNumberOfPedDrawableVariations(playerPed, 5) - 1, - bags_2 = GetNumberOfPedTextureVariations(playerPed, 5, Character['bags_1']) - 1, - helmet_1 = GetNumberOfPedPropDrawableVariations(playerPed, 0) - 1, - helmet_2 = GetNumberOfPedPropTextureVariations(playerPed, 0, Character['helmet_1']) - 1, - glasses_1 = GetNumberOfPedPropDrawableVariations(playerPed, 1) - 1, - glasses_2 = GetNumberOfPedPropTextureVariations(playerPed, 1, Character['glasses_1'] - 1), - } + local data = { + sex = 1, + face = 45, + skin = 45, + age_1 = GetNumHeadOverlayValues(3)-1, + age_2 = 10, + beard_1 = GetNumHeadOverlayValues(1)-1, + beard_2 = 10, + beard_3 = GetNumHairColors()-1, + beard_4 = GetNumHairColors()-1, + hair_1 = GetNumberOfPedDrawableVariations(playerPed, 2) - 1, + hair_2 = GetNumberOfPedTextureVariations(playerPed, 2, Character['hair_1']) - 1, + hair_color_1 = GetNumHairColors()-1, + hair_color_2 = GetNumHairColors()-1, + eyebrows_1 = GetNumHeadOverlayValues(2)-1, + eyebrows_2 = 10, + eyebrows_3 = GetNumHairColors()-1, + eyebrows_4 = GetNumHairColors()-1, + makeup_1 = GetNumHeadOverlayValues(4)-1, + makeup_2 = 10, + makeup_3 = GetNumHairColors()-1, + makeup_4 = GetNumHairColors()-1, + lipstick_1 = GetNumHeadOverlayValues(8)-1, + lipstick_2 = 10, + lipstick_3 = GetNumHairColors()-1, + lipstick_4 = GetNumHairColors()-1, + ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, + ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['ears_1'] - 1), + tshirt_1 = GetNumberOfPedDrawableVariations (playerPed, 8) - 1, + tshirt_2 = GetNumberOfPedTextureVariations (playerPed, 8, Character['tshirt_1']) - 1, + torso_1 = GetNumberOfPedDrawableVariations (playerPed, 11) - 1, + torso_2 = GetNumberOfPedTextureVariations (playerPed, 11, Character['torso_1']) - 1, + decals_1 = GetNumberOfPedDrawableVariations (playerPed, 10) - 1, + decals_2 = GetNumberOfPedTextureVariations (playerPed, 10, Character['decals_1']) - 1, + arms = GetNumberOfPedDrawableVariations (playerPed, 3) - 1, + pants_1 = GetNumberOfPedDrawableVariations (playerPed, 4) - 1, + pants_2 = GetNumberOfPedTextureVariations (playerPed, 4, Character['pants_1']) - 1, + shoes_1 = GetNumberOfPedDrawableVariations (playerPed, 6) - 1, + shoes_2 = GetNumberOfPedTextureVariations (playerPed, 6, Character['shoes_1']) - 1, + mask_1 = GetNumberOfPedDrawableVariations (playerPed, 1) - 1, + mask_2 = GetNumberOfPedTextureVariations (playerPed, 1, Character['mask_1']) - 1, + bproof_1 = GetNumberOfPedDrawableVariations (playerPed, 9) - 1, + bproof_2 = GetNumberOfPedTextureVariations (playerPed, 9, Character['bproof_1']) - 1, + chain_1 = GetNumberOfPedDrawableVariations (playerPed, 7) - 1, + chain_2 = GetNumberOfPedTextureVariations (playerPed, 7, Character['chain_1']) - 1, + bags_1 = GetNumberOfPedDrawableVariations (playerPed, 5) - 1, + bags_2 = GetNumberOfPedTextureVariations (playerPed, 5, Character['bags_1']) - 1, + helmet_1 = GetNumberOfPedPropDrawableVariations (playerPed, 0) - 1, + helmet_2 = GetNumberOfPedPropTextureVariations (playerPed, 0, Character['helmet_1']) - 1, + glasses_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, + glasses_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['glasses_1'] - 1), + } - return data + return data end function ApplySkin(skin, clothes) - local playerPed = GetPlayerPed(-1) + local playerPed = GetPlayerPed(-1) - for k,v in pairs(skin) do - Character[k] = v - end + for k,v in pairs(skin) do + Character[k] = v + end - if clothes ~= nil then + if clothes ~= nil then - for k,v in pairs(clothes) do - if - k ~= 'sex' and - k ~= 'face' and - k ~= 'skin' and - k ~= 'age_1' and - k ~= 'age_2' and - k ~= 'beard_1' and - k ~= 'beard_2' and - k ~= 'beard_3' and - k ~= 'beard_4' and - k ~= 'hair_1' and - k ~= 'hair_2' and - k ~= 'hair_color_1' and - k ~= 'hair_color_2' and - k ~= 'eyebrows_1' and - k ~= 'eyebrows_2' and - k ~= 'eyebrows_3' and - k ~= 'eyebrows_4' and - k ~= 'makeup_1' and - k ~= 'makeup_2' and - k ~= 'makeup_3' and - k ~= 'makeup_4' and - k ~= 'lipstick_1' and - k ~= 'lipstick_2' and - k ~= 'lipstick_3' and - k ~= 'lipstick_4' - then - Character[k] = v - end - end + for k,v in pairs(clothes) do + if + k ~= 'sex' and + k ~= 'face' and + k ~= 'skin' and + k ~= 'age_1' and + k ~= 'age_2' and + k ~= 'beard_1' and + k ~= 'beard_2' and + k ~= 'beard_3' and + k ~= 'beard_4' and + k ~= 'hair_1' and + k ~= 'hair_2' and + k ~= 'hair_color_1' and + k ~= 'hair_color_2' and + k ~= 'eyebrows_1' and + k ~= 'eyebrows_2' and + k ~= 'eyebrows_3' and + k ~= 'eyebrows_4' and + k ~= 'makeup_1' and + k ~= 'makeup_2' and + k ~= 'makeup_3' and + k ~= 'makeup_4' and + k ~= 'lipstick_1' and + k ~= 'lipstick_2' and + k ~= 'lipstick_3' and + k ~= 'lipstick_4' + then + Character[k] = v + end + end - end + end - SetPedHeadBlendData(playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) + SetPedHeadBlendData (playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) - SetPedHeadOverlay(playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity - SetPedHeadOverlay(playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity - SetPedHeadOverlayColor(playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color - SetPedHeadOverlay(playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity - SetPedHeadOverlayColor(playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color - SetPedHeadOverlay(playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity - SetPedHeadOverlayColor(playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color - SetPedHeadOverlay(playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity - SetPedHeadOverlayColor(playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color - SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair - SetPedHairColor(playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedHairColor (playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedHeadOverlay (playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity + SetPedHeadOverlay (playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity + SetPedHeadOverlay (playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity + SetPedHeadOverlay (playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity + SetPedHeadOverlay (playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity + SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair + SetPedHeadOverlayColor (playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedHeadOverlayColor (playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color + SetPedHeadOverlayColor (playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color + SetPedHeadOverlayColor (playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color - if Character['ears_1'] == -1 then - ClearPedProp(playerPed, 2) - else - SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories - end + if Character['ears_1'] == -1 then + ClearPedProp(playerPed, 2) + else + SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories + end - SetPedComponentVariation(playerPed, 8, Character['tshirt_1'],Character['tshirt_2'], 2) -- Tshirt - SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts - SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso - SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals - SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants - SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes - SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask - SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof - SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain - SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag + SetPedComponentVariation(playerPed, 8, Character['tshirt_1'], Character['tshirt_2'], 2) -- Tshirt + SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts + SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso + SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals + SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants + SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes + SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask + SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof + SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain + SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag - if Character['helmet_1'] == -1 then - ClearPedProp(playerPed, 0) - else - SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet - end + if Character['helmet_1'] == -1 then + ClearPedProp(playerPed, 0) + else + SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + end - SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses + SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses end AddEventHandler('skinchanger:loadDefaultModel', function(loadMale, cb) - LoadDefaultModel(loadMale, cb) + LoadDefaultModel(loadMale, cb) end) AddEventHandler('skinchanger:getData', function(cb) - local components = json.decode(json.encode(Components)) + local components = json.decode(json.encode(Components)) - for k,v in pairs(Character) do - for i=1, #components, 1 do - if k == components[i].name then - components[i].value = v - --components[i].zoomOffset = Components[i].zoomOffset - --components[i].camOffset = Components[i].camOffset - end - end - end + for k,v in pairs(Character) do + for i=1, #components, 1 do + if k == components[i].name then + components[i].value = v + --components[i].zoomOffset = Components[i].zoomOffset + --components[i].camOffset = Components[i].camOffset + end + end + end - cb(components, GetMaxVals()) + cb(components, GetMaxVals()) end) AddEventHandler('skinchanger:change', function(key, val) - Character[key] = val + Character[key] = val - if key == 'sex' then - TriggerEvent('skinchanger:loadSkin', Character) - else - ApplySkin(Character) - end + if key == 'sex' then + TriggerEvent('skinchanger:loadSkin', Character) + else + ApplySkin(Character) + end end) AddEventHandler('skinchanger:getSkin', function(cb) - cb(Character) + cb(Character) end) AddEventHandler('skinchanger:modelLoaded', function() - ClearPedProp(GetPlayerPed(-1), 0) + ClearPedProp(GetPlayerPed(-1), 0) - if LoadSkin ~= nil then + if LoadSkin ~= nil then - ApplySkin(LoadSkin) - LoadSkin = nil + ApplySkin(LoadSkin) + LoadSkin = nil - end + end - if LoadClothes ~= nil then + if LoadClothes ~= nil then - ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) - LoadClothes = nil + ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) + LoadClothes = nil - end + end end) RegisterNetEvent('skinchanger:loadSkin') AddEventHandler('skinchanger:loadSkin', function(skin, cb) - if skin['sex'] ~= LastSex then + if skin['sex'] ~= LastSex then - LoadSkin = skin + LoadSkin = skin - if skin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true, cb) - else - TriggerEvent('skinchanger:loadDefaultModel', false, cb) - end + if skin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true, cb) + else + TriggerEvent('skinchanger:loadDefaultModel', false, cb) + end - else - - ApplySkin(skin) - - if cb ~= nil then - cb() - end + else - end + ApplySkin(skin) - LastSex = skin['sex'] + if cb ~= nil then + cb() + end + + end + + LastSex = skin['sex'] end) RegisterNetEvent('skinchanger:loadClothes') AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) - if playerSkin['sex'] ~= LastSex then + if playerSkin['sex'] ~= LastSex then - LoadClothes = { - playerSkin = playerSkin, - clothesSkin = clothesSkin - } + LoadClothes = { + playerSkin = playerSkin, + clothesSkin = clothesSkin + } - if playerSkin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true) - else - TriggerEvent('skinchanger:loadDefaultModel', false) - end + if playerSkin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true) + else + TriggerEvent('skinchanger:loadDefaultModel', false) + end - else - ApplySkin(playerSkin, clothesSkin) - end + else + ApplySkin(playerSkin, clothesSkin) + end - LastSex = playerSkin['sex'] + LastSex = playerSkin['sex'] end) diff --git a/locale.lua b/locale.lua index 03e2271f..fbabbb95 100644 --- a/locale.lua +++ b/locale.lua @@ -1,18 +1,18 @@ Locales = {} -function _(str, ...) -- Translate string +function _(str, ...) -- Translate string - if Locales[Config.Locale] ~= nil then + if Locales[Config.Locale] ~= nil then - if Locales[Config.Locale][str] ~= nil then - return string.format(Locales[Config.Locale][str], ...) - else - return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exists' - end + if Locales[Config.Locale][str] ~= nil then + return string.format(Locales[Config.Locale][str], ...) + else + return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exists' + end - else - return 'Locale [' .. Config.Locale .. '] does not exists' - end + else + return 'Locale [' .. Config.Locale .. '] does not exists' + end end diff --git a/locales/de.lua b/locales/de.lua index 7353cec9..91a5e0e3 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,53 +1,54 @@ Locales['de'] = { - ['sex'] = 'Geschlecht', - ['face'] = 'Gesicht', - ['skin'] = 'Skin', - ['wrinkles'] = 'Falten', - ['wrinkle_thickness'] = 'Faltendicke', - ['beard_type'] = 'Bart Typ', - ['beard_size'] = 'Bartdichte', - ['beard_color_1'] = 'Bartfarbe 1', - ['beard_color_2'] = 'Bartfarbe 2', - ['hair_1'] = 'Haare 1', - ['hair_2'] = 'Haare 2', - ['hair_color_1'] = 'Haarfarbe 1', - ['hair_color_2'] = 'Haarfarbe 2', - ['eyebrow_type'] = 'Augenbrauen Typ', - ['eyebrow_size'] = 'Augenbrauen Größe', - ['eyebrow_color_1'] = 'Augenbrauenfarbe 1', - ['eyebrow_color_2'] = 'Augenbrauenfarbe 2', - ['makeup_type'] = 'Makeup Typ', - ['makeup_thickness'] = 'Makeup dicke', - ['makeup_color_1'] = 'Makeupfarbe 1', - ['makeup_color_2'] = 'Makeupfarbe 2', - ['lipstick_type'] = 'Lippenstift Typ', - ['lipstick_thickness'] = 'Lippenstift dicke', - ['lipstick_color_1'] = 'Lippenstiffarbe 1', - ['lipstick_color_2'] = 'Lippenstiftfarbe 2', - ['ear_accessories'] = 'Ohr Accessories', - ['ear_accessories_color'] = 'Ohr Accessories Farbe', - ['tshirt_1'] = 'T-Shirt 1', - ['tshirt_2'] = 'T-Shirt 2', - ['torso_1'] = 'Torso 1', - ['torso_2'] = 'Torso 2', - ['decals_1'] = 'Tattoos 1', - ['decals_2'] = 'Tattoos 2', - ['arms'] = 'Arme', - ['pants_1'] = 'Hosen 1', - ['pants_2'] = 'Hosen 2', - ['shoes_1'] = 'Schuhe 1', - ['shoes_2'] = 'Schuhe 2', - ['mask_1'] = 'Maske 1', - ['mask_2'] = 'Maske 2', - ['bproof_1'] = 'Schusssichere Weste 1', - ['bproof_2'] = 'Schusssichere Weste 2', - ['chain_1'] = 'Kette 1', - ['chain_2'] = 'Kette 2', - ['helmet_1'] = 'Helm 1', - ['helmet_2'] = 'Helm 2', - ['glasses_1'] = 'Brille 1', - ['glasses_2'] = 'Brille 2', - ['bag'] = 'Rucksack', - ['bag_color'] = 'Rucksackfarbe', + ['sex'] = 'Geschlecht', + ['face'] = 'Gesicht', + ['skin'] = 'Skin', + ['wrinkles'] = 'Falten', + ['wrinkle_thickness'] = 'Faltendicke', + ['beard_type'] = 'Bart Typ', + ['beard_size'] = 'Bartdichte', + ['beard_color_1'] = 'Bartfarbe 1', + ['beard_color_2'] = 'Bartfarbe 2', + ['hair_1'] = 'Haare 1', + ['hair_2'] = 'Haare 2', + ['hair_color_1'] = 'Haarfarbe 1', + ['hair_color_2'] = 'Haarfarbe 2', + ['eyebrow_type'] = 'Augenbrauen Typ', + ['eyebrow_size'] = 'Augenbrauen Größe', + ['eyebrow_color_1'] = 'Augenbrauenfarbe 1', + ['eyebrow_color_2'] = 'Augenbrauenfarbe 2', + ['makeup_type'] = 'Makeup Typ', + ['makeup_thickness'] = 'Makeup dicke', + ['makeup_color_1'] = 'Makeupfarbe 1', + ['makeup_color_2'] = 'Makeupfarbe 2', + ['lipstick_type'] = 'Lippenstift Typ', + ['lipstick_thickness'] = 'Lippenstift dicke', + ['lipstick_color_1'] = 'Lippenstiffarbe 1', + ['lipstick_color_2'] = 'Lippenstiftfarbe 2', + ['ear_accessories'] = 'Ohr Accessories', + ['ear_accessories_color'] = 'Ohr Accessories Farbe', + ['tshirt_1'] = 'T-Shirt 1', + ['tshirt_2'] = 'T-Shirt 2', + ['torso_1'] = 'Torso 1', + ['torso_2'] = 'Torso 2', + ['decals_1'] = 'Tattoos 1', + ['decals_2'] = 'Tattoos 2', + ['arms'] = 'Arme', + ['pants_1'] = 'Hosen 1', + ['pants_2'] = 'Hosen 2', + ['shoes_1'] = 'Schuhe 1', + ['shoes_2'] = 'Schuhe 2', + ['mask_1'] = 'Maske 1', + ['mask_2'] = 'Maske 2', + ['bproof_1'] = 'Schusssichere Weste 1', + ['bproof_2'] = 'Schusssichere Weste 2', + ['chain_1'] = 'Kette 1', + ['chain_2'] = 'Kette 2', + ['helmet_1'] = 'Helm 1', + ['helmet_2'] = 'Helm 2', + ['glasses_1'] = 'Brille 1', + ['glasses_2'] = 'Brille 2', + ['bag'] = 'Rucksack', + ['bag_color'] = 'Rucksackfarbe', + } diff --git a/locales/en.lua b/locales/en.lua index b3eee58b..400ab2f2 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,53 +1,54 @@ Locales['en'] = { - ['sex'] = 'sex', - ['face'] = 'face', - ['skin'] = 'skin', - ['wrinkles'] = 'wrinkles', - ['wrinkle_thickness'] = 'wrinkle thickness', - ['beard_type'] = 'beard type', - ['beard_size'] = 'beard size', - ['beard_color_1'] = 'beard color 1', - ['beard_color_2'] = 'beard color 2', - ['hair_1'] = 'hair 1', - ['hair_2'] = 'hair 2', - ['hair_color_1'] = 'hair color 1', - ['hair_color_2'] = 'hair color 2', - ['eyebrow_type'] = 'eyebrow type', - ['eyebrow_size'] = 'eyebrow size', - ['eyebrow_color_1'] = 'eyebrow color 1', - ['eyebrow_color_2'] = 'eyebrow color 2', - ['makeup_type'] = 'makeup type', - ['makeup_thickness'] = 'makeup thickness', - ['makeup_color_1'] = 'makeup color 1', - ['makeup_color_2'] = 'makeup color 2', - ['lipstick_type'] = 'lipstick type', - ['lipstick_thickness'] = 'lipstick thickness', - ['lipstick_color_1'] = 'lipstick color 1', - ['lipstick_color_2'] = 'lipstick color 2', - ['ear_accessories'] = 'ear accessories', - ['ear_accessories_color'] = 'ear accessories color', - ['tshirt_1'] = 't-Shirt 1', - ['tshirt_2'] = 't-Shirt 2', - ['torso_1'] = 'torso 1', - ['torso_2'] = 'torso 2', - ['decals_1'] = 'decals 1', - ['decals_2'] = 'decals 2', - ['arms'] = 'arms', - ['pants_1'] = 'pants 1', - ['pants_2'] = 'pants 2', - ['shoes_1'] = 'shoes 1', - ['shoes_2'] = 'shoes 2', - ['mask_1'] = 'mask 1', - ['mask_2'] = 'mask 2', - ['bproof_1'] = 'bulletproof vest 1', - ['bproof_2'] = 'bulletproof vest 2', - ['chain_1'] = 'chain 1', - ['chain_2'] = 'chain 2', - ['helmet_1'] = 'helmet 1', - ['helmet_2'] = 'helmet 2', - ['glasses_1'] = 'glasses 1', - ['glasses_2'] = 'glasses 2', - ['bag'] = 'bag', - ['bag_color'] = 'bag color', + ['sex'] = 'sex', + ['face'] = 'face', + ['skin'] = 'skin', + ['wrinkles'] = 'wrinkles', + ['wrinkle_thickness'] = 'wrinkle thickness', + ['beard_type'] = 'beard type', + ['beard_size'] = 'beard size', + ['beard_color_1'] = 'beard color 1', + ['beard_color_2'] = 'beard color 2', + ['hair_1'] = 'hair 1', + ['hair_2'] = 'hair 2', + ['hair_color_1'] = 'hair color 1', + ['hair_color_2'] = 'hair color 2', + ['eyebrow_type'] = 'eyebrow type', + ['eyebrow_size'] = 'eyebrow size', + ['eyebrow_color_1'] = 'eyebrow color 1', + ['eyebrow_color_2'] = 'eyebrow color 2', + ['makeup_type'] = 'makeup type', + ['makeup_thickness'] = 'makeup thickness', + ['makeup_color_1'] = 'makeup color 1', + ['makeup_color_2'] = 'makeup color 2', + ['lipstick_type'] = 'lipstick type', + ['lipstick_thickness'] = 'lipstick thickness', + ['lipstick_color_1'] = 'lipstick color 1', + ['lipstick_color_2'] = 'lipstick color 2', + ['ear_accessories'] = 'ear accessories', + ['ear_accessories_color'] = 'ear accessories color', + ['tshirt_1'] = 't-Shirt 1', + ['tshirt_2'] = 't-Shirt 2', + ['torso_1'] = 'torso 1', + ['torso_2'] = 'torso 2', + ['decals_1'] = 'decals 1', + ['decals_2'] = 'decals 2', + ['arms'] = 'arms', + ['pants_1'] = 'pants 1', + ['pants_2'] = 'pants 2', + ['shoes_1'] = 'shoes 1', + ['shoes_2'] = 'shoes 2', + ['mask_1'] = 'mask 1', + ['mask_2'] = 'mask 2', + ['bproof_1'] = 'bulletproof vest 1', + ['bproof_2'] = 'bulletproof vest 2', + ['chain_1'] = 'chain 1', + ['chain_2'] = 'chain 2', + ['helmet_1'] = 'helmet 1', + ['helmet_2'] = 'helmet 2', + ['glasses_1'] = 'glasses 1', + ['glasses_2'] = 'glasses 2', + ['bag'] = 'bag', + ['bag_color'] = 'bag color', + } diff --git a/locales/fr.lua b/locales/fr.lua index 61cec30c..d989643b 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -1,54 +1,54 @@ Locales['fr'] = { - ['sex'] = 'sexe', - ['face'] = 'visage', - ['skin'] = 'peau', - ['wrinkles'] = 'rides', - ['wrinkle_thickness'] = 'épaisseur rides', - ['beard_type'] = 'type barbe', - ['beard_size'] = 'taille barbe', - ['beard_color_1'] = 'couleur barbe 1', - ['beard_color_2'] = 'couleur barbe 2', - ['hair_1'] = 'cheveux 1', - ['hair_2'] = 'cheveux 2', - ['hair_color_1'] = 'couleur cheveux 1', - ['hair_color_2'] = 'couleur cheveux 2', - ['eyebrow_type'] = 'type sourcils', - ['eyebrow_size'] = 'taille sourcils', - ['eyebrow_color_1'] = 'couleur sourcils 1', - ['eyebrow_color_2'] = 'couleur sourcils 2', - ['makeup_type'] = 'type maquillage', - ['makeup_thickness'] = 'épaisseur maquillage', - ['makeup_color_1'] = 'couleur maquillage 1', - ['makeup_color_2'] = 'couleur maquillage 2', - ['lipstick_type'] = 'type lipstick', - ['lipstick_thickness'] = 'épaisseur lipstick', - ['lipstick_color_1'] = 'couleur lipstick 1', - ['lipstick_color_2'] = 'couleur lipstick 2', - ['ear_accessories'] = 'accessoire oreilles', - ['ear_accessories_color'] = 'couleur accessoire', - ['tshirt_1'] = 't-Shirt 1', - ['tshirt_2'] = 't-Shirt 2', - ['torso_1'] = 'torse 1', - ['torso_2'] = 'torse 2', - ['decals_1'] = 'calques 1', - ['decals_2'] = 'calques 2', - ['arms'] = 'bras', - ['pants_1'] = 'jambes 1', - ['pants_2'] = 'jambes 2', - ['shoes_1'] = 'chaussures 1', - ['shoes_2'] = 'chaussures 2', - ['mask_1'] = 'masque 1', - ['mask_2'] = 'masque 2', - ['bproof_1'] = 'gilet pare-balle 1', - ['bproof_2'] = 'gilet pare-balle 2', - ['chain_1'] = 'chaine 1', - ['chain_2'] = 'chaine 2', - ['helmet_1'] = 'casque 1', - ['helmet_2'] = 'casque 2', - ['glasses_1'] = 'lunettes 1', - ['glasses_2'] = 'lunettes 2', - ['bag'] = 'sac', - ['bag_color'] = 'couleur sac', + ['sex'] = 'sexe', + ['face'] = 'visage', + ['skin'] = 'peau', + ['wrinkles'] = 'rides', + ['wrinkle_thickness'] = 'épaisseur rides', + ['beard_type'] = 'type barbe', + ['beard_size'] = 'taille barbe', + ['beard_color_1'] = 'couleur barbe 1', + ['beard_color_2'] = 'couleur barbe 2', + ['hair_1'] = 'cheveux 1', + ['hair_2'] = 'cheveux 2', + ['hair_color_1'] = 'couleur cheveux 1', + ['hair_color_2'] = 'couleur cheveux 2', + ['eyebrow_type'] = 'type sourcils', + ['eyebrow_size'] = 'taille sourcils', + ['eyebrow_color_1'] = 'couleur sourcils 1', + ['eyebrow_color_2'] = 'couleur sourcils 2', + ['makeup_type'] = 'type maquillage', + ['makeup_thickness'] = 'épaisseur maquillage', + ['makeup_color_1'] = 'couleur maquillage 1', + ['makeup_color_2'] = 'couleur maquillage 2', + ['lipstick_type'] = 'type lipstick', + ['lipstick_thickness'] = 'épaisseur lipstick', + ['lipstick_color_1'] = 'couleur lipstick 1', + ['lipstick_color_2'] = 'couleur lipstick 2', + ['ear_accessories'] = 'accessoire oreilles', + ['ear_accessories_color'] = 'couleur accessoire', + ['tshirt_1'] = 't-Shirt 1', + ['tshirt_2'] = 't-Shirt 2', + ['torso_1'] = 'torse 1', + ['torso_2'] = 'torse 2', + ['decals_1'] = 'calques 1', + ['decals_2'] = 'calques 2', + ['arms'] = 'bras', + ['pants_1'] = 'jambes 1', + ['pants_2'] = 'jambes 2', + ['shoes_1'] = 'chaussures 1', + ['shoes_2'] = 'chaussures 2', + ['mask_1'] = 'masque 1', + ['mask_2'] = 'masque 2', + ['bproof_1'] = 'gilet pare-balle 1', + ['bproof_2'] = 'gilet pare-balle 2', + ['chain_1'] = 'chaine 1', + ['chain_2'] = 'chaine 2', + ['helmet_1'] = 'casque 1', + ['helmet_2'] = 'casque 2', + ['glasses_1'] = 'lunettes 1', + ['glasses_2'] = 'lunettes 2', + ['bag'] = 'sac', + ['bag_color'] = 'couleur sac', } From a842c13832e92a9e563dbab8f65b8faa27a586b0 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Thu, 3 May 2018 19:47:13 +0200 Subject: [PATCH 29/52] Added Swedish langauge, fixed manifest, updated README --- README.md | 41 ++++++++++++++++------ __resource.lua | 17 +++++---- client/main.lua | 92 ++++++++++++++++++++++++------------------------- config.lua | 2 +- locales/de.lua | 2 -- locales/en.lua | 2 -- locales/fr.lua | 2 -- locales/sv.lua | 52 ++++++++++++++++++++++++++++ 8 files changed, 140 insertions(+), 70 deletions(-) create mode 100644 locales/sv.lua diff --git a/README.md b/README.md index baf78590..ad44e45f 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,32 @@ -# fxserver-skinchanger -FXServer SkinChanger +# skinchanger -[INSTALLATION] +## Download & Installation -1) CD in your resources folder -2) Clone the repository +### Using [fvm](https://github.com/qlaffont/fvm-installer) ``` -git clone https://github.com/FXServer-ESX/fxserver-skinchanger skinchanger +fvm install --save --folder=esx esx-org/skinchanger ``` -3) Add this in your server.cfg : + +### Using Git +``` +cd resources +git clone https://github.com/ESX-Org/skinchanger [esx]/skinchanger +``` + +### Manually +- Download https://github.com/ESX-Org/skinchanger/archive/master.zip +- Put it in the `[esx]` directory + +## Installation +- Add this to your `server.cfg`: ``` start skinchanger ``` -[USAGE] +### Usage -``` +```lua local isMale = true local skin = { @@ -76,5 +86,16 @@ end) TriggerEvent('skinchanger:getSkin', function(skin) print(json.encode(skin)) end) - ``` + +# Legal +### License +skinchanger - make your own skin! + +Copyright (C) 2015-2018 Jérémie N'gadi + +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 http://www.gnu.org/licenses/. diff --git a/__resource.lua b/__resource.lua index f4b940b3..fdbbe4e1 100644 --- a/__resource.lua +++ b/__resource.lua @@ -1,12 +1,15 @@ +resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' + description 'Skin Changer' -version '1.0.1' +version '1.0.2' client_scripts { - 'locale.lua', - 'locales/de.lua', - 'locales/en.lua', - 'locales/fr.lua', - 'config.lua', - 'client/main.lua' + 'locale.lua', + 'locales/de.lua', + 'locales/en.lua', + 'locales/fr.lua', + 'locales/sv.lua', + 'config.lua', + 'client/main.lua' } diff --git a/client/main.lua b/client/main.lua index 1ace50fa..ce0161f3 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,52 +1,52 @@ local Components = { - {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, -- - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, -- - {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, -- - {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, -- - {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, -- - {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, -- - {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, -- + {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, + {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, + {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, -- - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, -- - {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, -- - {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, -- - {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, -- - {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, -- - {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, -- - {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, -- + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, + {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, + {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} } diff --git a/config.lua b/config.lua index 56a8b5e9..5290495d 100644 --- a/config.lua +++ b/config.lua @@ -1,2 +1,2 @@ Config = {} -Config.Locale = 'fr' +Config.Locale = 'en' diff --git a/locales/de.lua b/locales/de.lua index 91a5e0e3..ed70e862 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,5 +1,4 @@ Locales['de'] = { - ['sex'] = 'Geschlecht', ['face'] = 'Gesicht', ['skin'] = 'Skin', @@ -50,5 +49,4 @@ Locales['de'] = { ['glasses_2'] = 'Brille 2', ['bag'] = 'Rucksack', ['bag_color'] = 'Rucksackfarbe', - } diff --git a/locales/en.lua b/locales/en.lua index 400ab2f2..902d0990 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,5 +1,4 @@ Locales['en'] = { - ['sex'] = 'sex', ['face'] = 'face', ['skin'] = 'skin', @@ -50,5 +49,4 @@ Locales['en'] = { ['glasses_2'] = 'glasses 2', ['bag'] = 'bag', ['bag_color'] = 'bag color', - } diff --git a/locales/fr.lua b/locales/fr.lua index d989643b..bc931a4e 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -1,5 +1,4 @@ Locales['fr'] = { - ['sex'] = 'sexe', ['face'] = 'visage', ['skin'] = 'peau', @@ -50,5 +49,4 @@ Locales['fr'] = { ['glasses_2'] = 'lunettes 2', ['bag'] = 'sac', ['bag_color'] = 'couleur sac', - } diff --git a/locales/sv.lua b/locales/sv.lua new file mode 100644 index 00000000..7f4e7b65 --- /dev/null +++ b/locales/sv.lua @@ -0,0 +1,52 @@ +Locales['en'] = { + ['sex'] = 'kön', + ['face'] = 'ansikte', + ['skin'] = 'hud', + ['wrinkles'] = 'rynkor', + ['wrinkle_thickness'] = 'rynk tjocklek', + ['beard_type'] = 'skäggtyp', + ['beard_size'] = 'skäggstorlek', + ['beard_color_1'] = 'skägg färg 1', + ['beard_color_2'] = 'skägg färg 2', + ['hair_1'] = 'hår 1', + ['hair_2'] = 'hår 2', + ['hair_color_1'] = 'hårfärg 1', + ['hair_color_2'] = 'hårfärg 2', + ['eyebrow_type'] = 'ögonbryn typ', + ['eyebrow_size'] = 'ögonbryn storlek', + ['eyebrow_color_1'] = 'ögonbryn färg 1', + ['eyebrow_color_2'] = 'ögonbryn färg 2', + ['makeup_type'] = 'smink typ', + ['makeup_thickness'] = 'smink tjocklek', + ['makeup_color_1'] = 'smink färg 1', + ['makeup_color_2'] = 'smink färg 2', + ['lipstick_type'] = 'läppstiftstyp', + ['lipstick_thickness'] = 'läppstjocklek', + ['lipstick_color_1'] = 'läppstift färg 1', + ['lipstick_color_2'] = 'läppstift färg 2', + ['ear_accessories'] = 'öron tillbehör', + ['ear_accessories_color'] = 'öron tillbehörs färg', + ['tshirt_1'] = 't-shirt 1', + ['tshirt_2'] = 't-shirt 2', + ['torso_1'] = 'kropp 1', + ['torso_2'] = 'kropp 2', + ['decals_1'] = 'dekaler 1', + ['decals_2'] = 'dekaler 2', + ['arms'] = 'armar', + ['pants_1'] = 'byxor 1', + ['pants_2'] = 'byxor 2', + ['shoes_1'] = 'skor 1', + ['shoes_2'] = 'skor 2', + ['mask_1'] = 'mask 1', + ['mask_2'] = 'mask 2', + ['bproof_1'] = 'skottsäker väst 1', + ['bproof_2'] = 'skottsäker väst 2', + ['chain_1'] = 'kedja 1', + ['chain_2'] = 'kedja 2', + ['helmet_1'] = 'hjälm 1', + ['helmet_2'] = 'hjälm 2', + ['glasses_1'] = 'glasögon 1', + ['glasses_2'] = 'glasögon 2', + ['bag'] = 'väska', + ['bag_color'] = 'väska färg', +} From f7a17db3d9c90f5a0791bd55fcd6be3b21100547 Mon Sep 17 00:00:00 2001 From: Vanheden <33155577+Vanheden@users.noreply.github.com> Date: Sat, 5 May 2018 13:09:13 +0200 Subject: [PATCH 30/52] Fixed en > sv --- locales/sv.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/locales/sv.lua b/locales/sv.lua index 7f4e7b65..673f455f 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -1,4 +1,4 @@ -Locales['en'] = { +Locales['sv'] = { ['sex'] = 'kön', ['face'] = 'ansikte', ['skin'] = 'hud', From 9e89b8056eea89a99f2336d37bb8b396666c5a5b Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Tue, 15 May 2018 16:47:51 +0200 Subject: [PATCH 31/52] Added Brazilian language Co-Authored-By: renildomarcio --- __resource.lua | 1 + locales/br.lua | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 locales/br.lua diff --git a/__resource.lua b/__resource.lua index fdbbe4e1..9c210416 100644 --- a/__resource.lua +++ b/__resource.lua @@ -6,6 +6,7 @@ version '1.0.2' client_scripts { 'locale.lua', + 'locales/br.lua', 'locales/de.lua', 'locales/en.lua', 'locales/fr.lua', diff --git a/locales/br.lua b/locales/br.lua new file mode 100644 index 00000000..350a5cbd --- /dev/null +++ b/locales/br.lua @@ -0,0 +1,52 @@ +Locales['br'] = { + ['sex'] = 'sexo', + ['face'] = 'rosto', + ['skin'] = 'pele', + ['wrinkles'] = 'rugas', + ['wrinkle_thickness'] = 'espessura das rugas', + ['beard_type'] = 'tipo de barba', + ['beard_size'] = 'tamanho da barba', + ['beard_color_1'] = 'cor da barba 1', + ['beard_color_2'] = 'cor da barba 2', + ['hair_1'] = 'cabelo 1', + ['hair_2'] = 'cabelo 2', + ['hair_color_1'] = 'cor do cabelo 1', + ['hair_color_2'] = 'cor do cabelo 2', + ['eyebrow_type'] = 'tipo de sobrancelha', + ['eyebrow_size'] = 'tamanho da sobrancelha', + ['eyebrow_color_1'] = 'cor da sobrancelha 1', + ['eyebrow_color_2'] = 'cor da sobrancelha 2', + ['makeup_type'] = 'tipo de maquiagem', + ['makeup_thickness'] = 'espessura da maquiagem', + ['makeup_color_1'] = 'cor da maquiagem 1', + ['makeup_color_2'] = 'cor da maquiagem 2', + ['lipstick_type'] = 'tipo de batom', + ['lipstick_thickness'] = 'espessura do batom', + ['lipstick_color_1'] = 'cor do batom 1', + ['lipstick_color_2'] = 'cor do batom 2', + ['ear_accessories'] = 'acessorios para orelha', + ['ear_accessories_color'] = 'cor dos acessorios', + ['tshirt_1'] = 'camiseta 1', + ['tshirt_2'] = 'camiseta 2', + ['torso_1'] = 'tronco 1', + ['torso_2'] = 'tronco 2', + ['decals_1'] = 'adesivos 1', + ['decals_2'] = 'adesivos 2', + ['arms'] = 'braços', + ['pants_1'] = 'calça 1', + ['pants_2'] = 'calça 2', + ['shoes_1'] = 'calçados 1', + ['shoes_2'] = 'calçados 2', + ['mask_1'] = 'máscara 1', + ['mask_2'] = 'máscara 2', + ['bproof_1'] = 'colete 1', + ['bproof_2'] = 'colete 2', + ['chain_1'] = 'acessórios pescoço 1', + ['chain_2'] = 'acessórios pescoço 2', + ['helmet_1'] = 'capacete 1', + ['helmet_2'] = 'capacete 2', + ['glasses_1'] = 'óculos 1', + ['glasses_2'] = 'óculos 2', + ['bag'] = 'mochilas', + ['bag_color'] = 'cor das mochilas', +} \ No newline at end of file From 6820d4cee6b0c4662172542bcd756e459fdb8db1 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Wed, 6 Jun 2018 19:38:55 +0200 Subject: [PATCH 32/52] Minor changes --- README.md | 5 ++--- client/main.lua | 8 ++++---- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ad44e45f..8b52d521 100644 --- a/README.md +++ b/README.md @@ -4,18 +4,17 @@ ### Using [fvm](https://github.com/qlaffont/fvm-installer) ``` -fvm install --save --folder=esx esx-org/skinchanger +fvm install --save esx-org/skinchanger ``` ### Using Git ``` cd resources -git clone https://github.com/ESX-Org/skinchanger [esx]/skinchanger +git clone https://github.com/ESX-Org/skinchanger skinchanger ``` ### Manually - Download https://github.com/ESX-Org/skinchanger/archive/master.zip -- Put it in the `[esx]` directory ## Installation - Add this to your `server.cfg`: diff --git a/client/main.lua b/client/main.lua index ce0161f3..e28a9ad3 100644 --- a/client/main.lua +++ b/client/main.lua @@ -60,15 +60,15 @@ for i=1, #Components, 1 do Character[Components[i].name] = Components[i].value end -function LoadDefaultModel(loadMale, cb) +function LoadDefaultModel(malePed, cb) local playerPed = GetPlayerPed(-1) - local characterModel + local characterModel - if loadMale then + if malePed then characterModel = GetHashKey('mp_m_freemode_01') else - characterModel = GetHashKey('mp_f_freemode_01'); + characterModel = GetHashKey('mp_f_freemode_01') end RequestModel(characterModel) From f9756c682141c565ff3e0bb09bc78fa1685b799f Mon Sep 17 00:00:00 2001 From: AdrineX Date: Tue, 12 Jun 2018 20:28:31 +0300 Subject: [PATCH 33/52] add Finnish lang... --- __resource.lua | 1 + locales/fi.lua | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) create mode 100644 locales/fi.lua diff --git a/__resource.lua b/__resource.lua index 9c210416..eff522fd 100644 --- a/__resource.lua +++ b/__resource.lua @@ -9,6 +9,7 @@ client_scripts { 'locales/br.lua', 'locales/de.lua', 'locales/en.lua', + 'locales/fi.lua', 'locales/fr.lua', 'locales/sv.lua', 'config.lua', diff --git a/locales/fi.lua b/locales/fi.lua new file mode 100644 index 00000000..825c9590 --- /dev/null +++ b/locales/fi.lua @@ -0,0 +1,52 @@ +Locales['fi'] = { + ['sex'] = 'sukupuoli', + ['face'] = 'kasvot', + ['skin'] = 'iho', + ['wrinkles'] = 'rypyt', + ['wrinkle_thickness'] = 'ryppyjen paksuus', + ['beard_type'] = 'parta tyyli', + ['beard_size'] = 'parran koko', + ['beard_color_1'] = 'parran väri 1', + ['beard_color_2'] = 'parran väri 2', + ['hair_1'] = 'hiukset 1', + ['hair_2'] = 'hiukset 2', + ['hair_color_1'] = 'hiuksien väri 1', + ['hair_color_2'] = 'hiuksien väri 2', + ['eyebrow_type'] = 'kulmakarva tyyli', + ['eyebrow_size'] = 'kulmakarvojen tiheys', + ['eyebrow_color_1'] = 'kulmakarvojen väri 1', + ['eyebrow_color_2'] = 'kulmakarvojen väri 2', + ['makeup_type'] = 'meikki tyyli', + ['makeup_thickness'] = 'meikin paksuus', + ['makeup_color_1'] = 'meikin väri 1', + ['makeup_color_2'] = 'meikin väri 2', + ['lipstick_type'] = 'huulipuna tyyli', + ['lipstick_thickness'] = 'huulipunan paksuus', + ['lipstick_color_1'] = 'huulipunan väri 1', + ['lipstick_color_2'] = 'huulipunan väri 2', + ['ear_accessories'] = 'korvakorut', + ['ear_accessories_color'] = 'korvakorujen väri', + ['tshirt_1'] = 't-Paita 1', + ['tshirt_2'] = 't-Paita 2', + ['torso_1'] = 'torso 1', + ['torso_2'] = 'torso 2', + ['decals_1'] = 'kerros 1', + ['decals_2'] = 'kerros 2', + ['arms'] = 'kädet', + ['pants_1'] = 'housut 1', + ['pants_2'] = 'housut 2', + ['shoes_1'] = 'kengät 1', + ['shoes_2'] = 'kengät 2', + ['mask_1'] = 'maski 1', + ['mask_2'] = 'maski 2', + ['bproof_1'] = 'luotiliivi 1', + ['bproof_2'] = 'luotiliivi 2', + ['chain_1'] = 'korut 1', + ['chain_2'] = 'korut 2', + ['helmet_1'] = 'kypärät 1', + ['helmet_2'] = 'kypärät 2', + ['glasses_1'] = 'lasit 1', + ['glasses_2'] = 'lasit 2', + ['bag'] = 'reput', + ['bag_color'] = 'repun väri', +} From e83a17de60a817e06b9f4905b8ccb2befab4f383 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Wed, 4 Jul 2018 20:13:40 +0200 Subject: [PATCH 34/52] Re-sorted component list --- README.md | 1 + client/main.lua | 42 +++++++++++++++++++++--------------------- 2 files changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index 8b52d521..cdff521a 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,7 @@ TriggerEvent('skinchanger:loadSkin', skin) -- you can also load only some components : TriggerEvent('skinchanger:loadSkin', { + sex = 0, beard_1 = 0, beard_2 = 0, }) diff --git a/client/main.lua b/client/main.lua index e28a9ad3..df3b3ef9 100644 --- a/client/main.lua +++ b/client/main.lua @@ -2,30 +2,10 @@ local Components = { {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, @@ -48,7 +28,27 @@ local Components = { {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'} + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'}, + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65} } local LastSex = -1 From 8a98268970a3c83fb35694059f13f0a02301f195 Mon Sep 17 00:00:00 2001 From: nearbyplayer Date: Fri, 10 Aug 2018 00:56:54 -0400 Subject: [PATCH 35/52] Repo Update --- .editorconfig | 8 ++++---- LICENSE.txt => LICENSE | 0 2 files changed, 4 insertions(+), 4 deletions(-) rename LICENSE.txt => LICENSE (100%) diff --git a/.editorconfig b/.editorconfig index 4bfca33b..9b425256 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,9 +1,9 @@ root = true [*] -indent_size = 2 -indent_style = space -end_of_line = lf +indent_size = 4 +indent_style = tab +end_of_line = crlf charset = utf-8 trim_trailing_whitespace = true -insert_final_newline = true +insert_final_newline = true \ No newline at end of file diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE From e6571d7eb8eee18a1c0cb9a5212670d011de6324 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Tue, 21 Aug 2018 21:22:40 +0200 Subject: [PATCH 36/52] Typo fix --- locale.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale.lua b/locale.lua index fbabbb95..d98f2015 100644 --- a/locale.lua +++ b/locale.lua @@ -7,11 +7,11 @@ function _(str, ...) -- Translate string if Locales[Config.Locale][str] ~= nil then return string.format(Locales[Config.Locale][str], ...) else - return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exists' + return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist' end else - return 'Locale [' .. Config.Locale .. '] does not exists' + return 'Locale [' .. Config.Locale .. '] does not exist' end end From 4f6a40199d8c59d8d401826e739ed43de11d8947 Mon Sep 17 00:00:00 2001 From: Delduwaht <33182571+LuaDeldu@users.noreply.github.com> Date: Mon, 24 Sep 2018 17:50:00 +0200 Subject: [PATCH 37/52] Added more ped components (#23) - 4 tabs indent - add Polish translation (from deviljin112) - add more components (eyes color / arms 2 / watches / bracelets / blemishes / ageing / blush / complexion / sun damages / freckles / chest hair / body blemishes) - increment version --- __resource.lua | 3 +- client/main.lua | 602 +++++++++++++++++++++++++++--------------------- locale.lua | 20 +- locales/br.lua | 26 ++- locales/de.lua | 124 ++++++---- locales/en.lua | 24 ++ locales/fi.lua | 24 ++ locales/fr.lua | 24 ++ locales/pl.lua | 76 ++++++ locales/sv.lua | 24 ++ 10 files changed, 627 insertions(+), 320 deletions(-) create mode 100644 locales/pl.lua diff --git a/__resource.lua b/__resource.lua index eff522fd..c11c3fec 100644 --- a/__resource.lua +++ b/__resource.lua @@ -2,7 +2,7 @@ resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' description 'Skin Changer' -version '1.0.2' +version '1.0.3' client_scripts { 'locale.lua', @@ -11,6 +11,7 @@ client_scripts { 'locales/en.lua', 'locales/fi.lua', 'locales/fr.lua', + 'locales/pl.lua', 'locales/sv.lua', 'config.lua', 'client/main.lua' diff --git a/client/main.lua b/client/main.lua index df3b3ef9..8fbd1c69 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,352 +1,438 @@ local Components = { - {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, - {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, - {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, - {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, - {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, - {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, - {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, - {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, - {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, - {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, - {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, - {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'}, - {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, - {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65} + {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, + {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('arms_2'), name = 'arms_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, + {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, + {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, + {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, + {label = _U('watches_1'), name = 'watches_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('watches_2'), name = 'watches_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'watches_1'}, + {label = _U('bracelets_1'), name = 'bracelets_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bracelets_2'), name = 'bracelets_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bracelets_1'}, + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'}, + {label = _U('eye_color'), name = 'eye_color', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('makeup_color_2'), name = 'makeup_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_type'), name = 'lipstick_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, + {label = _U('chest_hair'), name = 'chest_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('chest_hair_1'), name = 'chest_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('chest_color'), name = 'chest_3', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bodyb'), name = 'bodyb_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bodyb_size'), name = 'bodyb_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('blemishes'), name = 'blemishes_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('blemishes_size'), name = 'blemishes_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('blush'), name = 'blush_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('blush_1'), name = 'blush_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('blush_color'), name = 'blush_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('complexion'), name = 'complexion_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('complexion_1'), name = 'complexion_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('sun'), name = 'sun_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('sun_1'), name = 'sun_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('freckles'), name = 'moles_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('freckles_1'), name = 'moles_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_type'), name = 'beard_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_size'), name = 'beard_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_1'), name = 'beard_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('beard_color_2'), name = 'beard_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65} } -local LastSex = -1 -local LoadSkin = nil -local LoadClothes = nil -local Character = {} +local LastSex = -1 +local LoadSkin = nil +local LoadClothes = nil +local Character = {} for i=1, #Components, 1 do - Character[Components[i].name] = Components[i].value + Character[Components[i].name] = Components[i].value end function LoadDefaultModel(malePed, cb) - local playerPed = GetPlayerPed(-1) - local characterModel + local playerPed = PlayerPedId() + local characterModel - if malePed then - characterModel = GetHashKey('mp_m_freemode_01') - else - characterModel = GetHashKey('mp_f_freemode_01') - end + if malePed then + characterModel = GetHashKey('mp_m_freemode_01') + else + characterModel = GetHashKey('mp_f_freemode_01') + end - RequestModel(characterModel) + RequestModel(characterModel) - Citizen.CreateThread(function() + Citizen.CreateThread(function() - while not HasModelLoaded(characterModel) do - RequestModel(characterModel) - Citizen.Wait(0) - end + while not HasModelLoaded(characterModel) do + RequestModel(characterModel) + Citizen.Wait(0) + end - if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then - SetPlayerModel(PlayerId(), characterModel) - SetPedDefaultComponentVariation(playerPed) - end + if IsModelInCdimage(characterModel) and IsModelValid(characterModel) then + SetPlayerModel(PlayerId(), characterModel) + SetPedDefaultComponentVariation(playerPed) + end - SetModelAsNoLongerNeeded(characterModel) + SetModelAsNoLongerNeeded(characterModel) - if cb ~= nil then - cb() - end + if cb ~= nil then + cb() + end - TriggerEvent('skinchanger:modelLoaded') + TriggerEvent('skinchanger:modelLoaded') - end) + end) end function GetMaxVals() - local playerPed = GetPlayerPed(-1) + local playerPed = PlayerPedId() - local data = { - sex = 1, - face = 45, - skin = 45, - age_1 = GetNumHeadOverlayValues(3)-1, - age_2 = 10, - beard_1 = GetNumHeadOverlayValues(1)-1, - beard_2 = 10, - beard_3 = GetNumHairColors()-1, - beard_4 = GetNumHairColors()-1, - hair_1 = GetNumberOfPedDrawableVariations(playerPed, 2) - 1, - hair_2 = GetNumberOfPedTextureVariations(playerPed, 2, Character['hair_1']) - 1, - hair_color_1 = GetNumHairColors()-1, - hair_color_2 = GetNumHairColors()-1, - eyebrows_1 = GetNumHeadOverlayValues(2)-1, - eyebrows_2 = 10, - eyebrows_3 = GetNumHairColors()-1, - eyebrows_4 = GetNumHairColors()-1, - makeup_1 = GetNumHeadOverlayValues(4)-1, - makeup_2 = 10, - makeup_3 = GetNumHairColors()-1, - makeup_4 = GetNumHairColors()-1, - lipstick_1 = GetNumHeadOverlayValues(8)-1, - lipstick_2 = 10, - lipstick_3 = GetNumHairColors()-1, - lipstick_4 = GetNumHairColors()-1, - ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, - ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['ears_1'] - 1), - tshirt_1 = GetNumberOfPedDrawableVariations (playerPed, 8) - 1, - tshirt_2 = GetNumberOfPedTextureVariations (playerPed, 8, Character['tshirt_1']) - 1, - torso_1 = GetNumberOfPedDrawableVariations (playerPed, 11) - 1, - torso_2 = GetNumberOfPedTextureVariations (playerPed, 11, Character['torso_1']) - 1, - decals_1 = GetNumberOfPedDrawableVariations (playerPed, 10) - 1, - decals_2 = GetNumberOfPedTextureVariations (playerPed, 10, Character['decals_1']) - 1, - arms = GetNumberOfPedDrawableVariations (playerPed, 3) - 1, - pants_1 = GetNumberOfPedDrawableVariations (playerPed, 4) - 1, - pants_2 = GetNumberOfPedTextureVariations (playerPed, 4, Character['pants_1']) - 1, - shoes_1 = GetNumberOfPedDrawableVariations (playerPed, 6) - 1, - shoes_2 = GetNumberOfPedTextureVariations (playerPed, 6, Character['shoes_1']) - 1, - mask_1 = GetNumberOfPedDrawableVariations (playerPed, 1) - 1, - mask_2 = GetNumberOfPedTextureVariations (playerPed, 1, Character['mask_1']) - 1, - bproof_1 = GetNumberOfPedDrawableVariations (playerPed, 9) - 1, - bproof_2 = GetNumberOfPedTextureVariations (playerPed, 9, Character['bproof_1']) - 1, - chain_1 = GetNumberOfPedDrawableVariations (playerPed, 7) - 1, - chain_2 = GetNumberOfPedTextureVariations (playerPed, 7, Character['chain_1']) - 1, - bags_1 = GetNumberOfPedDrawableVariations (playerPed, 5) - 1, - bags_2 = GetNumberOfPedTextureVariations (playerPed, 5, Character['bags_1']) - 1, - helmet_1 = GetNumberOfPedPropDrawableVariations (playerPed, 0) - 1, - helmet_2 = GetNumberOfPedPropTextureVariations (playerPed, 0, Character['helmet_1']) - 1, - glasses_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, - glasses_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['glasses_1'] - 1), - } + local data = { + sex = 1, + face = 45, + skin = 45, + age_1 = GetNumHeadOverlayValues(3)-1, + age_2 = 10, + beard_1 = GetNumHeadOverlayValues(1)-1, + beard_2 = 10, + beard_3 = GetNumHairColors()-1, + beard_4 = GetNumHairColors()-1, + hair_1 = GetNumberOfPedDrawableVariations (playerPed, 2) - 1, + hair_2 = GetNumberOfPedTextureVariations (playerPed, 2, Character['hair_1']) - 1, + hair_color_1 = GetNumHairColors()-1, + hair_color_2 = GetNumHairColors()-1, + eye_color = 31, + eyebrows_1 = GetNumHeadOverlayValues(2)-1, + eyebrows_2 = 10, + eyebrows_3 = GetNumHairColors()-1, + eyebrows_4 = GetNumHairColors()-1, + makeup_1 = GetNumHeadOverlayValues(4)-1, + makeup_2 = 10, + makeup_3 = GetNumHairColors()-1, + makeup_4 = GetNumHairColors()-1, + lipstick_1 = GetNumHeadOverlayValues(8)-1, + lipstick_2 = 10, + lipstick_3 = GetNumHairColors()-1, + lipstick_4 = GetNumHairColors()-1, + blemishes_1 = GetNumHeadOverlayValues(0)-1, + blemishes_2 = 10, + blush_1 = GetNumHeadOverlayValues(5)-1, + blush_2 = 10, + blush_3 = GetNumHairColors()-1, + complexion_1 = GetNumHeadOverlayValues(6)-1, + complexion_2 = 10, + sun_1 = GetNumHeadOverlayValues(7)-1, + sun_2 = 10, + moles_1 = GetNumHeadOverlayValues(9)-1, + moles_2 = 10, + chest_1 = GetNumHeadOverlayValues(10)-1, + chest_2 = 10, + chest_3 = GetNumHairColors()-1, + bodyb_1 = GetNumHeadOverlayValues(11)-1, + bodyb_2 = 10, + ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, + ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['ears_1'] - 1), + tshirt_1 = GetNumberOfPedDrawableVariations (playerPed, 8) - 1, + tshirt_2 = GetNumberOfPedTextureVariations (playerPed, 8, Character['tshirt_1']) - 1, + torso_1 = GetNumberOfPedDrawableVariations (playerPed, 11) - 1, + torso_2 = GetNumberOfPedTextureVariations (playerPed, 11, Character['torso_1']) - 1, + decals_1 = GetNumberOfPedDrawableVariations (playerPed, 10) - 1, + decals_2 = GetNumberOfPedTextureVariations (playerPed, 10, Character['decals_1']) - 1, + arms = GetNumberOfPedDrawableVariations (playerPed, 3) - 1, + arms_2 = 10, + pants_1 = GetNumberOfPedDrawableVariations (playerPed, 4) - 1, + pants_2 = GetNumberOfPedTextureVariations (playerPed, 4, Character['pants_1']) - 1, + shoes_1 = GetNumberOfPedDrawableVariations (playerPed, 6) - 1, + shoes_2 = GetNumberOfPedTextureVariations (playerPed, 6, Character['shoes_1']) - 1, + mask_1 = GetNumberOfPedDrawableVariations (playerPed, 1) - 1, + mask_2 = GetNumberOfPedTextureVariations (playerPed, 1, Character['mask_1']) - 1, + bproof_1 = GetNumberOfPedDrawableVariations (playerPed, 9) - 1, + bproof_2 = GetNumberOfPedTextureVariations (playerPed, 9, Character['bproof_1']) - 1, + chain_1 = GetNumberOfPedDrawableVariations (playerPed, 7) - 1, + chain_2 = GetNumberOfPedTextureVariations (playerPed, 7, Character['chain_1']) - 1, + bags_1 = GetNumberOfPedDrawableVariations (playerPed, 5) - 1, + bags_2 = GetNumberOfPedTextureVariations (playerPed, 5, Character['bags_1']) - 1, + helmet_1 = GetNumberOfPedPropDrawableVariations (playerPed, 0) - 1, + helmet_2 = GetNumberOfPedPropTextureVariations (playerPed, 0, Character['helmet_1']) - 1, + glasses_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, + glasses_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['glasses_1'] - 1), + watches_1 = GetNumberOfPedPropDrawableVariations (playerPed, 6) - 1, + watches_2 = GetNumberOfPedPropTextureVariations (playerPed, 6, Character['watches_1']) - 1, + bracelets_1 = GetNumberOfPedPropDrawableVariations (playerPed, 7) - 1, + bracelets_2 = GetNumberOfPedPropTextureVariations (playerPed, 7, Character['bracelets_1'] - 1), +} - return data + return data end function ApplySkin(skin, clothes) - local playerPed = GetPlayerPed(-1) + local playerPed = PlayerPedId() - for k,v in pairs(skin) do - Character[k] = v - end + for k,v in pairs(skin) do + Character[k] = v + end - if clothes ~= nil then + if clothes ~= nil then - for k,v in pairs(clothes) do - if - k ~= 'sex' and - k ~= 'face' and - k ~= 'skin' and - k ~= 'age_1' and - k ~= 'age_2' and - k ~= 'beard_1' and - k ~= 'beard_2' and - k ~= 'beard_3' and - k ~= 'beard_4' and - k ~= 'hair_1' and - k ~= 'hair_2' and - k ~= 'hair_color_1' and - k ~= 'hair_color_2' and - k ~= 'eyebrows_1' and - k ~= 'eyebrows_2' and - k ~= 'eyebrows_3' and - k ~= 'eyebrows_4' and - k ~= 'makeup_1' and - k ~= 'makeup_2' and - k ~= 'makeup_3' and - k ~= 'makeup_4' and - k ~= 'lipstick_1' and - k ~= 'lipstick_2' and - k ~= 'lipstick_3' and - k ~= 'lipstick_4' - then - Character[k] = v - end - end + for k,v in pairs(clothes) do + if + k ~= 'sex' and + k ~= 'face' and + k ~= 'skin' and + k ~= 'age_1' and + k ~= 'age_2' and + k ~= 'eye_color' and + k ~= 'beard_1' and + k ~= 'beard_2' and + k ~= 'beard_3' and + k ~= 'beard_4' and + k ~= 'hair_1' and + k ~= 'hair_2' and + k ~= 'hair_color_1' and + k ~= 'hair_color_2' and + k ~= 'eyebrows_1' and + k ~= 'eyebrows_2' and + k ~= 'eyebrows_3' and + k ~= 'eyebrows_4' and + k ~= 'makeup_1' and + k ~= 'makeup_2' and + k ~= 'makeup_3' and + k ~= 'makeup_4' and + k ~= 'lipstick_1' and + k ~= 'lipstick_2' and + k ~= 'lipstick_3' and + k ~= 'lipstick_4' and + k ~= 'blemishes_1' and + k ~= 'blemishes_2' and + k ~= 'blush_1' and + k ~= 'blush_2' and + k ~= 'blush_3' and + k ~= 'complexion_1' and + k ~= 'complexion_2' and + k ~= 'sun_1' and + k ~= 'sun_2' and + k ~= 'moles_1' and + k ~= 'moles_2' and + k ~= 'chest_1' and + k ~= 'chest_2' and + k ~= 'chest_3' and + k ~= 'bodyb_1' and + k ~= 'bodyb_2' + then + Character[k] = v + end + end - end + end - SetPedHeadBlendData (playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) + SetPedHeadBlendData (playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) - SetPedHairColor (playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color - SetPedHeadOverlay (playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity - SetPedHeadOverlay (playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity - SetPedHeadOverlay (playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity - SetPedHeadOverlay (playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity - SetPedHeadOverlay (playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity - SetPedComponentVariation(playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair - SetPedHeadOverlayColor (playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color - SetPedHeadOverlayColor (playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color - SetPedHeadOverlayColor (playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color - SetPedHeadOverlayColor (playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color + SetPedHairColor (playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color + SetPedHeadOverlay (playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity + SetPedHeadOverlay (playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity + SetPedEyeColor (playerPed, Character['eye_color'], 0, 1) -- Eyes color + SetPedHeadOverlay (playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity + SetPedHeadOverlay (playerPed, 4, Character['makeup_1'], (Character['makeup_2'] / 10) + 0.0) -- Makeup + opacity + SetPedHeadOverlay (playerPed, 8, Character['lipstick_1'], (Character['lipstick_2'] / 10) + 0.0) -- Lipstick + opacity + SetPedComponentVariation (playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair + SetPedHeadOverlayColor (playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color + SetPedHeadOverlayColor (playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color + SetPedHeadOverlayColor (playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color + SetPedHeadOverlayColor (playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color + SetPedHeadOverlay (playerPed, 5, Character['blush_1'], (Character['blush_2'] / 10) + 0.0) -- Blush + opacity + SetPedHeadOverlayColor (playerPed, 5, 2, Character['blush_3']) -- Blush Color + SetPedHeadOverlay (playerPed, 6, Character['complexion_1'], (Character['complexion_2'] / 10) + 0.0) -- Complexion + opacity + SetPedHeadOverlay (playerPed, 7, Character['sun_1'], (Character['sun_2'] / 10) + 0.0) -- Sun Damage + opacity + SetPedHeadOverlay (playerPed, 9, Character['moles_1'], (Character['moles_2'] / 10) + 0.0) -- Moles/Freckles + opacity + SetPedHeadOverlay (playerPed, 10, Character['chest_1'], (Character['chest_2'] / 10) + 0.0) -- Chest Hair + opacity + SetPedHeadOverlayColor (playerPed, 10, 1, Character['chest_3']) -- Torso Color + SetPedHeadOverlay (playerPed, 11, Character['bodyb_1'], (Character['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity - if Character['ears_1'] == -1 then - ClearPedProp(playerPed, 2) - else - SetPedPropIndex(playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories - end + if Character['ears_1'] == -1 then + ClearPedProp(playerPed, 2) + else + SetPedPropIndex (playerPed, 2, Character['ears_1'], Character['ears_2'], 2) -- Ears Accessories + end - SetPedComponentVariation(playerPed, 8, Character['tshirt_1'], Character['tshirt_2'], 2) -- Tshirt - SetPedComponentVariation(playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts - SetPedComponentVariation(playerPed, 3, Character['arms'], 0, 2) -- torso - SetPedComponentVariation(playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals - SetPedComponentVariation(playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants - SetPedComponentVariation(playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes - SetPedComponentVariation(playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask - SetPedComponentVariation(playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof - SetPedComponentVariation(playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain - SetPedComponentVariation(playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag + SetPedComponentVariation (playerPed, 8, Character['tshirt_1'], Character['tshirt_2'], 2) -- Tshirt + SetPedComponentVariation (playerPed, 11, Character['torso_1'], Character['torso_2'], 2) -- torso parts + SetPedComponentVariation (playerPed, 3, Character['arms'], Character['arms_2'], 2) -- Amrs + SetPedComponentVariation (playerPed, 10, Character['decals_1'], Character['decals_2'], 2) -- decals + SetPedComponentVariation (playerPed, 4, Character['pants_1'], Character['pants_2'], 2) -- pants + SetPedComponentVariation (playerPed, 6, Character['shoes_1'], Character['shoes_2'], 2) -- shoes + SetPedComponentVariation (playerPed, 1, Character['mask_1'], Character['mask_2'], 2) -- mask + SetPedComponentVariation (playerPed, 9, Character['bproof_1'], Character['bproof_2'], 2) -- bulletproof + SetPedComponentVariation (playerPed, 7, Character['chain_1'], Character['chain_2'], 2) -- chain + SetPedComponentVariation (playerPed, 5, Character['bags_1'], Character['bags_2'], 2) -- Bag - if Character['helmet_1'] == -1 then - ClearPedProp(playerPed, 0) - else - SetPedPropIndex(playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet - end + if Character['helmet_1'] == -1 then + ClearPedProp(playerPed, 0) + else + SetPedPropIndex (playerPed, 0, Character['helmet_1'], Character['helmet_2'], 2) -- Helmet + end - SetPedPropIndex(playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses + if Character['glasses_1'] == -1 then + ClearPedProp(playerPed, 1) + else + SetPedPropIndex (playerPed, 1, Character['glasses_1'], Character['glasses_2'], 2) -- Glasses + end + + if Character['watches_1'] == -1 then + ClearPedProp(playerPed, 6) + else + SetPedPropIndex (playerPed, 6, Character['watches_1'], Character['watches_2'], 2) -- Watches + end + + if Character['bracelets_1'] == -1 then + ClearPedProp(playerPed, 7) + else + SetPedPropIndex (playerPed, 7, Character['bracelets_1'], Character['bracelets_2'], 2) -- Bracelets + end end AddEventHandler('skinchanger:loadDefaultModel', function(loadMale, cb) - LoadDefaultModel(loadMale, cb) + LoadDefaultModel(loadMale, cb) end) AddEventHandler('skinchanger:getData', function(cb) - local components = json.decode(json.encode(Components)) + local components = json.decode(json.encode(Components)) - for k,v in pairs(Character) do - for i=1, #components, 1 do - if k == components[i].name then - components[i].value = v - --components[i].zoomOffset = Components[i].zoomOffset - --components[i].camOffset = Components[i].camOffset - end - end - end + for k,v in pairs(Character) do + for i=1, #components, 1 do + if k == components[i].name then + components[i].value = v + --components[i].zoomOffset = Components[i].zoomOffset + --components[i].camOffset = Components[i].camOffset + end + end + end - cb(components, GetMaxVals()) + cb(components, GetMaxVals()) end) AddEventHandler('skinchanger:change', function(key, val) - Character[key] = val + Character[key] = val - if key == 'sex' then - TriggerEvent('skinchanger:loadSkin', Character) - else - ApplySkin(Character) - end + if key == 'sex' then + TriggerEvent('skinchanger:loadSkin', Character) + else + ApplySkin(Character) + end end) AddEventHandler('skinchanger:getSkin', function(cb) - cb(Character) + cb(Character) end) AddEventHandler('skinchanger:modelLoaded', function() - ClearPedProp(GetPlayerPed(-1), 0) + ClearPedProp(PlayerPedId(), 0) - if LoadSkin ~= nil then + if LoadSkin ~= nil then - ApplySkin(LoadSkin) - LoadSkin = nil + ApplySkin(LoadSkin) + LoadSkin = nil - end + end - if LoadClothes ~= nil then + if LoadClothes ~= nil then - ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) - LoadClothes = nil + ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) + LoadClothes = nil - end + end end) RegisterNetEvent('skinchanger:loadSkin') AddEventHandler('skinchanger:loadSkin', function(skin, cb) - if skin['sex'] ~= LastSex then + if skin['sex'] ~= LastSex then - LoadSkin = skin + LoadSkin = skin - if skin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true, cb) - else - TriggerEvent('skinchanger:loadDefaultModel', false, cb) - end + if skin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true, cb) + else + TriggerEvent('skinchanger:loadDefaultModel', false, cb) + end - else + else - ApplySkin(skin) + ApplySkin(skin) - if cb ~= nil then - cb() - end + if cb ~= nil then + cb() + end - end + end - LastSex = skin['sex'] + LastSex = skin['sex'] end) RegisterNetEvent('skinchanger:loadClothes') AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) - if playerSkin['sex'] ~= LastSex then + if playerSkin['sex'] ~= LastSex then - LoadClothes = { - playerSkin = playerSkin, - clothesSkin = clothesSkin - } + LoadClothes = { + playerSkin = playerSkin, + clothesSkin = clothesSkin + } - if playerSkin['sex'] == 0 then - TriggerEvent('skinchanger:loadDefaultModel', true) - else - TriggerEvent('skinchanger:loadDefaultModel', false) - end + if playerSkin['sex'] == 0 then + TriggerEvent('skinchanger:loadDefaultModel', true) + else + TriggerEvent('skinchanger:loadDefaultModel', false) + end - else - ApplySkin(playerSkin, clothesSkin) - end + else + ApplySkin(playerSkin, clothesSkin) + end - LastSex = playerSkin['sex'] + LastSex = playerSkin['sex'] end) diff --git a/locale.lua b/locale.lua index d98f2015..0cd71743 100644 --- a/locale.lua +++ b/locale.lua @@ -2,20 +2,20 @@ Locales = {} function _(str, ...) -- Translate string - if Locales[Config.Locale] ~= nil then + if Locales[Config.Locale] ~= nil then - if Locales[Config.Locale][str] ~= nil then - return string.format(Locales[Config.Locale][str], ...) - else - return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist' - end + if Locales[Config.Locale][str] ~= nil then + return string.format(Locales[Config.Locale][str], ...) + else + return 'Translation [' .. Config.Locale .. '][' .. str .. '] does not exist' + end - else - return 'Locale [' .. Config.Locale .. '] does not exist' - end + else + return 'Locale [' .. Config.Locale .. '] does not exist' + end end function _U(str, ...) -- Translate string first char uppercase - return tostring(_(str, ...):gsub("^%l", string.upper)) + return tostring(_(str, ...):gsub("^%l", string.upper)) end diff --git a/locales/br.lua b/locales/br.lua index 350a5cbd..3aa61263 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -13,6 +13,7 @@ Locales['br'] = { ['hair_color_1'] = 'cor do cabelo 1', ['hair_color_2'] = 'cor do cabelo 2', ['eyebrow_type'] = 'tipo de sobrancelha', + ['eye_color'] = 'eye color', ['eyebrow_size'] = 'tamanho da sobrancelha', ['eyebrow_color_1'] = 'cor da sobrancelha 1', ['eyebrow_color_2'] = 'cor da sobrancelha 2', @@ -33,6 +34,7 @@ Locales['br'] = { ['decals_1'] = 'adesivos 1', ['decals_2'] = 'adesivos 2', ['arms'] = 'braços', + ['arms_2'] = 'braços 2', ['pants_1'] = 'calça 1', ['pants_2'] = 'calça 2', ['shoes_1'] = 'calçados 1', @@ -45,8 +47,30 @@ Locales['br'] = { ['chain_2'] = 'acessórios pescoço 2', ['helmet_1'] = 'capacete 1', ['helmet_2'] = 'capacete 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', ['glasses_1'] = 'óculos 1', ['glasses_2'] = 'óculos 2', ['bag'] = 'mochilas', ['bag_color'] = 'cor das mochilas', -} \ No newline at end of file + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' +} diff --git a/locales/de.lua b/locales/de.lua index ed70e862..73712d23 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -1,52 +1,76 @@ Locales['de'] = { - ['sex'] = 'Geschlecht', - ['face'] = 'Gesicht', - ['skin'] = 'Skin', - ['wrinkles'] = 'Falten', - ['wrinkle_thickness'] = 'Faltendicke', - ['beard_type'] = 'Bart Typ', - ['beard_size'] = 'Bartdichte', - ['beard_color_1'] = 'Bartfarbe 1', - ['beard_color_2'] = 'Bartfarbe 2', - ['hair_1'] = 'Haare 1', - ['hair_2'] = 'Haare 2', - ['hair_color_1'] = 'Haarfarbe 1', - ['hair_color_2'] = 'Haarfarbe 2', - ['eyebrow_type'] = 'Augenbrauen Typ', - ['eyebrow_size'] = 'Augenbrauen Größe', - ['eyebrow_color_1'] = 'Augenbrauenfarbe 1', - ['eyebrow_color_2'] = 'Augenbrauenfarbe 2', - ['makeup_type'] = 'Makeup Typ', - ['makeup_thickness'] = 'Makeup dicke', - ['makeup_color_1'] = 'Makeupfarbe 1', - ['makeup_color_2'] = 'Makeupfarbe 2', - ['lipstick_type'] = 'Lippenstift Typ', - ['lipstick_thickness'] = 'Lippenstift dicke', - ['lipstick_color_1'] = 'Lippenstiffarbe 1', - ['lipstick_color_2'] = 'Lippenstiftfarbe 2', - ['ear_accessories'] = 'Ohr Accessories', - ['ear_accessories_color'] = 'Ohr Accessories Farbe', - ['tshirt_1'] = 'T-Shirt 1', - ['tshirt_2'] = 'T-Shirt 2', - ['torso_1'] = 'Torso 1', - ['torso_2'] = 'Torso 2', - ['decals_1'] = 'Tattoos 1', - ['decals_2'] = 'Tattoos 2', - ['arms'] = 'Arme', - ['pants_1'] = 'Hosen 1', - ['pants_2'] = 'Hosen 2', - ['shoes_1'] = 'Schuhe 1', - ['shoes_2'] = 'Schuhe 2', - ['mask_1'] = 'Maske 1', - ['mask_2'] = 'Maske 2', - ['bproof_1'] = 'Schusssichere Weste 1', - ['bproof_2'] = 'Schusssichere Weste 2', - ['chain_1'] = 'Kette 1', - ['chain_2'] = 'Kette 2', - ['helmet_1'] = 'Helm 1', - ['helmet_2'] = 'Helm 2', - ['glasses_1'] = 'Brille 1', - ['glasses_2'] = 'Brille 2', - ['bag'] = 'Rucksack', - ['bag_color'] = 'Rucksackfarbe', + ['sex'] = 'geschlecht', + ['face'] = 'gesicht', + ['skin'] = 'skin', + ['wrinkles'] = 'falten', + ['wrinkle_thickness'] = 'faltendicke', + ['beard_type'] = 'bart Typ', + ['beard_size'] = 'bartdichte', + ['beard_color_1'] = 'bartfarbe 1', + ['beard_color_2'] = 'bartfarbe 2', + ['hair_1'] = 'haare 1', + ['hair_2'] = 'haare 2', + ['hair_color_1'] = 'haarfarbe 1', + ['hair_color_2'] = 'haarfarbe 2', + ['eye_color'] = 'eye color', + ['eyebrow_type'] = 'augenbrauen Typ', + ['eyebrow_size'] = 'augenbrauen Größe', + ['eyebrow_color_1'] = 'augenbrauenfarbe 1', + ['eyebrow_color_2'] = 'augenbrauenfarbe 2', + ['makeup_type'] = 'makeup Typ', + ['makeup_thickness'] = 'makeup dicke', + ['makeup_color_1'] = 'makeupfarbe 1', + ['makeup_color_2'] = 'makeupfarbe 2', + ['lipstick_type'] = 'lippenstift Typ', + ['lipstick_thickness'] = 'lippenstift dicke', + ['lipstick_color_1'] = 'lippenstiffarbe 1', + ['lipstick_color_2'] = 'lippenstiftfarbe 2', + ['ear_accessories'] = 'ohr Accessories', + ['ear_accessories_color'] = 'ohr Accessories Farbe', + ['tshirt_1'] = 't-Shirt 1', + ['tshirt_2'] = 't-Shirt 2', + ['torso_1'] = 'torso 1', + ['torso_2'] = 'torso 2', + ['decals_1'] = 'tattoos 1', + ['decals_2'] = 'tattoos 2', + ['arms'] = 'arme', + ['arms_2'] = 'arme 2', + ['pants_1'] = 'hosen 1', + ['pants_2'] = 'hosen 2', + ['shoes_1'] = 'schuhe 1', + ['shoes_2'] = 'schuhe 2', + ['mask_1'] = 'maske 1', + ['mask_2'] = 'maske 2', + ['bproof_1'] = 'schusssichere Weste 1', + ['bproof_2'] = 'schusssichere Weste 2', + ['chain_1'] = 'kette 1', + ['chain_2'] = 'kette 2', + ['helmet_1'] = 'helm 1', + ['helmet_2'] = 'helm 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', + ['glasses_1'] = 'brille 1', + ['glasses_2'] = 'brille 2', + ['bag'] = 'rucksack', + ['bag_color'] = 'rucksackfarbe', + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' } diff --git a/locales/en.lua b/locales/en.lua index 902d0990..d808137c 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -12,6 +12,7 @@ Locales['en'] = { ['hair_2'] = 'hair 2', ['hair_color_1'] = 'hair color 1', ['hair_color_2'] = 'hair color 2', + ['eye_color'] = 'eye color', ['eyebrow_type'] = 'eyebrow type', ['eyebrow_size'] = 'eyebrow size', ['eyebrow_color_1'] = 'eyebrow color 1', @@ -33,6 +34,7 @@ Locales['en'] = { ['decals_1'] = 'decals 1', ['decals_2'] = 'decals 2', ['arms'] = 'arms', + ['arms_2'] = 'arms 2', ['pants_1'] = 'pants 1', ['pants_2'] = 'pants 2', ['shoes_1'] = 'shoes 1', @@ -45,8 +47,30 @@ Locales['en'] = { ['chain_2'] = 'chain 2', ['helmet_1'] = 'helmet 1', ['helmet_2'] = 'helmet 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', ['glasses_1'] = 'glasses 1', ['glasses_2'] = 'glasses 2', ['bag'] = 'bag', ['bag_color'] = 'bag color', + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' } diff --git a/locales/fi.lua b/locales/fi.lua index 825c9590..d1a0d6e4 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -12,6 +12,7 @@ Locales['fi'] = { ['hair_2'] = 'hiukset 2', ['hair_color_1'] = 'hiuksien väri 1', ['hair_color_2'] = 'hiuksien väri 2', + ['eye_color'] = 'eye color', ['eyebrow_type'] = 'kulmakarva tyyli', ['eyebrow_size'] = 'kulmakarvojen tiheys', ['eyebrow_color_1'] = 'kulmakarvojen väri 1', @@ -33,6 +34,7 @@ Locales['fi'] = { ['decals_1'] = 'kerros 1', ['decals_2'] = 'kerros 2', ['arms'] = 'kädet', + ['arms_2'] = 'kädet 2', ['pants_1'] = 'housut 1', ['pants_2'] = 'housut 2', ['shoes_1'] = 'kengät 1', @@ -45,8 +47,30 @@ Locales['fi'] = { ['chain_2'] = 'korut 2', ['helmet_1'] = 'kypärät 1', ['helmet_2'] = 'kypärät 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', ['glasses_1'] = 'lasit 1', ['glasses_2'] = 'lasit 2', ['bag'] = 'reput', ['bag_color'] = 'repun väri', + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' } diff --git a/locales/fr.lua b/locales/fr.lua index bc931a4e..6ecc2f8b 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -12,6 +12,7 @@ Locales['fr'] = { ['hair_2'] = 'cheveux 2', ['hair_color_1'] = 'couleur cheveux 1', ['hair_color_2'] = 'couleur cheveux 2', + ['eye_color'] = 'lentilles colorées', ['eyebrow_type'] = 'type sourcils', ['eyebrow_size'] = 'taille sourcils', ['eyebrow_color_1'] = 'couleur sourcils 1', @@ -33,6 +34,7 @@ Locales['fr'] = { ['decals_1'] = 'calques 1', ['decals_2'] = 'calques 2', ['arms'] = 'bras', + ['arms_2'] = 'bras 2', ['pants_1'] = 'jambes 1', ['pants_2'] = 'jambes 2', ['shoes_1'] = 'chaussures 1', @@ -45,8 +47,30 @@ Locales['fr'] = { ['chain_2'] = 'chaine 2', ['helmet_1'] = 'casque 1', ['helmet_2'] = 'casque 2', + ['watches_1'] = 'montre 1', + ['watches_2'] = 'montre 2', + ['bracelets_1'] = 'bracelet 1', + ['bracelets_2'] = 'bracelet 2', ['glasses_1'] = 'lunettes 1', ['glasses_2'] = 'lunettes 2', ['bag'] = 'sac', ['bag_color'] = 'couleur sac', + ['blemishes'] = 'Boutons', + ['blemishes_size']= 'opacité des boutons', + ['ageing'] = 'vieillissement', + ['ageing_1'] = 'opacité du vieillissement', + ['blush'] = 'rougeur', + ['blush_1'] = 'opacité rougeur', + ['blush_color'] = 'couleur rougeur', + ['complexion'] = 'teint', + ['complexion_1'] = 'opacité teint', + ['sun'] = 'dommages UV', + ['sun_1'] = 'opacité dommages UV', + ['freckles'] = 'taches de rousseur', + ['freckles_1'] = 'opacité rousseur', + ['chest_hair'] = 'pillositée torse', + ['chest_hair_1'] = 'opacité pillositée', + ['chest_color'] = 'couleur pillositée', + ['bodyb'] = 'imperfections du corps', + ['bodyb_size'] = 'opacité imperfections' } diff --git a/locales/pl.lua b/locales/pl.lua new file mode 100644 index 00000000..468b891e --- /dev/null +++ b/locales/pl.lua @@ -0,0 +1,76 @@ +Locales['pl'] = { + ['sex'] = 'płec', + ['face'] = 'twarz', + ['skin'] = 'skóra', + ['wrinkles'] = 'zmarszczki', + ['wrinkle_thickness'] = 'wielkość zmarszczek', + ['beard_type'] = 'styl brody', + ['beard_size'] = 'wielkość brody', + ['beard_color_1'] = 'kolor brody 1', + ['beard_color_2'] = 'kolor brody 2', + ['hair_1'] = 'włosy 1', + ['hair_2'] = 'włosy 2', + ['hair_color_1'] = 'wolor włosów 1', + ['hair_color_2'] = 'wolor włosów 2', + ['eye_color'] = 'eye color', + ['eyebrow_type'] = 'styl brwi', + ['eyebrow_size'] = 'wielkość brwi', + ['eyebrow_color_1'] = 'wolor brwi 1', + ['eyebrow_color_2'] = 'wolor brwi 2', + ['makeup_type'] = 'styl makijażu', + ['makeup_thickness'] = 'grubość makijażu', + ['makeup_color_1'] = 'kolor makijażu 1', + ['makeup_color_2'] = 'kolor makijażu 2', + ['lipstick_type'] = 'styl szminki', + ['lipstick_thickness'] = 'grubość szminki', + ['lipstick_color_1'] = 'kolor szminki 1', + ['lipstick_color_2'] = 'kolor szminki 2', + ['ear_accessories'] = 'akcesoria do usz', + ['ear_accessories_color'] = 'kolor akcesorii do usz', + ['tshirt_1'] = 'koszulka 1', + ['tshirt_2'] = 'koszulka 2', + ['torso_1'] = 'tułów 1', + ['torso_2'] = 'tułów 2', + ['decals_1'] = 'detale 1', + ['decals_2'] = 'detale 2', + ['arms'] = 'ramiona', + ['arms_2'] = 'ramiona 2', + ['pants_1'] = 'spodnie 1', + ['pants_2'] = 'spodnie 2', + ['shoes_1'] = 'buty 1', + ['shoes_2'] = 'buty 2', + ['mask_1'] = 'maska 1', + ['mask_2'] = 'maska 2', + ['bproof_1'] = 'kamizelka kuloodporna 1', + ['bproof_2'] = 'kamizelka kuloodporna 2', + ['chain_1'] = 'łańcuch 1', + ['chain_2'] = 'łańcuch 2', + ['helmet_1'] = 'hełm 1', + ['helmet_2'] = 'hełm 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', + ['glasses_1'] = 'okulary 1', + ['glasses_2'] = 'okulary 2', + ['bag'] = 'torba', + ['bag_color'] = 'kolor torby', + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' +} diff --git a/locales/sv.lua b/locales/sv.lua index 673f455f..ff65a74e 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -12,6 +12,7 @@ Locales['sv'] = { ['hair_2'] = 'hår 2', ['hair_color_1'] = 'hårfärg 1', ['hair_color_2'] = 'hårfärg 2', + ['eye_color'] = 'eye color', ['eyebrow_type'] = 'ögonbryn typ', ['eyebrow_size'] = 'ögonbryn storlek', ['eyebrow_color_1'] = 'ögonbryn färg 1', @@ -33,6 +34,7 @@ Locales['sv'] = { ['decals_1'] = 'dekaler 1', ['decals_2'] = 'dekaler 2', ['arms'] = 'armar', + ['arms_2'] = 'armar 2', ['pants_1'] = 'byxor 1', ['pants_2'] = 'byxor 2', ['shoes_1'] = 'skor 1', @@ -45,8 +47,30 @@ Locales['sv'] = { ['chain_2'] = 'kedja 2', ['helmet_1'] = 'hjälm 1', ['helmet_2'] = 'hjälm 2', + ['watches_1'] = 'watches 1', + ['watches_2'] = 'watches 2', + ['bracelets_1'] = 'bracelets 1', + ['bracelets_2'] = 'bracelets 2', ['glasses_1'] = 'glasögon 1', ['glasses_2'] = 'glasögon 2', ['bag'] = 'väska', ['bag_color'] = 'väska färg', + ['blemishes'] = 'blemishes', + ['blemishes_size']= 'blemishes thickness', + ['ageing'] = 'ageing', + ['ageing_1'] = 'ageing thickness', + ['blush'] = 'blush', + ['blush_1'] = 'blush thickness', + ['blush_color'] = 'blush color', + ['complexion'] = 'complexion', + ['complexion_1'] = 'complexion thickness', + ['sun'] = 'sun', + ['sun_1'] = 'sun thickness', + ['freckles'] = 'freckles', + ['freckles_1'] = 'freckles thickness', + ['chest_hair'] = 'chest hair', + ['chest_hair_1'] = 'chest hair thickness', + ['chest_color'] = 'chest hair color', + ['bodyb'] = 'body blemishes', + ['bodyb_size'] = 'body blemishes thickness' } From 181374f091f893b4d4654e757d6fe5b8e7ce30c5 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Mon, 24 Sep 2018 17:53:37 +0200 Subject: [PATCH 38/52] Removed whitespaces --- client/main.lua | 35 +++-------------------------------- 1 file changed, 3 insertions(+), 32 deletions(-) diff --git a/client/main.lua b/client/main.lua index 8fbd1c69..d76f4861 100644 --- a/client/main.lua +++ b/client/main.lua @@ -83,7 +83,6 @@ for i=1, #Components, 1 do end function LoadDefaultModel(malePed, cb) - local playerPed = PlayerPedId() local characterModel @@ -96,7 +95,6 @@ function LoadDefaultModel(malePed, cb) RequestModel(characterModel) Citizen.CreateThread(function() - while not HasModelLoaded(characterModel) do RequestModel(characterModel) Citizen.Wait(0) @@ -114,13 +112,10 @@ function LoadDefaultModel(malePed, cb) end TriggerEvent('skinchanger:modelLoaded') - end) - end function GetMaxVals() - local playerPed = PlayerPedId() local data = { @@ -195,15 +190,13 @@ function GetMaxVals() watches_1 = GetNumberOfPedPropDrawableVariations (playerPed, 6) - 1, watches_2 = GetNumberOfPedPropTextureVariations (playerPed, 6, Character['watches_1']) - 1, bracelets_1 = GetNumberOfPedPropDrawableVariations (playerPed, 7) - 1, - bracelets_2 = GetNumberOfPedPropTextureVariations (playerPed, 7, Character['bracelets_1'] - 1), -} + bracelets_2 = GetNumberOfPedPropTextureVariations (playerPed, 7, Character['bracelets_1'] - 1) + } return data - end function ApplySkin(skin, clothes) - local playerPed = PlayerPedId() for k,v in pairs(skin) do @@ -211,7 +204,6 @@ function ApplySkin(skin, clothes) end if clothes ~= nil then - for k,v in pairs(clothes) do if k ~= 'sex' and @@ -256,11 +248,10 @@ function ApplySkin(skin, clothes) k ~= 'chest_3' and k ~= 'bodyb_1' and k ~= 'bodyb_2' - then + then Character[k] = v end end - end SetPedHeadBlendData (playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) @@ -326,7 +317,6 @@ function ApplySkin(skin, clothes) else SetPedPropIndex (playerPed, 7, Character['bracelets_1'], Character['bracelets_2'], 2) -- Bracelets end - end AddEventHandler('skinchanger:loadDefaultModel', function(loadMale, cb) @@ -334,7 +324,6 @@ AddEventHandler('skinchanger:loadDefaultModel', function(loadMale, cb) end) AddEventHandler('skinchanger:getData', function(cb) - local components = json.decode(json.encode(Components)) for k,v in pairs(Character) do @@ -351,7 +340,6 @@ AddEventHandler('skinchanger:getData', function(cb) end) AddEventHandler('skinchanger:change', function(key, val) - Character[key] = val if key == 'sex' then @@ -359,7 +347,6 @@ AddEventHandler('skinchanger:change', function(key, val) else ApplySkin(Character) end - end) AddEventHandler('skinchanger:getSkin', function(cb) @@ -367,30 +354,22 @@ AddEventHandler('skinchanger:getSkin', function(cb) end) AddEventHandler('skinchanger:modelLoaded', function() - ClearPedProp(PlayerPedId(), 0) if LoadSkin ~= nil then - ApplySkin(LoadSkin) LoadSkin = nil - end if LoadClothes ~= nil then - ApplySkin(LoadClothes.playerSkin, LoadClothes.clothesSkin) LoadClothes = nil - end - end) RegisterNetEvent('skinchanger:loadSkin') AddEventHandler('skinchanger:loadSkin', function(skin, cb) - if skin['sex'] ~= LastSex then - LoadSkin = skin if skin['sex'] == 0 then @@ -398,26 +377,20 @@ AddEventHandler('skinchanger:loadSkin', function(skin, cb) else TriggerEvent('skinchanger:loadDefaultModel', false, cb) end - else - ApplySkin(skin) if cb ~= nil then cb() end - end LastSex = skin['sex'] - end) RegisterNetEvent('skinchanger:loadClothes') AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) - if playerSkin['sex'] ~= LastSex then - LoadClothes = { playerSkin = playerSkin, clothesSkin = clothesSkin @@ -428,11 +401,9 @@ AddEventHandler('skinchanger:loadClothes', function(playerSkin, clothesSkin) else TriggerEvent('skinchanger:loadDefaultModel', false) end - else ApplySkin(playerSkin, clothesSkin) end LastSex = playerSkin['sex'] - end) From dce7fd3945c2983f1db2b57326f4078a0b458761 Mon Sep 17 00:00:00 2001 From: CreativeOutcast - BenZoN <3528000+benzon@users.noreply.github.com> Date: Sun, 5 Jan 2020 15:57:54 +0100 Subject: [PATCH 39/52] Added missing SetPedHeadOverlay (#32) Added facial blemishes to ApplySkin --- client/main.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/client/main.lua b/client/main.lua index d76f4861..b9e741dc 100644 --- a/client/main.lua +++ b/client/main.lua @@ -258,6 +258,7 @@ function ApplySkin(skin, clothes) SetPedHairColor (playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color SetPedHeadOverlay (playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity + SetPedHeadOverlay (playerPed, 0, Character['blemishes_1'], (Character['blemishes_2'] / 10) + 0.0) -- Blemishes + opacity SetPedHeadOverlay (playerPed, 1, Character['beard_1'], (Character['beard_2'] / 10) + 0.0) -- Beard + opacity SetPedEyeColor (playerPed, Character['eye_color'], 0, 1) -- Eyes color SetPedHeadOverlay (playerPed, 2, Character['eyebrows_1'], (Character['eyebrows_2'] / 10) + 0.0) -- Eyebrows + opacity From faacd1f5b95f9809fbc3c02a0111c6901cf9bab3 Mon Sep 17 00:00:00 2001 From: BackrndSource Date: Sun, 5 Jan 2020 15:58:37 +0100 Subject: [PATCH 40/52] Add Spanish Translation (#31) * Spanish Traduction (locales/es.lua) * Update to add locale/es.lua --- __resource.lua | 1 + locales/es.lua | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 locales/es.lua diff --git a/__resource.lua b/__resource.lua index c11c3fec..52714ec0 100644 --- a/__resource.lua +++ b/__resource.lua @@ -9,6 +9,7 @@ client_scripts { 'locales/br.lua', 'locales/de.lua', 'locales/en.lua', + 'locales/es.lua', 'locales/fi.lua', 'locales/fr.lua', 'locales/pl.lua', diff --git a/locales/es.lua b/locales/es.lua new file mode 100644 index 00000000..8d3cba00 --- /dev/null +++ b/locales/es.lua @@ -0,0 +1,76 @@ +Locales['es'] = { + ['sex'] = 'sexo', + ['face'] = 'cara', + ['skin'] = 'piel', + ['wrinkles'] = 'arrugas', + ['wrinkle_thickness'] = 'grosor arrugas', + ['beard_type'] = 'tipo de barba', +  ['beard_size'] = 'tamaño barba', +  ['beard_color_1'] = 'color de barba 1', +  ['beard_color_2'] = 'color de barba 2', +  ['hair_1'] = 'cabello 1', +  ['hair_2'] = 'cabello 2', +  ['hair_color_1'] = 'color de cabello 1', +  ['hair_color_2'] = 'color de cabello 2', +  ['eye_color'] = 'color de ojos', +  ['eyebrow_type'] = 'tipo de ceja', +  ['eyebrow_size'] = 'tamaño ceja', +  ['eyebrow_color_1'] = 'color de ceja 1', +  ['eyebrow_color_2'] = 'color de ceja 2', +  ['makeup_type'] = 'tipo de maquillaje', +  ['makeup_thickness'] = 'espesor maquillaje', +  ['makeup_color_1'] = 'color maquillaje 1', +  ['makeup_color_2'] = 'color maquillaje 2', +  ['lipstick_type'] = 'tipo de barra de labios', +  ['lipstick_thickness'] = 'grosor barra de labios', +  ['lipstick_color_1'] = 'color barra de labios 1', +  ['lipstick_color_2'] = 'color barra de labios 2', +  ['ear_accessories'] = 'accesorios oreja', +  ['ear_accessories_color'] = 'color accesorios oreja', +  ['tshirt_1'] = 'camiseta 1', +  ['tshirt_2'] = 'camiseta 2', +  ['torso_1'] = 'torso 1', +  ['torso_2'] = 'torso 2', +  ['decals_1'] = 'tatuajes 1', +  ['decals_2'] = 'tatuajes 2', + ['arms'] = 'brazos', + ['arms_2'] = 'brazos 2', +  ['pants_1'] = 'pantalones 1', +  ['pants_2'] = 'pantalones 2', +  ['shoes_1'] = 'zapatos 1', +  ['shoes_2'] = 'zapatos 2', +  ['mask_1'] = 'máscara 1', +  ['mask_2'] = 'máscara 2', +  ['bproof_1'] = 'chaleco antibalas 1', +  ['bproof_2'] = 'chaleco antibalas 2', +  ['chain_1'] = 'cadena 1', +  ['chain_2'] = 'cadena 2', +  ['helmet_1'] = 'casco 1', +  ['helmet_2'] = 'casco 2', +  ['watches_1'] = 'relojes 1', +  ['watches_2'] = 'relojes 2', +  ['bracelets_1'] = 'pulseras 1', +  ['bracelets_2'] = 'pulseras 2', +  ['glasses_1'] = 'gafas 1', +  ['glasses_2'] = 'gafas 2', + ['bag'] = 'bolsa', + ['bag_color'] = 'color de la bolsa', + ['blemishes'] = 'manchas', + ['blemishes_size']= 'opacidad de las manchas', + ['ageing'] = 'envejecimiento', + ['ageing_1'] = 'nivel de envejecimiento', + ['blush'] = 'rubor', + ['blush_1'] = 'opacidad del rubor', + ['blush_color'] = 'color del rubor', + ['complexion'] = 'complexión', + ['complexion_1'] = 'nivel de complexión', + ['sun'] = 'bronceado', + ['sun_1'] = 'nivel de bronceado', + ['freckles'] = 'pecas', + ['freckles_1'] = 'opacidad de las pecas', + ['chest_hair'] = 'pecholobo', + ['chest_hair_1'] = 'espesor del pecholobo', + ['chest_color'] = 'color del pecholobo', + ['bodyb'] = 'manchas corporales', + ['bodyb_size'] = 'opacidad manchas corporales' +} From aed8c8afe1493f959a1b5628b8d41a450dcbc89a Mon Sep 17 00:00:00 2001 From: Michael Douglas Date: Fri, 17 Jan 2020 15:53:19 -0300 Subject: [PATCH 41/52] Correcting and improving Portuguese locale (#42) * Correcting and improving translation * Update br.lua --- locales/br.lua | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/locales/br.lua b/locales/br.lua index 3aa61263..7dcaa93c 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -13,7 +13,7 @@ Locales['br'] = { ['hair_color_1'] = 'cor do cabelo 1', ['hair_color_2'] = 'cor do cabelo 2', ['eyebrow_type'] = 'tipo de sobrancelha', - ['eye_color'] = 'eye color', + ['eye_color'] = 'cor dos olhos', ['eyebrow_size'] = 'tamanho da sobrancelha', ['eyebrow_color_1'] = 'cor da sobrancelha 1', ['eyebrow_color_2'] = 'cor da sobrancelha 2', @@ -47,30 +47,30 @@ Locales['br'] = { ['chain_2'] = 'acessórios pescoço 2', ['helmet_1'] = 'capacete 1', ['helmet_2'] = 'capacete 2', - ['watches_1'] = 'watches 1', - ['watches_2'] = 'watches 2', + ['watches_1'] = 'relógios 1', + ['watches_2'] = 'relógios 2', ['bracelets_1'] = 'bracelets 1', ['bracelets_2'] = 'bracelets 2', ['glasses_1'] = 'óculos 1', ['glasses_2'] = 'óculos 2', ['bag'] = 'mochilas', ['bag_color'] = 'cor das mochilas', - ['blemishes'] = 'blemishes', - ['blemishes_size']= 'blemishes thickness', - ['ageing'] = 'ageing', - ['ageing_1'] = 'ageing thickness', + ['blemishes'] = 'manchas', + ['blemishes_size']= 'espessura das manchas', + ['ageing'] = 'envelhecimento', + ['ageing_1'] = 'espessura do envelhecimento', ['blush'] = 'blush', - ['blush_1'] = 'blush thickness', - ['blush_color'] = 'blush color', - ['complexion'] = 'complexion', - ['complexion_1'] = 'complexion thickness', - ['sun'] = 'sun', - ['sun_1'] = 'sun thickness', - ['freckles'] = 'freckles', - ['freckles_1'] = 'freckles thickness', - ['chest_hair'] = 'chest hair', - ['chest_hair_1'] = 'chest hair thickness', - ['chest_color'] = 'chest hair color', - ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['blush_1'] = 'espessura do blush', + ['blush_color'] = 'cor do blush', + ['complexion'] = 'pele', + ['complexion_1'] = 'pele espessura', + ['sun'] = 'bronzeado', + ['sun_1'] = 'quantidade do bronzeamento', + ['freckles'] = 'sardas', + ['freckles_1'] = 'sardas quantidade', + ['chest_hair'] = 'cabelo no peito', + ['chest_hair_1'] = 'quantidade de cabelo no peito', + ['chest_color'] = 'cor do cabelo no peito', + ['bodyb'] = 'manchas no corpo', + ['bodyb_size'] = 'espessura de manchas do corpo' } From bfa26bf5f9de1613abaf0ed29bdc3e6d0ff0ab51 Mon Sep 17 00:00:00 2001 From: rex2630 Date: Sun, 19 Jan 2020 17:01:50 +0100 Subject: [PATCH 42/52] Replace __resource.lua with fxmanifest.lua --- __resource.lua => fxmanifest.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) rename __resource.lua => fxmanifest.lua (80%) diff --git a/__resource.lua b/fxmanifest.lua similarity index 80% rename from __resource.lua rename to fxmanifest.lua index 52714ec0..33537561 100644 --- a/__resource.lua +++ b/fxmanifest.lua @@ -1,4 +1,6 @@ -resource_manifest_version '44febabe-d386-4d18-afbe-5e627f4af937' +fx_version 'adamant' + +game 'gta5' description 'Skin Changer' From 7cd4e234e043ededde48806f169fd7a306beb411 Mon Sep 17 00:00:00 2001 From: Yagiz ALP Date: Tue, 28 Jan 2020 21:48:33 +0300 Subject: [PATCH 43/52] Added turkish language (#44) * Create tr.lua * Update tr.lua Added turkish locale * Update fxmanifest.lua * done hmm, yes, floor here is made out of floor. --- fxmanifest.lua | 1 + locales/tr.lua | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 77 insertions(+) create mode 100644 locales/tr.lua diff --git a/fxmanifest.lua b/fxmanifest.lua index 33537561..c1fb2f47 100644 --- a/fxmanifest.lua +++ b/fxmanifest.lua @@ -16,6 +16,7 @@ client_scripts { 'locales/fr.lua', 'locales/pl.lua', 'locales/sv.lua', + 'locales/tr.lua', 'config.lua', 'client/main.lua' } diff --git a/locales/tr.lua b/locales/tr.lua new file mode 100644 index 00000000..54313745 --- /dev/null +++ b/locales/tr.lua @@ -0,0 +1,76 @@ +Locales['tr'] = { + ['sex'] = 'cinsiyet', + ['face'] = 'yüz', + ['skin'] = 'deri', + ['wrinkles'] = 'kırışıklıklar', + ['wrinkle_thickness'] = 'kırışıklık yoğunluğu', + ['beard_type'] = 'sakal tipi', + ['beard_size'] = 'sakal boyutu', + ['beard_color_1'] = 'sakal rengi 1', + ['beard_color_2'] = 'sakal rengi 2', + ['hair_1'] = 'saç 1', + ['hair_2'] = 'saç 2', + ['hair_color_1'] = 'saç rengi 1', + ['hair_color_2'] = 'saç rengi 2', + ['eye_color'] = 'göz rengi', + ['eyebrow_type'] = 'kaş tipi', + ['eyebrow_size'] = 'kaş boyutu', + ['eyebrow_color_1'] = 'kaş rengi 1', + ['eyebrow_color_2'] = 'Kaş Rengi 2', + ['makeup_type'] = 'makyaj tipi', + ['makeup_thickness'] = 'makyaj kalınlığı', + ['makeup_color_1'] = 'makyaj rengi 1', + ['makeup_color_2'] = 'makyaj rengi 2', + ['lipstick_type'] = 'ruj tipi', + ['lipstick_thickness'] = 'ruj kalınlığı', + ['lipstick_color_1'] = 'ruj rengi 1', + ['lipstick_color_2'] = 'ruj rengi 2', + ['ear_accessories'] = 'kulak aksessuarları', + ['ear_accessories_color'] = 'kulak aksessuar rengi', + ['tshirt_1'] = 'tişört 1', + ['tshirt_2'] = 'tişört 2', + ['torso_1'] = 'gövde 1', + ['torso_2'] = 'gövde 2', + ['decals_1'] = 'çıkartma 1', + ['decals_2'] = 'çıkartma 2', + ['arms'] = 'kollar', + ['arms_2'] = 'kollar 2' + ['pants_1'] = 'pantolonlar 1', + ['pants_2'] = 'pantolonlar 2', + ['shoes_1'] = 'ayakkabılar 1', + ['shoes_2'] = 'ayakkabılar 2', + ['mask_1'] = 'maske 1', + ['mask_2'] = 'maske 2', + ['bproof_1'] = 'zırh 1', + ['bproof_2'] = 'zırh 2', + ['chain_1'] = 'zincir 1', + ['chain_2'] = 'zincir 2', + ['helmet_1'] = 'kask 1', + ['helmet_2'] = 'kask 2', + ['watches_1'] = 'saat 1', + ['watches_2'] = 'saat 2', + ['bracelets_1'] = 'takı 1', + ['bracelets_2'] = 'takı 2', + ['glasses_1'] = 'gözlük 1', + ['glasses_2'] = 'gözlük 2', + ['bag'] = 'çanta', + ['bag_color'] = 'çanta rengi', + ['blemishes'] = 'leke', + ['blemishes_size']= 'leke kalınlığı', + ['ageing'] = 'yaşlanma', + ['ageing_1'] = 'yaşlanma kalınlığı', + ['blush'] = 'kızarıklık', + ['blush_1'] = 'kızarıklık kalınlığı', + ['blush_color'] = 'kızarıklık rengi', + ['complexion'] = 'ten', + ['complexion_1'] = 'ten Kalınlığı', + ['sun'] = 'yanık', + ['sun_1'] = 'yanık kalınlığı', + ['freckles'] = 'çiller', + ['freckles_1'] = 'çil kalınlığı', + ['chest_hair'] = 'gövde kılı', + ['chest_hair_1'] = 'gövde kılı kalınlığı', + ['chest_color'] = 'gövde kılı rengi', + ['bodyb'] = 'gövde lekesi', + ['bodyb_size'] = 'gövde lekesi kalınlığı' +} From 74aa8328b6f6d964752ed53f6ef212ebb2398a63 Mon Sep 17 00:00:00 2001 From: ElPumpo Date: Thu, 30 Jan 2020 11:33:40 +0100 Subject: [PATCH 44/52] Fixed syntax errors and more --- README.md | 4 ++- config.lua | 1 + locales/br.lua | 2 +- locales/de.lua | 2 +- locales/en.lua | 2 +- locales/es.lua | 94 +++++++++++++++++++++++++------------------------- locales/fi.lua | 2 +- locales/fr.lua | 2 +- locales/pl.lua | 2 +- locales/sv.lua | 2 +- locales/tr.lua | 4 +-- 11 files changed, 60 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index cdff521a..93583906 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # skinchanger +skinchanger is a resource that makes it easy to set and get player ped clothing. It supports the freemode peds `mp_m_freemode_01` and `mp_f_freemode_01`. + ## Download & Installation ### Using [fvm](https://github.com/qlaffont/fvm-installer) @@ -92,7 +94,7 @@ end) ### License skinchanger - make your own skin! -Copyright (C) 2015-2018 Jérémie N'gadi +Copyright (C) 2015-2020 Jérémie N'gadi 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. diff --git a/config.lua b/config.lua index 5290495d..a3d6aa84 100644 --- a/config.lua +++ b/config.lua @@ -1,2 +1,3 @@ Config = {} + Config.Locale = 'en' diff --git a/locales/br.lua b/locales/br.lua index 7dcaa93c..355e9664 100644 --- a/locales/br.lua +++ b/locales/br.lua @@ -72,5 +72,5 @@ Locales['br'] = { ['chest_hair_1'] = 'quantidade de cabelo no peito', ['chest_color'] = 'cor do cabelo no peito', ['bodyb'] = 'manchas no corpo', - ['bodyb_size'] = 'espessura de manchas do corpo' + ['bodyb_size'] = 'espessura de manchas do corpo', } diff --git a/locales/de.lua b/locales/de.lua index 73712d23..ccd88014 100644 --- a/locales/de.lua +++ b/locales/de.lua @@ -72,5 +72,5 @@ Locales['de'] = { ['chest_hair_1'] = 'chest hair thickness', ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['bodyb_size'] = 'body blemishes thickness', } diff --git a/locales/en.lua b/locales/en.lua index d808137c..f58354ea 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -72,5 +72,5 @@ Locales['en'] = { ['chest_hair_1'] = 'chest hair thickness', ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['bodyb_size'] = 'body blemishes thickness', } diff --git a/locales/es.lua b/locales/es.lua index 8d3cba00..983e731e 100644 --- a/locales/es.lua +++ b/locales/es.lua @@ -5,54 +5,54 @@ Locales['es'] = { ['wrinkles'] = 'arrugas', ['wrinkle_thickness'] = 'grosor arrugas', ['beard_type'] = 'tipo de barba', -  ['beard_size'] = 'tamaño barba', -  ['beard_color_1'] = 'color de barba 1', -  ['beard_color_2'] = 'color de barba 2', -  ['hair_1'] = 'cabello 1', -  ['hair_2'] = 'cabello 2', -  ['hair_color_1'] = 'color de cabello 1', -  ['hair_color_2'] = 'color de cabello 2', -  ['eye_color'] = 'color de ojos', -  ['eyebrow_type'] = 'tipo de ceja', -  ['eyebrow_size'] = 'tamaño ceja', -  ['eyebrow_color_1'] = 'color de ceja 1', -  ['eyebrow_color_2'] = 'color de ceja 2', -  ['makeup_type'] = 'tipo de maquillaje', -  ['makeup_thickness'] = 'espesor maquillaje', -  ['makeup_color_1'] = 'color maquillaje 1', -  ['makeup_color_2'] = 'color maquillaje 2', -  ['lipstick_type'] = 'tipo de barra de labios', -  ['lipstick_thickness'] = 'grosor barra de labios', -  ['lipstick_color_1'] = 'color barra de labios 1', -  ['lipstick_color_2'] = 'color barra de labios 2', -  ['ear_accessories'] = 'accesorios oreja', -  ['ear_accessories_color'] = 'color accesorios oreja', -  ['tshirt_1'] = 'camiseta 1', -  ['tshirt_2'] = 'camiseta 2', -  ['torso_1'] = 'torso 1', -  ['torso_2'] = 'torso 2', -  ['decals_1'] = 'tatuajes 1', -  ['decals_2'] = 'tatuajes 2', + ['beard_size'] = 'tamaño barba', + ['beard_color_1'] = 'color de barba 1', + ['beard_color_2'] = 'color de barba 2', + ['hair_1'] = 'cabello 1', + ['hair_2'] = 'cabello 2', + ['hair_color_1'] = 'color de cabello 1', + ['hair_color_2'] = 'color de cabello 2', + ['eye_color'] = 'color de ojos', + ['eyebrow_type'] = 'tipo de ceja', + ['eyebrow_size'] = 'tamaño ceja', + ['eyebrow_color_1'] = 'color de ceja 1', + ['eyebrow_color_2'] = 'color de ceja 2', + ['makeup_type'] = 'tipo de maquillaje', + ['makeup_thickness'] = 'espesor maquillaje', + ['makeup_color_1'] = 'color maquillaje 1', + ['makeup_color_2'] = 'color maquillaje 2', + ['lipstick_type'] = 'tipo de barra de labios', + ['lipstick_thickness'] = 'grosor barra de labios', + ['lipstick_color_1'] = 'color barra de labios 1', + ['lipstick_color_2'] = 'color barra de labios 2', + ['ear_accessories'] = 'accesorios oreja', + ['ear_accessories_color'] = 'color accesorios oreja', + ['tshirt_1'] = 'camiseta 1', + ['tshirt_2'] = 'camiseta 2', + ['torso_1'] = 'torso 1', + ['torso_2'] = 'torso 2', + ['decals_1'] = 'tatuajes 1', + ['decals_2'] = 'tatuajes 2', ['arms'] = 'brazos', ['arms_2'] = 'brazos 2', -  ['pants_1'] = 'pantalones 1', -  ['pants_2'] = 'pantalones 2', -  ['shoes_1'] = 'zapatos 1', -  ['shoes_2'] = 'zapatos 2', -  ['mask_1'] = 'máscara 1', -  ['mask_2'] = 'máscara 2', -  ['bproof_1'] = 'chaleco antibalas 1', -  ['bproof_2'] = 'chaleco antibalas 2', -  ['chain_1'] = 'cadena 1', -  ['chain_2'] = 'cadena 2', -  ['helmet_1'] = 'casco 1', -  ['helmet_2'] = 'casco 2', -  ['watches_1'] = 'relojes 1', -  ['watches_2'] = 'relojes 2', -  ['bracelets_1'] = 'pulseras 1', -  ['bracelets_2'] = 'pulseras 2', -  ['glasses_1'] = 'gafas 1', -  ['glasses_2'] = 'gafas 2', + ['pants_1'] = 'pantalones 1', + ['pants_2'] = 'pantalones 2', + ['shoes_1'] = 'zapatos 1', + ['shoes_2'] = 'zapatos 2', + ['mask_1'] = 'máscara 1', + ['mask_2'] = 'máscara 2', + ['bproof_1'] = 'chaleco antibalas 1', + ['bproof_2'] = 'chaleco antibalas 2', + ['chain_1'] = 'cadena 1', + ['chain_2'] = 'cadena 2', + ['helmet_1'] = 'casco 1', + ['helmet_2'] = 'casco 2', + ['watches_1'] = 'relojes 1', + ['watches_2'] = 'relojes 2', + ['bracelets_1'] = 'pulseras 1', + ['bracelets_2'] = 'pulseras 2', + ['glasses_1'] = 'gafas 1', + ['glasses_2'] = 'gafas 2', ['bag'] = 'bolsa', ['bag_color'] = 'color de la bolsa', ['blemishes'] = 'manchas', @@ -72,5 +72,5 @@ Locales['es'] = { ['chest_hair_1'] = 'espesor del pecholobo', ['chest_color'] = 'color del pecholobo', ['bodyb'] = 'manchas corporales', - ['bodyb_size'] = 'opacidad manchas corporales' + ['bodyb_size'] = 'opacidad manchas corporales', } diff --git a/locales/fi.lua b/locales/fi.lua index d1a0d6e4..ef2e937b 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -72,5 +72,5 @@ Locales['fi'] = { ['chest_hair_1'] = 'chest hair thickness', ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['bodyb_size'] = 'body blemishes thickness', } diff --git a/locales/fr.lua b/locales/fr.lua index 6ecc2f8b..91238c38 100644 --- a/locales/fr.lua +++ b/locales/fr.lua @@ -72,5 +72,5 @@ Locales['fr'] = { ['chest_hair_1'] = 'opacité pillositée', ['chest_color'] = 'couleur pillositée', ['bodyb'] = 'imperfections du corps', - ['bodyb_size'] = 'opacité imperfections' + ['bodyb_size'] = 'opacité imperfections', } diff --git a/locales/pl.lua b/locales/pl.lua index 468b891e..bb6a8089 100644 --- a/locales/pl.lua +++ b/locales/pl.lua @@ -72,5 +72,5 @@ Locales['pl'] = { ['chest_hair_1'] = 'chest hair thickness', ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['bodyb_size'] = 'body blemishes thickness', } diff --git a/locales/sv.lua b/locales/sv.lua index ff65a74e..9ca5aab3 100644 --- a/locales/sv.lua +++ b/locales/sv.lua @@ -72,5 +72,5 @@ Locales['sv'] = { ['chest_hair_1'] = 'chest hair thickness', ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness' + ['bodyb_size'] = 'body blemishes thickness', } diff --git a/locales/tr.lua b/locales/tr.lua index 54313745..cec054f7 100644 --- a/locales/tr.lua +++ b/locales/tr.lua @@ -34,7 +34,7 @@ Locales['tr'] = { ['decals_1'] = 'çıkartma 1', ['decals_2'] = 'çıkartma 2', ['arms'] = 'kollar', - ['arms_2'] = 'kollar 2' + ['arms_2'] = 'kollar 2', ['pants_1'] = 'pantolonlar 1', ['pants_2'] = 'pantolonlar 2', ['shoes_1'] = 'ayakkabılar 1', @@ -72,5 +72,5 @@ Locales['tr'] = { ['chest_hair_1'] = 'gövde kılı kalınlığı', ['chest_color'] = 'gövde kılı rengi', ['bodyb'] = 'gövde lekesi', - ['bodyb_size'] = 'gövde lekesi kalınlığı' + ['bodyb_size'] = 'gövde lekesi kalınlığı', } From 4b4b48879d287bb4f01e020813c16226ec63b505 Mon Sep 17 00:00:00 2001 From: Vygantas Skirius Date: Fri, 3 Jul 2020 20:16:42 +0300 Subject: [PATCH 45/52] Max values fix for ears (#48) --- client/main.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index b9e741dc..28bb849c 100644 --- a/client/main.lua +++ b/client/main.lua @@ -161,8 +161,8 @@ function GetMaxVals() chest_3 = GetNumHairColors()-1, bodyb_1 = GetNumHeadOverlayValues(11)-1, bodyb_2 = 10, - ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 1) - 1, - ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 1, Character['ears_1'] - 1), + ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 2) - 1, + ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 2, Character['ears_1'] - 1), tshirt_1 = GetNumberOfPedDrawableVariations (playerPed, 8) - 1, tshirt_2 = GetNumberOfPedTextureVariations (playerPed, 8, Character['tshirt_1']) - 1, torso_1 = GetNumberOfPedDrawableVariations (playerPed, 11) - 1, From 1326fcdab023d2a6fb8d51c426cc446e813c6445 Mon Sep 17 00:00:00 2001 From: protaknium <49377950+protaknium@users.noreply.github.com> Date: Fri, 3 Jul 2020 20:17:10 +0300 Subject: [PATCH 46/52] Update fi.lua (#51) --- locales/fi.lua | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/locales/fi.lua b/locales/fi.lua index ef2e937b..9f676c7a 100644 --- a/locales/fi.lua +++ b/locales/fi.lua @@ -12,7 +12,7 @@ Locales['fi'] = { ['hair_2'] = 'hiukset 2', ['hair_color_1'] = 'hiuksien väri 1', ['hair_color_2'] = 'hiuksien väri 2', - ['eye_color'] = 'eye color', + ['eye_color'] = 'Silmien väri', ['eyebrow_type'] = 'kulmakarva tyyli', ['eyebrow_size'] = 'kulmakarvojen tiheys', ['eyebrow_color_1'] = 'kulmakarvojen väri 1', @@ -29,8 +29,8 @@ Locales['fi'] = { ['ear_accessories_color'] = 'korvakorujen väri', ['tshirt_1'] = 't-Paita 1', ['tshirt_2'] = 't-Paita 2', - ['torso_1'] = 'torso 1', - ['torso_2'] = 'torso 2', + ['torso_1'] = 'paita 1', + ['torso_2'] = 'paita 2', ['decals_1'] = 'kerros 1', ['decals_2'] = 'kerros 2', ['arms'] = 'kädet', @@ -47,30 +47,30 @@ Locales['fi'] = { ['chain_2'] = 'korut 2', ['helmet_1'] = 'kypärät 1', ['helmet_2'] = 'kypärät 2', - ['watches_1'] = 'watches 1', - ['watches_2'] = 'watches 2', - ['bracelets_1'] = 'bracelets 1', - ['bracelets_2'] = 'bracelets 2', + ['watches_1'] = 'kellot 1', + ['watches_2'] = 'kellot 2', + ['bracelets_1'] = 'rannekkeet 1', + ['bracelets_2'] = 'rannekkeet 2', ['glasses_1'] = 'lasit 1', ['glasses_2'] = 'lasit 2', ['bag'] = 'reput', ['bag_color'] = 'repun väri', - ['blemishes'] = 'blemishes', - ['blemishes_size']= 'blemishes thickness', - ['ageing'] = 'ageing', - ['ageing_1'] = 'ageing thickness', - ['blush'] = 'blush', - ['blush_1'] = 'blush thickness', - ['blush_color'] = 'blush color', - ['complexion'] = 'complexion', - ['complexion_1'] = 'complexion thickness', - ['sun'] = 'sun', - ['sun_1'] = 'sun thickness', - ['freckles'] = 'freckles', - ['freckles_1'] = 'freckles thickness', - ['chest_hair'] = 'chest hair', - ['chest_hair_1'] = 'chest hair thickness', - ['chest_color'] = 'chest hair color', - ['bodyb'] = 'body blemishes', - ['bodyb_size'] = 'body blemishes thickness', + ['blemishes'] = 'pisamat', + ['blemishes_size']= 'pisamien paksuus', + ['ageing'] = 'ikääntyminen', + ['ageing_1'] = 'ikääntyminen paksuus', + ['blush'] = 'punastuminen', + ['blush_1'] = 'punastumisen paksuus', + ['blush_color'] = 'punastumisen väri', + ['complexion'] = 'pigmentti', + ['complexion_1'] = 'pigmentin paksuus', + ['sun'] = 'rusketus', + ['sun_1'] = 'rusketus paksuus', + ['freckles'] = 'pilkut', + ['freckles_1'] = 'pilkkujen paksuus', + ['chest_hair'] = 'rintakarvat', + ['chest_hair_1'] = 'rintakarvojen tiheys', + ['chest_color'] = 'rintakarvojen väri', + ['bodyb'] = 'pisamat kehossa', + ['bodyb_size'] = 'kehopisamien paksuus', } From f79ad3fb01f4b29408d251d2b7a45dd9c6f3ba31 Mon Sep 17 00:00:00 2001 From: Vygantas Skirius Date: Fri, 3 Jul 2020 20:17:32 +0300 Subject: [PATCH 47/52] Component id's for components with texture changes (#49) --- client/main.lua | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/client/main.lua b/client/main.lua index 28bb849c..977cd097 100644 --- a/client/main.lua +++ b/client/main.lua @@ -6,33 +6,33 @@ local Components = { {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_color_2'), name = 'hair_color_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('tshirt_1'), name = 'tshirt_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 8}, {label = _U('tshirt_2'), name = 'tshirt_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'tshirt_1'}, - {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('torso_1'), name = 'torso_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 11}, {label = _U('torso_2'), name = 'torso_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'torso_1'}, - {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('decals_1'), name = 'decals_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 10}, {label = _U('decals_2'), name = 'decals_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'decals_1'}, {label = _U('arms'), name = 'arms', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('arms_2'), name = 'arms_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5}, + {label = _U('pants_1'), name = 'pants_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, componentId = 4}, {label = _U('pants_2'), name = 'pants_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.5, textureof = 'pants_1'}, - {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8}, + {label = _U('shoes_1'), name = 'shoes_1', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, componentId = 6}, {label = _U('shoes_2'), name = 'shoes_2', value = 0, min = 0, zoomOffset = 0.8, camOffset = -0.8, textureof = 'shoes_1'}, - {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('mask_1'), name = 'mask_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, componentId = 1}, {label = _U('mask_2'), name = 'mask_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'mask_1'}, - {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bproof_1'), name = 'bproof_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 9}, {label = _U('bproof_2'), name = 'bproof_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bproof_1'}, - {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('chain_1'), name = 'chain_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, componentId = 7}, {label = _U('chain_2'), name = 'chain_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'chain_1'}, {label = _U('helmet_1'), name = 'helmet_1', value = -1, min = -1, zoomOffset = 0.6, camOffset = 0.65, componentId = 0 }, {label = _U('helmet_2'), name = 'helmet_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'helmet_1'}, - {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('glasses_1'), name = 'glasses_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, componentId = 1}, {label = _U('glasses_2'), name = 'glasses_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65, textureof = 'glasses_1'}, - {label = _U('watches_1'), name = 'watches_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('watches_1'), name = 'watches_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15, componentId = 6}, {label = _U('watches_2'), name = 'watches_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'watches_1'}, - {label = _U('bracelets_1'), name = 'bracelets_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bracelets_1'), name = 'bracelets_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15, componentId = 7}, {label = _U('bracelets_2'), name = 'bracelets_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bracelets_1'}, - {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 5}, {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'}, {label = _U('eye_color'), name = 'eye_color', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, @@ -47,7 +47,7 @@ local Components = { {label = _U('lipstick_thickness'), name = 'lipstick_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('lipstick_color_1'), name = 'lipstick_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('lipstick_color_2'), name = 'lipstick_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, - {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('ear_accessories'), name = 'ears_1', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.65, componentId = 2}, {label = _U('ear_accessories_color'), name = 'ears_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65, textureof = 'ears_1'}, {label = _U('chest_hair'), name = 'chest_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('chest_hair_1'), name = 'chest_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, From 7f8b7591b5c2bdd77d72388ee51744a24cc6f876 Mon Sep 17 00:00:00 2001 From: Pained_Psyche Date: Sun, 23 Aug 2020 21:32:32 +0200 Subject: [PATCH 48/52] added support for face blending and facial features --- client/main.lua | 103 ++++++++++++++++++++++++++++++++++++++++++++---- locales/en.lua | 26 +++++++++++- 2 files changed, 120 insertions(+), 9 deletions(-) diff --git a/client/main.lua b/client/main.lua index 977cd097..4722c843 100644 --- a/client/main.lua +++ b/client/main.lua @@ -1,7 +1,26 @@ local Components = { {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('face'), name = 'face', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('skin'), name = 'skin', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('mom'), name = 'mom', value = 21, min = 21, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('dad'), name = 'dad', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('resemblance'), name = 'face_md_weight', value = 5, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('skin_tone'), name = 'skin_md_weight', value = 5, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_1'), name = 'nose_1', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_2'), name = 'nose_2', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_3'), name = 'nose_3', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_4'), name = 'nose_4', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_5'), name = 'nose_5', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('nose_6'), name = 'nose_6', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('cheeks_1'), name = 'cheeks_1', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('cheeks_2'), name = 'cheeks_2', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('cheeks_3'), name = 'cheeks_3', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('lip_fullness'), name = 'lip_thickness', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('jaw_bone_width'), name = 'jaw_1', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('jaw_bone_length'), name = 'jaw_2', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('chin_height'), name = 'chin_1', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('chin_length'), name = 'chin_2', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('chin_width'), name = 'chin_3', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('chin_hole'), name = 'chin_4', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('neck_thickness'), name = 'neck_thickness', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('hair_1'), name = 'hair_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_2'), name = 'hair_2', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('hair_color_1'), name = 'hair_color_1', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, @@ -35,10 +54,13 @@ local Components = { {label = _U('bag'), name = 'bags_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, componentId = 5}, {label = _U('bag_color'), name = 'bags_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15, textureof = 'bags_1'}, {label = _U('eye_color'), name = 'eye_color', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eye_squint'), name = 'eye_squint', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('eyebrow_size'), name = 'eyebrows_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('eyebrow_type'), name = 'eyebrows_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('eyebrow_color_1'), name = 'eyebrows_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('eyebrow_color_2'), name = 'eyebrows_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_height'), name = 'eyebrows_5', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, + {label = _U('eyebrow_depth'), name = 'eyebrows_6', value = 0, min = -10, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('makeup_type'), name = 'makeup_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('makeup_thickness'), name = 'makeup_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('makeup_color_1'), name = 'makeup_3', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, @@ -120,8 +142,27 @@ function GetMaxVals() local data = { sex = 1, - face = 45, - skin = 45, + mom = 45, -- numbers 21-41 and 45 are female (22 total) + dad = 44, -- numbers 0-20 and 42-44 are male (24 total) + face_md_weight = 10, + skin_md_weight = 10, + nose_1 = 10, + nose_2 = 10, + nose_3 = 10, + nose_4 = 10, + nose_5 = 10, + nose_6 = 10, + cheeks_1 = 10, + cheeks_2 = 10, + cheeks_3 = 10, + lip_thickness = 10, + jaw_1 = 10, + jaw_2 = 10, + chin_1 = 10, + chin_2 = 10, + chin_3 = 10, + chin_4 = 10, + neck_thickness = 10, age_1 = GetNumHeadOverlayValues(3)-1, age_2 = 10, beard_1 = GetNumHeadOverlayValues(1)-1, @@ -133,10 +174,13 @@ function GetMaxVals() hair_color_1 = GetNumHairColors()-1, hair_color_2 = GetNumHairColors()-1, eye_color = 31, + eye_squint = 10, eyebrows_1 = GetNumHeadOverlayValues(2)-1, eyebrows_2 = 10, eyebrows_3 = GetNumHairColors()-1, eyebrows_4 = GetNumHairColors()-1, + eyebrows_5 = 10, + eyebrows_6 = 10, makeup_1 = GetNumHeadOverlayValues(4)-1, makeup_2 = 10, makeup_3 = GetNumHairColors()-1, @@ -207,11 +251,31 @@ function ApplySkin(skin, clothes) for k,v in pairs(clothes) do if k ~= 'sex' and - k ~= 'face' and - k ~= 'skin' and + k ~= 'mom' and + k ~= 'dad' and + k ~= 'face_md_weight' and + k ~= 'skin_md_weight' and + k ~= 'nose_1' and + k ~= 'nose_2' and + k ~= 'nose_3' and + k ~= 'nose_4' and + k ~= 'nose_5' and + k ~= 'nose_6' and + k ~= 'cheeks_1' and + k ~= 'cheeks_2' and + k ~= 'cheeks_3' and + k ~= 'lip_thickness' and + k ~= 'jaw_1' and + k ~= 'jaw_2' and + k ~= 'chin_1' and + k ~= 'chin_2' and + k ~= 'chin_3' and + k ~= 'chin_4' and + k ~= 'neck_thickness' and k ~= 'age_1' and k ~= 'age_2' and k ~= 'eye_color' and + k ~= 'eye_squint' and k ~= 'beard_1' and k ~= 'beard_2' and k ~= 'beard_3' and @@ -224,6 +288,8 @@ function ApplySkin(skin, clothes) k ~= 'eyebrows_2' and k ~= 'eyebrows_3' and k ~= 'eyebrows_4' and + k ~= 'eyebrows_5' and + k ~= 'eyebrows_6' and k ~= 'makeup_1' and k ~= 'makeup_2' and k ~= 'makeup_3' and @@ -254,7 +320,30 @@ function ApplySkin(skin, clothes) end end - SetPedHeadBlendData (playerPed, Character['face'], Character['face'], Character['face'], Character['skin'], Character['skin'], Character['skin'], 1.0, 1.0, 1.0, true) + local face_weight = (Character['face_md_weight'] / 10) + 0.0 + local skin_weight = (Character['skin_md_weight'] / 10) + 0.0 + SetPedHeadBlendData (playerPed, Character['mom'], Character['dad'], 0, Character['mom'], Character['dad'], 0, face_weight, skin_weight, 0.0, false) + + SetPedFaceFeature (playerPed, 0, (Character['nose_1'] / 10) + 0.0) -- Nose Width + SetPedFaceFeature (playerPed, 1, (Character['nose_2'] / 10) + 0.0) -- Nose Peak Height + SetPedFaceFeature (playerPed, 2, (Character['nose_3'] / 10) + 0.0) -- Nose Peak Length + SetPedFaceFeature (playerPed, 3, (Character['nose_4'] / 10) + 0.0) -- Nose Bone Height + SetPedFaceFeature (playerPed, 4, (Character['nose_5'] / 10) + 0.0) -- Nose Peak Lowering + SetPedFaceFeature (playerPed, 5, (Character['nose_6'] / 10) + 0.0) -- Nose Bone Twist + SetPedFaceFeature (playerPed, 6, (Character['eyebrows_5'] / 10) + 0.0) -- Eyebrow height + SetPedFaceFeature (playerPed, 7, (Character['eyebrows_6'] / 10) + 0.0) -- Eyebrow depth + SetPedFaceFeature (playerPed, 8, (Character['cheeks_1'] / 10) + 0.0) -- Cheekbones Height + SetPedFaceFeature (playerPed, 9, (Character['cheeks_2'] / 10) + 0.0) -- Cheekbones Width + SetPedFaceFeature (playerPed, 10, (Character['cheeks_3'] / 10) + 0.0) -- Cheeks Width + SetPedFaceFeature (playerPed, 11, (Character['eye_squint'] / 10) + 0.0) -- Eyes squint + SetPedFaceFeature (playerPed, 12, (Character['lip_thickness'] / 10) + 0.0) -- Lip Fullness + SetPedFaceFeature (playerPed, 13, (Character['jaw_1'] / 10) + 0.0) -- Jaw Bone Width + SetPedFaceFeature (playerPed, 14, (Character['jaw_2'] / 10) + 0.0) -- Jaw Bone Length + SetPedFaceFeature (playerPed, 15, (Character['chin_1'] / 10) + 0.0) -- Chin Height + SetPedFaceFeature (playerPed, 16, (Character['chin_2'] / 10) + 0.0) -- Chin Length + SetPedFaceFeature (playerPed, 17, (Character['chin_3'] / 10) + 0.0) -- Chin Width + SetPedFaceFeature (playerPed, 18, (Character['chin_4'] / 10) + 0.0) -- Chin Hole Size + SetPedFaceFeature (playerPed, 19, (Character['neck_thickness'] / 10) + 0.0) -- Neck Thickness SetPedHairColor (playerPed, Character['hair_color_1'], Character['hair_color_2']) -- Hair Color SetPedHeadOverlay (playerPed, 3, Character['age_1'], (Character['age_2'] / 10) + 0.0) -- Age + opacity diff --git a/locales/en.lua b/locales/en.lua index f58354ea..851ba646 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -1,7 +1,26 @@ Locales['en'] = { ['sex'] = 'sex', - ['face'] = 'face', - ['skin'] = 'skin', + ['mom'] = 'mom\'s face', + ['dad'] = 'dad\'s face', + ['resemblance'] = 'resemblance', + ['skin_tone'] = 'skin tone', + ['nose_1'] = 'nose width', + ['nose_2'] = 'nose peak height', + ['nose_3'] = 'nose peak length', + ['nose_4'] = 'nose bone height', + ['nose_5'] = 'nose peak lowering', + ['nose_6'] = 'nose bone twist', + ['cheeks_1'] = 'cheekbones height', + ['cheeks_2'] = 'cheekbones width', + ['cheeks_3'] = 'cheeks width', + ['lip_fullness'] = 'lip fullness', + ['jaw_bone_width'] = 'jaw bone width', + ['jaw_bone_length'] = 'jaw bone length', + ['chin_height'] = 'chin height', + ['chin_length'] = 'chin length', + ['chin_width'] = 'chin width', + ['chin_hole'] = 'chin hole size', + ['neck_thickness'] = 'neck thickness', ['wrinkles'] = 'wrinkles', ['wrinkle_thickness'] = 'wrinkle thickness', ['beard_type'] = 'beard type', @@ -13,10 +32,13 @@ Locales['en'] = { ['hair_color_1'] = 'hair color 1', ['hair_color_2'] = 'hair color 2', ['eye_color'] = 'eye color', + ['eye_squint'] = 'eye squint', ['eyebrow_type'] = 'eyebrow type', ['eyebrow_size'] = 'eyebrow size', ['eyebrow_color_1'] = 'eyebrow color 1', ['eyebrow_color_2'] = 'eyebrow color 2', + ['eyebrow_depth'] = 'eyebrow depth', + ['eyebrow_height'] = 'eyebrow height', ['makeup_type'] = 'makeup type', ['makeup_thickness'] = 'makeup thickness', ['makeup_color_1'] = 'makeup color 1', From d924ed4d9f3c7330be7119bdcfcb0493d8b74677 Mon Sep 17 00:00:00 2001 From: Pained_Psyche Date: Thu, 3 Sep 2020 18:55:58 +0200 Subject: [PATCH 49/52] added support for a hidden feature of skin blemishes, extra body skin effect on head overlay index 12 --- client/main.lua | 17 ++++++++++++++++- locales/en.lua | 4 +++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 4722c843..caf35519 100644 --- a/client/main.lua +++ b/client/main.lua @@ -76,6 +76,8 @@ local Components = { {label = _U('chest_color'), name = 'chest_3', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('bodyb'), name = 'bodyb_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('bodyb_size'), name = 'bodyb_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bodyb_extra'), name = 'bodyb_3', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.15}, + {label = _U('bodyb_extra_thickness'), name = 'bodyb_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.15}, {label = _U('wrinkles'), name = 'age_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('wrinkle_thickness'), name = 'age_2', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, {label = _U('blemishes'), name = 'blemishes_1', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.65}, @@ -205,6 +207,8 @@ function GetMaxVals() chest_3 = GetNumHairColors()-1, bodyb_1 = GetNumHeadOverlayValues(11)-1, bodyb_2 = 10, + bodyb_3 = GetNumHeadOverlayValues(12)-1, + bodyb_4 = 10, ears_1 = GetNumberOfPedPropDrawableVariations (playerPed, 2) - 1, ears_2 = GetNumberOfPedPropTextureVariations (playerPed, 2, Character['ears_1'] - 1), tshirt_1 = GetNumberOfPedDrawableVariations (playerPed, 8) - 1, @@ -300,6 +304,7 @@ function ApplySkin(skin, clothes) k ~= 'lipstick_4' and k ~= 'blemishes_1' and k ~= 'blemishes_2' and + k ~= 'blemishes_3' and k ~= 'blush_1' and k ~= 'blush_2' and k ~= 'blush_3' and @@ -313,7 +318,9 @@ function ApplySkin(skin, clothes) k ~= 'chest_2' and k ~= 'chest_3' and k ~= 'bodyb_1' and - k ~= 'bodyb_2' + k ~= 'bodyb_2' and + k ~= 'bodyb_3' and + k ~= 'bodyb_4' then Character[k] = v end @@ -367,6 +374,14 @@ function ApplySkin(skin, clothes) SetPedHeadOverlayColor (playerPed, 10, 1, Character['chest_3']) -- Torso Color SetPedHeadOverlay (playerPed, 11, Character['bodyb_1'], (Character['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity + if Character['bodyb_3'] == -1 then + print('skinchanger: saving no extra effect') + SetPedHeadOverlay (playerPed, 12, 255, (Character['bodyb_4'] / 10) + 0.0) + else + print('skinchanger: saving extra effect, value ' .. Character['bodyb_3']) + SetPedHeadOverlay (playerPed, 12, Character['bodyb_3'], (Character['bodyb_4'] / 10) + 0.0) -- Blemishes 'added body effect' + opacity + end + if Character['ears_1'] == -1 then ClearPedProp(playerPed, 2) else diff --git a/locales/en.lua b/locales/en.lua index 851ba646..be297c96 100644 --- a/locales/en.lua +++ b/locales/en.lua @@ -78,7 +78,7 @@ Locales['en'] = { ['bag'] = 'bag', ['bag_color'] = 'bag color', ['blemishes'] = 'blemishes', - ['blemishes_size']= 'blemishes thickness', + ['blemishes_size'] = 'blemishes thickness', ['ageing'] = 'ageing', ['ageing_1'] = 'ageing thickness', ['blush'] = 'blush', @@ -95,4 +95,6 @@ Locales['en'] = { ['chest_color'] = 'chest hair color', ['bodyb'] = 'body blemishes', ['bodyb_size'] = 'body blemishes thickness', + ['bodyb_extra'] = 'blemishes body effect', + ['bodyb_extra_thickness'] = 'blemishes body effect thickness', } From 362a31fb3174ea51e1f5ce9fa67123285b7397f5 Mon Sep 17 00:00:00 2001 From: Pained_Psyche Date: Thu, 3 Sep 2020 19:01:08 +0200 Subject: [PATCH 50/52] removed debugging statements --- client/main.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index caf35519..4585b3d8 100644 --- a/client/main.lua +++ b/client/main.lua @@ -375,10 +375,8 @@ function ApplySkin(skin, clothes) SetPedHeadOverlay (playerPed, 11, Character['bodyb_1'], (Character['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity if Character['bodyb_3'] == -1 then - print('skinchanger: saving no extra effect') SetPedHeadOverlay (playerPed, 12, 255, (Character['bodyb_4'] / 10) + 0.0) else - print('skinchanger: saving extra effect, value ' .. Character['bodyb_3']) SetPedHeadOverlay (playerPed, 12, Character['bodyb_3'], (Character['bodyb_4'] / 10) + 0.0) -- Blemishes 'added body effect' + opacity end From f939321bb89866e66878d3eb20d36fabdef8ce32 Mon Sep 17 00:00:00 2001 From: Pained_Psyche Date: Mon, 7 Sep 2020 12:57:36 +0200 Subject: [PATCH 51/52] a fix for not being able to completely disable body blemishes once enabled, (where value 0 is still a valid, visible effect) --- client/main.lua | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/client/main.lua b/client/main.lua index 4585b3d8..61c2145d 100644 --- a/client/main.lua +++ b/client/main.lua @@ -74,7 +74,7 @@ local Components = { {label = _U('chest_hair'), name = 'chest_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('chest_hair_1'), name = 'chest_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('chest_color'), name = 'chest_3', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, - {label = _U('bodyb'), name = 'bodyb_1', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, + {label = _U('bodyb'), name = 'bodyb_1', value = -1, min = -1, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('bodyb_size'), name = 'bodyb_2', value = 0, min = 0, zoomOffset = 0.75, camOffset = 0.15}, {label = _U('bodyb_extra'), name = 'bodyb_3', value = -1, min = -1, zoomOffset = 0.4, camOffset = 0.15}, {label = _U('bodyb_extra_thickness'), name = 'bodyb_4', value = 0, min = 0, zoomOffset = 0.4, camOffset = 0.15}, @@ -372,7 +372,12 @@ function ApplySkin(skin, clothes) SetPedHeadOverlay (playerPed, 9, Character['moles_1'], (Character['moles_2'] / 10) + 0.0) -- Moles/Freckles + opacity SetPedHeadOverlay (playerPed, 10, Character['chest_1'], (Character['chest_2'] / 10) + 0.0) -- Chest Hair + opacity SetPedHeadOverlayColor (playerPed, 10, 1, Character['chest_3']) -- Torso Color - SetPedHeadOverlay (playerPed, 11, Character['bodyb_1'], (Character['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity + + if Character['bodyb_1'] == -1 then + SetPedHeadOverlay (playerPed, 11, 255, (Character['bodyb_2'] / 10) + 0.0) -- Body Blemishes + opacity + else + SetPedHeadOverlay (playerPed, 11, Character['bodyb_1'], (Character['bodyb_2'] / 10) + 0.0) + end if Character['bodyb_3'] == -1 then SetPedHeadOverlay (playerPed, 12, 255, (Character['bodyb_4'] / 10) + 0.0) From 193708edb62be9f14a74617f693899d42beac7f1 Mon Sep 17 00:00:00 2001 From: Pained_Psyche Date: Wed, 18 Nov 2020 14:00:37 +0100 Subject: [PATCH 52/52] widened the range for face blending weight values, fixed an incorrect value when updating makeup color --- client/main.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/client/main.lua b/client/main.lua index 61c2145d..9932b1bd 100644 --- a/client/main.lua +++ b/client/main.lua @@ -2,8 +2,8 @@ local Components = { {label = _U('sex'), name = 'sex', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('mom'), name = 'mom', value = 21, min = 21, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('dad'), name = 'dad', value = 0, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('resemblance'), name = 'face_md_weight', value = 5, min = 0, zoomOffset = 0.6, camOffset = 0.65}, - {label = _U('skin_tone'), name = 'skin_md_weight', value = 5, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('resemblance'), name = 'face_md_weight', value = 50, min = 0, zoomOffset = 0.6, camOffset = 0.65}, + {label = _U('skin_tone'), name = 'skin_md_weight', value = 50, min = 0, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('nose_1'), name = 'nose_1', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('nose_2'), name = 'nose_2', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, {label = _U('nose_3'), name = 'nose_3', value = 0, min = -10, zoomOffset = 0.6, camOffset = 0.65}, @@ -146,8 +146,8 @@ function GetMaxVals() sex = 1, mom = 45, -- numbers 21-41 and 45 are female (22 total) dad = 44, -- numbers 0-20 and 42-44 are male (24 total) - face_md_weight = 10, - skin_md_weight = 10, + face_md_weight = 100, + skin_md_weight = 100, nose_1 = 10, nose_2 = 10, nose_3 = 10, @@ -327,8 +327,8 @@ function ApplySkin(skin, clothes) end end - local face_weight = (Character['face_md_weight'] / 10) + 0.0 - local skin_weight = (Character['skin_md_weight'] / 10) + 0.0 + local face_weight = (Character['face_md_weight'] / 100) + 0.0 + local skin_weight = (Character['skin_md_weight'] / 100) + 0.0 SetPedHeadBlendData (playerPed, Character['mom'], Character['dad'], 0, Character['mom'], Character['dad'], 0, face_weight, skin_weight, 0.0, false) SetPedFaceFeature (playerPed, 0, (Character['nose_1'] / 10) + 0.0) -- Nose Width @@ -363,7 +363,7 @@ function ApplySkin(skin, clothes) SetPedComponentVariation (playerPed, 2, Character['hair_1'], Character['hair_2'], 2) -- Hair SetPedHeadOverlayColor (playerPed, 1, 1, Character['beard_3'], Character['beard_4']) -- Beard Color SetPedHeadOverlayColor (playerPed, 2, 1, Character['eyebrows_3'], Character['eyebrows_4']) -- Eyebrows Color - SetPedHeadOverlayColor (playerPed, 4, 1, Character['makeup_3'], Character['makeup_4']) -- Makeup Color + SetPedHeadOverlayColor (playerPed, 4, 2, Character['makeup_3'], Character['makeup_4']) -- Makeup Color SetPedHeadOverlayColor (playerPed, 8, 1, Character['lipstick_3'], Character['lipstick_4']) -- Lipstick Color SetPedHeadOverlay (playerPed, 5, Character['blush_1'], (Character['blush_2'] / 10) + 0.0) -- Blush + opacity SetPedHeadOverlayColor (playerPed, 5, 2, Character['blush_3']) -- Blush Color