From 4d7e9c1daa0de9d5eda88e4083080509b22f3c63 Mon Sep 17 00:00:00 2001 From: iLLeniumStudios <104288623+TheiLLeniumStudios@users.noreply.github.com> Date: Thu, 30 Jun 2022 21:03:22 +0200 Subject: [PATCH] fix(client/game): Increase delay for safety reasons --- game/dist/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/game/dist/index.js b/game/dist/index.js index 2e726ca..a216891 100644 --- a/game/dist/index.js +++ b/game/dist/index.js @@ -1 +1 @@ -(()=>{var x=e=>new Promise(a=>setTimeout(a,e)),C=e=>{let a=GetEntityModel(e),t=GetHashKey("mp_m_freemode_01"),r=GetHashKey("mp_f_freemode_01");return a===t||a===r},f=e=>{let a=GetEntityModel(e),t=GetHashKey("mp_m_freemode_01");return a===t};function g(e){return{x:e[0],y:e[1],z:e[2]}}var O=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,1,2,6,7],F=["noseWidth","nosePeakHigh","nosePeakSize","noseBoneHigh","nosePeakLowering","noseBoneTwist","eyeBrownHigh","eyeBrownForward","cheeksBoneHigh","cheeksBoneWidth","cheeksWidth","eyesOpening","lipsThickness","jawBoneWidth","jawBoneBackSize","chinBoneLowering","chinBoneLenght","chinBoneSize","chinHole","neckThickness"],S=["blemishes","beard","eyebrows","ageing","makeUp","blush","complexion","sunDamage","lipstick","moleAndFreckles","chestHair","bodyBlemishes"],le=["Green","Emerald","Light Blue","Ocean Blue","Light Brown","Dark Brown","Hazel","Dark Gray","Light Gray","Pink","Yellow","Purple","Blackout","Shades of Gray","Tequila Sunrise","Atomic","Warp","ECola","Space Ranger","Ying Yang","Bullseye","Lizard","Dragon","Extra Terrestrial","Goat","Smiley","Possessed","Demon","Infected","Alien","Undead","Zombie"];var se={ped:!0,headBlend:!0,faceFeatures:!0,headOverlays:!0,components:!0,props:!0,tattoos:!0},J={head:{animations:{on:{dict:"mp_masks@standard_car@ds@",anim:"put_on_mask",move:51,duration:600},off:{dict:"missheist_agency2ahelmet",anim:"take_off_helmet_stand",move:51,duration:1200}},props:{male:[[1,0]],female:[[1,0]]}},body:{animations:{on:{dict:"clothingtie",anim:"try_tie_negative_a",move:51,duration:1200},off:{dict:"clothingtie",anim:"try_tie_negative_a",move:51,duration:1200}},props:{male:[[11,252],[3,15],[8,15],[10,0],[5,0]],female:[[11,15],[8,14],[3,15],[10,0],[5,0]]}},bottom:{animations:{on:{dict:"re@construction",anim:"out_of_breath",move:51,duration:1300},off:{dict:"re@construction",anim:"out_of_breath",move:51,duration:1300}},props:{male:[[4,61],[6,34]],female:[[4,15],[6,35]]}}};function ce(){RegisterNuiCallbackType("appearance_get_locales"),RegisterNuiCallbackType("appearance_get_settings_and_data"),RegisterNuiCallbackType("appearance_set_camera"),RegisterNuiCallbackType("appearance_turn_around"),RegisterNuiCallbackType("appearance_rotate_camera"),RegisterNuiCallbackType("appearance_change_model"),RegisterNuiCallbackType("appearance_change_head_blend"),RegisterNuiCallbackType("appearance_change_face_feature"),RegisterNuiCallbackType("appearance_change_hair"),RegisterNuiCallbackType("appearance_change_head_overlay"),RegisterNuiCallbackType("appearance_change_eye_color"),RegisterNuiCallbackType("appearance_change_component"),RegisterNuiCallbackType("appearance_change_prop"),RegisterNuiCallbackType("appearance_apply_tattoo"),RegisterNuiCallbackType("appearance_preview_tattoo"),RegisterNuiCallbackType("appearance_delete_tattoo"),RegisterNuiCallbackType("appearance_wear_clothes"),RegisterNuiCallbackType("appearance_remove_clothes"),RegisterNuiCallbackType("appearance_save"),RegisterNuiCallbackType("appearance_exit"),RegisterNuiCallbackType("rotate_left"),RegisterNuiCallbackType("rotate_right"),RegisterNuiCallbackType("get_theme_configuration"),on("__cfx_nui:appearance_get_locales",(e,a)=>{a(ge)}),on("__cfx_nui:appearance_get_settings_and_data",async(e,a)=>{let t=_e(),r=$(),o=q();emitNet("fivem-appearance:server:GetPlayerAces"),await x(100),a({config:t,appearanceData:r,appearanceSettings:o})}),on("__cfx_nui:appearance_set_camera",(e,a)=>{a({}),ee(e)}),on("__cfx_nui:appearance_turn_around",(e,a)=>{a({}),B(PlayerPedId(),180)}),on("__cfx_nui:appearance_rotate_camera",(e,a)=>{a({}),ue(e)}),on("__cfx_nui:appearance_change_model",async(e,a)=>{await L(e);let t=PlayerPedId();SetEntityHeading(PlayerPedId(),Z),SetEntityInvincible(t,!0),TaskStandStill(t,-1);let r=H(t),o=q();a({appearanceSettings:o,appearanceData:r})}),on("__cfx_nui:appearance_change_component",(e,a)=>{let t=PlayerPedId();z(t,e),a(Q(t,e.component_id))}),on("__cfx_nui:appearance_change_prop",(e,a)=>{let t=PlayerPedId();V(t,e),a(X(t,e.prop_id))}),on("__cfx_nui:appearance_change_head_blend",(e,a)=>{a({}),M(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_face_feature",(e,a)=>{a({}),k(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_head_overlay",(e,a)=>{a({}),G(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_hair",(e,a)=>{let t=PlayerPedId();N(t,e),a(de(t,e))}),on("__cfx_nui:appearance_change_eye_color",(e,a)=>{a({}),T(PlayerPedId(),e)}),on("__cfx_nui:appearance_apply_tattoo",(e,a)=>{a({}),me(PlayerPedId(),e)}),on("__cfx_nui:appearance_preview_tattoo",(e,a)=>{a({});let{data:t,tattoo:r}=e;ve(PlayerPedId(),t,r)}),on("__cfx_nui:appearance_delete_tattoo",(e,a)=>{a({}),Pe(PlayerPedId(),e)}),on("__cfx_nui:appearance_wear_clothes",(e,a)=>{a({});let{data:t,key:r}=e;ye(t,r)}),on("__cfx_nui:appearance_remove_clothes",(e,a)=>{a({}),pe(e)}),on("__cfx_nui:appearance_save",(e,a)=>{a({}),Y(e)}),on("__cfx_nui:appearance_exit",(e,a)=>{a({}),Y()}),on("__cfx_nui:rotate_left",(e,a)=>{a({}),B(PlayerPedId(),10)}),on("__cfx_nui:rotate_right",(e,a)=>{a({}),B(PlayerPedId(),-10)}),on("__cfx_nui:get_theme_configuration",(e,a)=>{a(fe)})}var Be=global.exports,he={default:{coords:{x:0,y:2.2,z:.2},point:{x:0,y:0,z:-.05}},head:{coords:{x:0,y:.9,z:.65},point:{x:0,y:0,z:.6}},body:{coords:{x:0,y:1.2,z:.2},point:{x:0,y:0,z:.2}},bottom:{coords:{x:0,y:.98,z:-.7},point:{x:0,y:0,z:-.9}}},Le={default:{x:1.5,y:-1},head:{x:.7,y:-.45},body:{x:1.2,y:-.45},bottom:{x:.7,y:-.45}},U,ae,A,w,Z,m,I,b,h,xe={};function Ce(){let e={hair:[],makeUp:[]};for(let a=0;an.includes(s)))&&i.drawables)for(let s=0;sQ(e,y)),o=D.map(y=>X(e,y)),n={shapeFirst:{min:0,max:45},shapeSecond:{min:0,max:45},shapeThird:{min:0,max:45},skinFirst:{min:0,max:45},skinSecond:{min:0,max:45},skinThird:{min:0,max:45},shapeMix:{min:0,max:1,factor:.1},skinMix:{min:0,max:1,factor:.1},thirdMix:{min:0,max:1,factor:.1}},l=F.reduce((y,_)=>({...y,[_]:{min:-1,max:1,factor:.1}}),{}),i=Ce(),s={beard:i.hair,eyebrows:i.hair,chestHair:i.hair,makeUp:i.makeUp,blush:i.makeUp,lipstick:i.makeUp},c=S.reduce((y,_,v)=>{let P={style:{min:0,max:GetPedHeadOverlayNum(v)-1},opacity:{min:0,max:1,factor:.1}};return s[_]&&Object.assign(P,{color:{items:s[_]}}),{...y,[_]:P}},{}),d={style:{min:0,max:GetNumberOfPedDrawableVariations(e,2)-1},color:{items:i.hair},highlight:{items:i.hair},texture:{min:0,max:GetNumberOfPedTextureVariations(e,2,GetPedDrawableVariation(e,2))-1}};return{ped:a,components:r,props:o,headBlend:n,faceFeatures:l,headOverlays:c,hair:d,eyeColor:{min:0,max:30},tattoos:t}}function _e(){return ae}function ee(e){if(h)return;e!=="current"&&(I=e);let{coords:a,point:t}=he[I],r=b?-1:1;if(m){let o=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),a.x*r,a.y*r,a.z)),n=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z)),l=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",o.x,o.y,o.z,0,0,0,50,!1,0);PointCamAtCoord(l,n.x,n.y,n.z),SetCamActiveWithInterp(l,m,1e3,1,1),h=!0;let i=setInterval(()=>{!IsCamInterpolating(m)&&IsCamActive(l)&&(DestroyCam(m,!1),m=l,h=!1,clearInterval(i))},500)}else{let o=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),a.x,a.y,a.z)),n=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z));m=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",o.x,o.y,o.z,0,0,0,50,!1,0),PointCamAtCoord(m,n.x,n.y,n.z),SetCamActive(m,!0)}}async function ue(e){if(h)return;let{coords:a,point:t}=he[I],r=Le[I],o,n=b?-1:1;e==="left"?o=1:e==="right"&&(o=-1);let l=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),(a.x+r.x)*o*n,(a.y+r.y)*n,a.z)),i=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z)),s=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",l.x,l.y,l.z,0,0,0,50,!1,0);PointCamAtCoord(s,i.x,i.y,i.z),SetCamActiveWithInterp(s,m,1e3,1,1),h=!0;let c=setInterval(()=>{!IsCamInterpolating(m)&&IsCamActive(s)&&(DestroyCam(m,!1),m=s,h=!1,clearInterval(c))},500)}function B(e,a){b=!b;let t=OpenSequenceTask()??0;t!==0&&(TaskGoStraightToCoord(0,w.x,w.y,w.z,8,-1,GetEntityHeading(e)-a,.1),TaskStandStill(0,-1),CloseSequenceTask(t),ClearPedTasks(e),TaskPerformSequence(e,t),ClearSequenceTask(t))}async function ye(e,a){let{animations:t,props:r}=J[a],{dict:o,anim:n,move:l,duration:i}=t.on,{male:s,female:c}=r,{components:d}=e,p=PlayerPedId(),y=f(p);for(RequestAnimDict(o);!HasAnimDictLoaded(o);)await x(0);if(y)for(let _=0;_xe,R=(e,a)=>{xe=a;let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let r=f(e),{collection:o,hashFemale:n,hashMale:l}=t,i=r?l:n;ClearPedDecorations(e),AddPedDecorationFromHashes(e,GetHashKey(o),GetHashKey(i));for(let s in a)for(let c=0;c{Ge=e});on("updateGang",e=>{Ne=e});onNet("fivem-appearance:client:SetPlayerAces",e=>{Te=e});function Fe(){return Ge}function Se(){return Ne}function Me(){return Te}var ke=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"tattoos.json")),oe=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"peds.json")),E=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"blacklist.json")),fe=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"theme.json")),ge=JSON.parse(LoadResourceFile(GetCurrentResourceName(),`locales/${GetConvar("fivem-appearance:locale","en")}.json`)),qe=oe.reduce((e,a)=>({...e,[GetHashKey(a)]:a}),{});function Ae(e){return qe[GetEntityModel(e)]}function we(e){let a=[];return O.forEach(t=>{a.push({component_id:t,drawable:GetPedDrawableVariation(e,t),texture:GetPedTextureVariation(e,t)})}),a}function Ie(e){let a=[];return D.forEach(t=>{a.push({prop_id:t,drawable:GetPedPropIndex(e,t),texture:GetPedPropTextureIndex(e,t)})}),a}function Ee(e){let a=new ArrayBuffer(80);global.Citizen.invokeNative(Je,e,new Uint32Array(a));let{0:t,2:r,4:o,6:n,8:l,10:i}=new Uint32Array(a),{0:s,2:c,4:d}=new Float32Array(a,48),p=parseFloat(s.toFixed(1)),y=parseFloat(c.toFixed(1)),_=parseFloat(d.toFixed(1));return Number.isNaN(_)&&(_=0),{shapeFirst:t,shapeSecond:r,shapeThird:o,skinFirst:n,skinSecond:l,skinThird:i,shapeMix:p,skinMix:y,thirdMix:_}}function Re(e){return F.reduce((t,r,o)=>{let n=parseFloat(GetPedFaceFeature(e,o).toFixed(1));return{...t,[r]:n}},{})}function Oe(e){return S.reduce((t,r,o)=>{let[,n,,l,i,s]=GetPedHeadOverlayData(e,o),c=n!==255,d=c?n:0,p=c?parseFloat(s.toFixed(1)):0,y;return r==="makeUp"?y={style:d,opacity:p,color:l,secondColor:i}:y={style:d,opacity:p,color:l},{...t,[r]:y}},{})}function De(e){return{style:GetPedDrawableVariation(e,2),color:GetPedHairColor(e),highlight:GetPedHairHighlightColor(e),texture:GetPedTextureVariation(e,2)}}function H(e){let a=GetPedEyeColor(e);return{model:Ae(e)||"mp_m_freemode_01",headBlend:Ee(e),faceFeatures:Re(e),headOverlays:Oe(e),components:we(e),props:Ie(e),hair:De(e),eyeColor:a{let o=a[t];SetPedFaceFeature(e,r,o)})}function G(e,a){!a||S.forEach((t,r)=>{let o=a[t];if(SetPedHeadOverlay(e,r,o.style,o.opacity),o.color||o.color===0){let l=1;var n=o.color;({blush:!0,lipstick:!0,makeUp:!0})[t]&&(l=2),t==="makeUp"&&(n=o.secondColor),SetPedHeadOverlayColor(e,r,l,o.color,n)}})}function N(e,a){if(!a)return;let{style:t,color:r,highlight:o,texture:n}=a;SetPedComponentVariation(e,2,t,n,2),SetPedHairColor(e,r,o)}function T(e,a){!a||SetPedEyeColor(e,a)}function z(e,a){if(!a)return;let{component_id:t,drawable:r,texture:o}=a;({0:!0,2:!0})[t]&&C(e)||SetPedComponentVariation(e,t,r,o,0)}function ie(e,a){!a||a.forEach(t=>z(e,t))}function V(e,a){if(!a)return;let{prop_id:t,drawable:r,texture:o}=a;r===-1?ClearPedProp(e,t):SetPedPropIndex(e,t,r,o,!1)}function ne(e,a){!a||a.forEach(t=>V(e,t))}async function re(e){if(!e)return;let{model:a,components:t,props:r,headBlend:o,faceFeatures:n,headOverlays:l,hair:i,eyeColor:s,tattoos:c}=e;await L(a);let d=PlayerPedId();ie(d,t),ne(d,r),o&&M(d,o),n&&k(d,n),l&&G(d,l),i&&N(d,i),s&&T(d,s),c&&R(d,c)}function Ye(e,a){if(!a)return;let{components:t,props:r,headBlend:o,faceFeatures:n,headOverlays:l,hair:i,eyeColor:s,tattoos:c}=a;ie(e,t),ne(e,r),o&&M(e,o),n&&k(e,n),l&&G(e,l),i&&N(e,i),s&&T(e,s),c&&R(e,c)}function Ze(){be.loadModule(),u("getPedModel",Ae),u("getPedComponents",we),u("getPedProps",Ie),u("getPedHeadBlend",Ee),u("getPedFaceFeatures",Re),u("getPedHeadOverlays",Oe),u("getPedHair",De),u("getPedTattoos",te),u("getPedAppearance",H),u("setPlayerModel",L),u("setPedHeadBlend",M),u("setPedFaceFeatures",k),u("setPedHeadOverlays",G),u("setPedHair",N),u("setPedEyeColor",T),u("setPedComponent",z),u("setPedComponents",ie),u("setPedProp",V),u("setPedProps",ne),u("setPedTattoos",R),u("setPlayerAppearance",re),u("setPedAppearance",Ye)}Ze();})(); +(()=>{var x=e=>new Promise(a=>setTimeout(a,e)),C=e=>{let a=GetEntityModel(e),t=GetHashKey("mp_m_freemode_01"),r=GetHashKey("mp_f_freemode_01");return a===t||a===r},f=e=>{let a=GetEntityModel(e),t=GetHashKey("mp_m_freemode_01");return a===t};function g(e){return{x:e[0],y:e[1],z:e[2]}}var O=[0,1,2,3,4,5,6,7,8,9,10,11],D=[0,1,2,6,7],F=["noseWidth","nosePeakHigh","nosePeakSize","noseBoneHigh","nosePeakLowering","noseBoneTwist","eyeBrownHigh","eyeBrownForward","cheeksBoneHigh","cheeksBoneWidth","cheeksWidth","eyesOpening","lipsThickness","jawBoneWidth","jawBoneBackSize","chinBoneLowering","chinBoneLenght","chinBoneSize","chinHole","neckThickness"],S=["blemishes","beard","eyebrows","ageing","makeUp","blush","complexion","sunDamage","lipstick","moleAndFreckles","chestHair","bodyBlemishes"],le=["Green","Emerald","Light Blue","Ocean Blue","Light Brown","Dark Brown","Hazel","Dark Gray","Light Gray","Pink","Yellow","Purple","Blackout","Shades of Gray","Tequila Sunrise","Atomic","Warp","ECola","Space Ranger","Ying Yang","Bullseye","Lizard","Dragon","Extra Terrestrial","Goat","Smiley","Possessed","Demon","Infected","Alien","Undead","Zombie"];var se={ped:!0,headBlend:!0,faceFeatures:!0,headOverlays:!0,components:!0,props:!0,tattoos:!0},J={head:{animations:{on:{dict:"mp_masks@standard_car@ds@",anim:"put_on_mask",move:51,duration:600},off:{dict:"missheist_agency2ahelmet",anim:"take_off_helmet_stand",move:51,duration:1200}},props:{male:[[1,0]],female:[[1,0]]}},body:{animations:{on:{dict:"clothingtie",anim:"try_tie_negative_a",move:51,duration:1200},off:{dict:"clothingtie",anim:"try_tie_negative_a",move:51,duration:1200}},props:{male:[[11,252],[3,15],[8,15],[10,0],[5,0]],female:[[11,15],[8,14],[3,15],[10,0],[5,0]]}},bottom:{animations:{on:{dict:"re@construction",anim:"out_of_breath",move:51,duration:1300},off:{dict:"re@construction",anim:"out_of_breath",move:51,duration:1300}},props:{male:[[4,61],[6,34]],female:[[4,15],[6,35]]}}};function ce(){RegisterNuiCallbackType("appearance_get_locales"),RegisterNuiCallbackType("appearance_get_settings_and_data"),RegisterNuiCallbackType("appearance_set_camera"),RegisterNuiCallbackType("appearance_turn_around"),RegisterNuiCallbackType("appearance_rotate_camera"),RegisterNuiCallbackType("appearance_change_model"),RegisterNuiCallbackType("appearance_change_head_blend"),RegisterNuiCallbackType("appearance_change_face_feature"),RegisterNuiCallbackType("appearance_change_hair"),RegisterNuiCallbackType("appearance_change_head_overlay"),RegisterNuiCallbackType("appearance_change_eye_color"),RegisterNuiCallbackType("appearance_change_component"),RegisterNuiCallbackType("appearance_change_prop"),RegisterNuiCallbackType("appearance_apply_tattoo"),RegisterNuiCallbackType("appearance_preview_tattoo"),RegisterNuiCallbackType("appearance_delete_tattoo"),RegisterNuiCallbackType("appearance_wear_clothes"),RegisterNuiCallbackType("appearance_remove_clothes"),RegisterNuiCallbackType("appearance_save"),RegisterNuiCallbackType("appearance_exit"),RegisterNuiCallbackType("rotate_left"),RegisterNuiCallbackType("rotate_right"),RegisterNuiCallbackType("get_theme_configuration"),on("__cfx_nui:appearance_get_locales",(e,a)=>{a(ge)}),on("__cfx_nui:appearance_get_settings_and_data",async(e,a)=>{let t=_e(),r=$(),o=q();emitNet("fivem-appearance:server:GetPlayerAces"),await x(250),a({config:t,appearanceData:r,appearanceSettings:o})}),on("__cfx_nui:appearance_set_camera",(e,a)=>{a({}),ee(e)}),on("__cfx_nui:appearance_turn_around",(e,a)=>{a({}),B(PlayerPedId(),180)}),on("__cfx_nui:appearance_rotate_camera",(e,a)=>{a({}),ue(e)}),on("__cfx_nui:appearance_change_model",async(e,a)=>{await L(e);let t=PlayerPedId();SetEntityHeading(PlayerPedId(),Z),SetEntityInvincible(t,!0),TaskStandStill(t,-1);let r=H(t),o=q();a({appearanceSettings:o,appearanceData:r})}),on("__cfx_nui:appearance_change_component",(e,a)=>{let t=PlayerPedId();z(t,e),a(Q(t,e.component_id))}),on("__cfx_nui:appearance_change_prop",(e,a)=>{let t=PlayerPedId();V(t,e),a(X(t,e.prop_id))}),on("__cfx_nui:appearance_change_head_blend",(e,a)=>{a({}),M(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_face_feature",(e,a)=>{a({}),k(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_head_overlay",(e,a)=>{a({}),G(PlayerPedId(),e)}),on("__cfx_nui:appearance_change_hair",(e,a)=>{let t=PlayerPedId();N(t,e),a(de(t,e))}),on("__cfx_nui:appearance_change_eye_color",(e,a)=>{a({}),T(PlayerPedId(),e)}),on("__cfx_nui:appearance_apply_tattoo",(e,a)=>{a({}),me(PlayerPedId(),e)}),on("__cfx_nui:appearance_preview_tattoo",(e,a)=>{a({});let{data:t,tattoo:r}=e;ve(PlayerPedId(),t,r)}),on("__cfx_nui:appearance_delete_tattoo",(e,a)=>{a({}),Pe(PlayerPedId(),e)}),on("__cfx_nui:appearance_wear_clothes",(e,a)=>{a({});let{data:t,key:r}=e;ye(t,r)}),on("__cfx_nui:appearance_remove_clothes",(e,a)=>{a({}),pe(e)}),on("__cfx_nui:appearance_save",(e,a)=>{a({}),Y(e)}),on("__cfx_nui:appearance_exit",(e,a)=>{a({}),Y()}),on("__cfx_nui:rotate_left",(e,a)=>{a({}),B(PlayerPedId(),10)}),on("__cfx_nui:rotate_right",(e,a)=>{a({}),B(PlayerPedId(),-10)}),on("__cfx_nui:get_theme_configuration",(e,a)=>{a(fe)})}var Be=global.exports,he={default:{coords:{x:0,y:2.2,z:.2},point:{x:0,y:0,z:-.05}},head:{coords:{x:0,y:.9,z:.65},point:{x:0,y:0,z:.6}},body:{coords:{x:0,y:1.2,z:.2},point:{x:0,y:0,z:.2}},bottom:{coords:{x:0,y:.98,z:-.7},point:{x:0,y:0,z:-.9}}},Le={default:{x:1.5,y:-1},head:{x:.7,y:-.45},body:{x:1.2,y:-.45},bottom:{x:.7,y:-.45}},U,ae,A,w,Z,m,I,b,h,xe={};function Ce(){let e={hair:[],makeUp:[]};for(let a=0;an.includes(s)))&&i.drawables)for(let s=0;sQ(e,y)),o=D.map(y=>X(e,y)),n={shapeFirst:{min:0,max:45},shapeSecond:{min:0,max:45},shapeThird:{min:0,max:45},skinFirst:{min:0,max:45},skinSecond:{min:0,max:45},skinThird:{min:0,max:45},shapeMix:{min:0,max:1,factor:.1},skinMix:{min:0,max:1,factor:.1},thirdMix:{min:0,max:1,factor:.1}},l=F.reduce((y,_)=>({...y,[_]:{min:-1,max:1,factor:.1}}),{}),i=Ce(),s={beard:i.hair,eyebrows:i.hair,chestHair:i.hair,makeUp:i.makeUp,blush:i.makeUp,lipstick:i.makeUp},c=S.reduce((y,_,v)=>{let P={style:{min:0,max:GetPedHeadOverlayNum(v)-1},opacity:{min:0,max:1,factor:.1}};return s[_]&&Object.assign(P,{color:{items:s[_]}}),{...y,[_]:P}},{}),d={style:{min:0,max:GetNumberOfPedDrawableVariations(e,2)-1},color:{items:i.hair},highlight:{items:i.hair},texture:{min:0,max:GetNumberOfPedTextureVariations(e,2,GetPedDrawableVariation(e,2))-1}};return{ped:a,components:r,props:o,headBlend:n,faceFeatures:l,headOverlays:c,hair:d,eyeColor:{min:0,max:30},tattoos:t}}function _e(){return ae}function ee(e){if(h)return;e!=="current"&&(I=e);let{coords:a,point:t}=he[I],r=b?-1:1;if(m){let o=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),a.x*r,a.y*r,a.z)),n=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z)),l=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",o.x,o.y,o.z,0,0,0,50,!1,0);PointCamAtCoord(l,n.x,n.y,n.z),SetCamActiveWithInterp(l,m,1e3,1,1),h=!0;let i=setInterval(()=>{!IsCamInterpolating(m)&&IsCamActive(l)&&(DestroyCam(m,!1),m=l,h=!1,clearInterval(i))},500)}else{let o=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),a.x,a.y,a.z)),n=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z));m=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",o.x,o.y,o.z,0,0,0,50,!1,0),PointCamAtCoord(m,n.x,n.y,n.z),SetCamActive(m,!0)}}async function ue(e){if(h)return;let{coords:a,point:t}=he[I],r=Le[I],o,n=b?-1:1;e==="left"?o=1:e==="right"&&(o=-1);let l=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),(a.x+r.x)*o*n,(a.y+r.y)*n,a.z)),i=g(GetOffsetFromEntityInWorldCoords(PlayerPedId(),t.x,t.y,t.z)),s=CreateCameraWithParams("DEFAULT_SCRIPTED_CAMERA",l.x,l.y,l.z,0,0,0,50,!1,0);PointCamAtCoord(s,i.x,i.y,i.z),SetCamActiveWithInterp(s,m,1e3,1,1),h=!0;let c=setInterval(()=>{!IsCamInterpolating(m)&&IsCamActive(s)&&(DestroyCam(m,!1),m=s,h=!1,clearInterval(c))},500)}function B(e,a){b=!b;let t=OpenSequenceTask()??0;t!==0&&(TaskGoStraightToCoord(0,w.x,w.y,w.z,8,-1,GetEntityHeading(e)-a,.1),TaskStandStill(0,-1),CloseSequenceTask(t),ClearPedTasks(e),TaskPerformSequence(e,t),ClearSequenceTask(t))}async function ye(e,a){let{animations:t,props:r}=J[a],{dict:o,anim:n,move:l,duration:i}=t.on,{male:s,female:c}=r,{components:d}=e,p=PlayerPedId(),y=f(p);for(RequestAnimDict(o);!HasAnimDictLoaded(o);)await x(0);if(y)for(let _=0;_xe,R=(e,a)=>{xe=a;let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let t=f(e);ClearPedDecorations(e);for(let r in a)for(let o=0;o{let r=f(e),{collection:o,hashFemale:n,hashMale:l}=t,i=r?l:n;ClearPedDecorations(e),AddPedDecorationFromHashes(e,GetHashKey(o),GetHashKey(i));for(let s in a)for(let c=0;c{Ge=e});on("updateGang",e=>{Ne=e});onNet("fivem-appearance:client:SetPlayerAces",e=>{Te=e});function Fe(){return Ge}function Se(){return Ne}function Me(){return Te}var ke=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"tattoos.json")),oe=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"peds.json")),E=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"blacklist.json")),fe=JSON.parse(LoadResourceFile(GetCurrentResourceName(),"theme.json")),ge=JSON.parse(LoadResourceFile(GetCurrentResourceName(),`locales/${GetConvar("fivem-appearance:locale","en")}.json`)),qe=oe.reduce((e,a)=>({...e,[GetHashKey(a)]:a}),{});function Ae(e){return qe[GetEntityModel(e)]}function we(e){let a=[];return O.forEach(t=>{a.push({component_id:t,drawable:GetPedDrawableVariation(e,t),texture:GetPedTextureVariation(e,t)})}),a}function Ie(e){let a=[];return D.forEach(t=>{a.push({prop_id:t,drawable:GetPedPropIndex(e,t),texture:GetPedPropTextureIndex(e,t)})}),a}function Ee(e){let a=new ArrayBuffer(80);global.Citizen.invokeNative(Je,e,new Uint32Array(a));let{0:t,2:r,4:o,6:n,8:l,10:i}=new Uint32Array(a),{0:s,2:c,4:d}=new Float32Array(a,48),p=parseFloat(s.toFixed(1)),y=parseFloat(c.toFixed(1)),_=parseFloat(d.toFixed(1));return Number.isNaN(_)&&(_=0),{shapeFirst:t,shapeSecond:r,shapeThird:o,skinFirst:n,skinSecond:l,skinThird:i,shapeMix:p,skinMix:y,thirdMix:_}}function Re(e){return F.reduce((t,r,o)=>{let n=parseFloat(GetPedFaceFeature(e,o).toFixed(1));return{...t,[r]:n}},{})}function Oe(e){return S.reduce((t,r,o)=>{let[,n,,l,i,s]=GetPedHeadOverlayData(e,o),c=n!==255,d=c?n:0,p=c?parseFloat(s.toFixed(1)):0,y;return r==="makeUp"?y={style:d,opacity:p,color:l,secondColor:i}:y={style:d,opacity:p,color:l},{...t,[r]:y}},{})}function De(e){return{style:GetPedDrawableVariation(e,2),color:GetPedHairColor(e),highlight:GetPedHairHighlightColor(e),texture:GetPedTextureVariation(e,2)}}function H(e){let a=GetPedEyeColor(e);return{model:Ae(e)||"mp_m_freemode_01",headBlend:Ee(e),faceFeatures:Re(e),headOverlays:Oe(e),components:we(e),props:Ie(e),hair:De(e),eyeColor:a{let o=a[t];SetPedFaceFeature(e,r,o)})}function G(e,a){!a||S.forEach((t,r)=>{let o=a[t];if(SetPedHeadOverlay(e,r,o.style,o.opacity),o.color||o.color===0){let l=1;var n=o.color;({blush:!0,lipstick:!0,makeUp:!0})[t]&&(l=2),t==="makeUp"&&(n=o.secondColor),SetPedHeadOverlayColor(e,r,l,o.color,n)}})}function N(e,a){if(!a)return;let{style:t,color:r,highlight:o,texture:n}=a;SetPedComponentVariation(e,2,t,n,2),SetPedHairColor(e,r,o)}function T(e,a){!a||SetPedEyeColor(e,a)}function z(e,a){if(!a)return;let{component_id:t,drawable:r,texture:o}=a;({0:!0,2:!0})[t]&&C(e)||SetPedComponentVariation(e,t,r,o,0)}function ie(e,a){!a||a.forEach(t=>z(e,t))}function V(e,a){if(!a)return;let{prop_id:t,drawable:r,texture:o}=a;r===-1?ClearPedProp(e,t):SetPedPropIndex(e,t,r,o,!1)}function ne(e,a){!a||a.forEach(t=>V(e,t))}async function re(e){if(!e)return;let{model:a,components:t,props:r,headBlend:o,faceFeatures:n,headOverlays:l,hair:i,eyeColor:s,tattoos:c}=e;await L(a);let d=PlayerPedId();ie(d,t),ne(d,r),o&&M(d,o),n&&k(d,n),l&&G(d,l),i&&N(d,i),s&&T(d,s),c&&R(d,c)}function Ye(e,a){if(!a)return;let{components:t,props:r,headBlend:o,faceFeatures:n,headOverlays:l,hair:i,eyeColor:s,tattoos:c}=a;ie(e,t),ne(e,r),o&&M(e,o),n&&k(e,n),l&&G(e,l),i&&N(e,i),s&&T(e,s),c&&R(e,c)}function Ze(){be.loadModule(),u("getPedModel",Ae),u("getPedComponents",we),u("getPedProps",Ie),u("getPedHeadBlend",Ee),u("getPedFaceFeatures",Re),u("getPedHeadOverlays",Oe),u("getPedHair",De),u("getPedTattoos",te),u("getPedAppearance",H),u("setPlayerModel",L),u("setPedHeadBlend",M),u("setPedFaceFeatures",k),u("setPedHeadOverlays",G),u("setPedHair",N),u("setPedEyeColor",T),u("setPedComponent",z),u("setPedComponents",ie),u("setPedProp",V),u("setPedProps",ne),u("setPedTattoos",R),u("setPlayerAppearance",re),u("setPedAppearance",Ye)}Ze();})();