├── README.md └── UPCODE-CLOTHING ├── client └── main.lua ├── fxmanifest.lua ├── html ├── img │ ├── clothes1.png │ ├── clothes10.png │ ├── clothes11.png │ ├── clothes12.png │ ├── clothes2.png │ ├── clothes3.png │ ├── clothes4.png │ ├── clothes5.png │ ├── clothes6.png │ ├── clothes7.png │ ├── clothes8.png │ ├── clothes9.png │ ├── fram1.png │ ├── mouse-1.png │ ├── mouse-2.png │ └── mouse-3.png ├── index.html ├── index.js └── style.css └── shared └── config.lua /README.md: -------------------------------------------------------------------------------- 1 | # UPCODE-CLOTHING 2 | CLOTHING MENU FOR FIVEM 3 | 4 |  5 | 6 | DISCORD: https://discord.com/invite/w743faPRyk 7 | -------------------------------------------------------------------------------- /UPCODE-CLOTHING/client/main.lua: -------------------------------------------------------------------------------- 1 | local CamHandle = nil 2 | 3 | local CurrentFov = 60.0 4 | 5 | local CurrentHeightAdd = 0.0 6 | 7 | local CamActive = false 8 | 9 | local LastIndexes = { mask = nil, hat = nil, glasses = nil, shirt = nil, undershirt = nil, vest = nil, chain = nil, watch = nil, bracelet = nil, pants = nil, bag = nil, shoes = nil } 10 | 11 | local LastTextureIndexes = { mask = nil, hat = nil, glasses = nil, shirt = nil, undershirt = nil, vest = nil, chain = nil, watch = nil, bracelet = nil, pants = nil, bag = nil, shoes = nil } 12 | 13 | local ClothingTable = { 14 | mask = { type = 'component', id = 1 }, 15 | hat = { type = 'prop', id = 0 }, 16 | glasses = { type = 'prop', id = 1 }, 17 | shirt = { type = 'component', id = 11 }, 18 | undershirt = { type = 'component', id = 8 }, 19 | vest = { type = 'component', id = 9 }, 20 | chain = { type = 'component', id = 7 }, 21 | watch = { type = 'prop', id = 6 }, 22 | bracelet = { type = 'prop', id = 7 }, 23 | pants = { type = 'component', id = 4 }, 24 | bag = { type = 'component', id = 5 }, 25 | shoes = { type = 'component', id = 6 } 26 | } 27 | 28 | local AnimPlaying = false 29 | 30 | local function GetClothingState() 31 | return { 32 | mask = GetPedDrawableVariation(PlayerPedId(), 1) ~= 0, 33 | hat = GetPedPropIndex(PlayerPedId(), 0) ~= -1, 34 | glasses = GetPedPropIndex(PlayerPedId(), 1) ~= -1, 35 | shirt = GetPedDrawableVariation(PlayerPedId(), 11) ~= 15, 36 | undershirt = GetPedDrawableVariation(PlayerPedId(), 8) ~= 15, 37 | vest = GetPedDrawableVariation(PlayerPedId(), 9) ~= 0, 38 | chain = GetPedDrawableVariation(PlayerPedId(), 7) ~= 0, 39 | watch = GetPedPropIndex(PlayerPedId(), 6) ~= -1, 40 | bracelet = GetPedPropIndex(PlayerPedId(), 7) ~= -1, 41 | pants = GetPedDrawableVariation(PlayerPedId(), 4) ~= 14, 42 | bag = GetPedDrawableVariation(PlayerPedId(), 5) ~= 0, 43 | shoes = GetPedDrawableVariation(PlayerPedId(), 6) ~= 34 44 | } 45 | end 46 | 47 | local function OpenMenu() 48 | local pedHeading = GetEntityHeading(PlayerPedId()) + 180.0 49 | local camCoords = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, 0.0) 50 | CamHandle = CreateCamWithParams('DEFAULT_SCRIPTED_CAMERA', camCoords.x, camCoords.y, camCoords.z, 0.0, 0.0, pedHeading, CurrentFov, false, 0) 51 | SetCamUseShallowDofMode(CamHandle, true) 52 | SetCamNearDof(CamHandle, 0.2) 53 | SetCamFarDof(CamHandle, 5.0) 54 | SetCamDofStrength(CamHandle, 1.0) 55 | SetCamActive(CamHandle, true) 56 | RenderScriptCams(true, true, 500, true, true) 57 | CamActive = true 58 | SetNuiFocus(true, true) 59 | SendNUIMessage({ type = 'OpenMenu', clothingStates = GetClothingState() }) 60 | if Config.HideMinimap then DisplayRadar(false) end 61 | end 62 | 63 | RegisterNuiCallback('changeScale', function(data, cb) 64 | CurrentFov = CurrentFov + data.scale 65 | if CurrentFov > Config.MaxFov then CurrentFov = Config.MaxFov end 66 | if CurrentFov < Config.MinFov then CurrentFov = Config.MinFov end 67 | SetCamFov(CamHandle, CurrentFov) 68 | end) 69 | 70 | RegisterNuiCallback('changeRotation', function(data, cb) 71 | if data.side == 'right' then 72 | local playerHeading = GetEntityHeading(PlayerPedId()) 73 | local playerRotation = playerHeading + 4.0 74 | SetEntityHeading(PlayerPedId(), playerRotation % 360) 75 | elseif data.side == 'left' then 76 | local playerHeading = GetEntityHeading(PlayerPedId()) 77 | local playerRotation = playerHeading + -4.0 78 | SetEntityHeading(PlayerPedId(), playerRotation % 360) 79 | end 80 | end) 81 | 82 | RegisterNuiCallback('changeHeight', function(data, cb) 83 | if data.direction == 'up' then 84 | CurrentHeightAdd = CurrentHeightAdd + 0.01 85 | if CurrentHeightAdd > Config.MaxHeight then CurrentHeightAdd = Config.MaxHeight end 86 | local camCoords = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, 0.0) 87 | SetCamCoord(CamHandle, camCoords.x, camCoords.y, camCoords.z + CurrentHeightAdd) 88 | PointCamAtEntity(CamHandle, PlayerPedId(), 0.0, 0.0, CurrentHeightAdd) 89 | elseif data.direction == 'down' then 90 | CurrentHeightAdd = CurrentHeightAdd - 0.01 91 | if CurrentHeightAdd < 0 then CurrentHeightAdd = 0 end 92 | local camCoords = GetOffsetFromEntityInWorldCoords(PlayerPedId(), 0.0, 2.0, 0.0) 93 | SetCamCoord(CamHandle, camCoords.x, camCoords.y, camCoords.z + CurrentHeightAdd) 94 | PointCamAtEntity(CamHandle, PlayerPedId(), 0.0, 0.0, CurrentHeightAdd) 95 | end 96 | end) 97 | 98 | RegisterNuiCallback('changeClothesState', function(data, cb) 99 | if AnimPlaying then return end 100 | if LastIndexes[data.clothing] then 101 | local animation = Config.Clothing[data.clothing].animation 102 | while not HasAnimDictLoaded(animation.dict) do RequestAnimDict(animation.dict) Wait(100) end 103 | if IsPedInAnyVehicle(PlayerPedId()) then animation.move = 51 end 104 | TaskPlayAnim(PlayerPedId(), animation.dict, animation.name, 3.0, 3.0, animation.duration, animation.move, 0, false, false, false) 105 | AnimPlaying = true 106 | local pause = animation.duration - 500 if pause < 500 then pause = 500 end 107 | Wait(pause) 108 | AnimPlaying = false 109 | if ClothingTable[data.clothing].type == 'component' then 110 | SetPedComponentVariation(PlayerPedId(), ClothingTable[data.clothing].id, LastIndexes[data.clothing], LastTextureIndexes[data.clothing]) 111 | else 112 | SetPedPropIndex(PlayerPedId(), ClothingTable[data.clothing].id, LastIndexes[data.clothing], LastTextureIndexes[data.clothing]) 113 | end 114 | LastIndexes[data.clothing] = nil 115 | LastTextureIndexes[data.clothing] = nil 116 | SendNUIMessage({ type = 'UpdateStates', clothingStates = GetClothingState() }) 117 | else 118 | local clothingStates = GetClothingState() 119 | if not clothingStates[data.clothing] then return Config.Notification('You don\'t have that part on') end 120 | local animation = Config.Clothing[data.clothing].animation 121 | while not HasAnimDictLoaded(animation.dict) do RequestAnimDict(animation.dict) Wait(100) end 122 | if IsPedInAnyVehicle(PlayerPedId()) then animation.move = 51 end 123 | AnimPlaying = true 124 | TaskPlayAnim(PlayerPedId(), animation.dict, animation.name, 3.0, 3.0, animation.duration, animation.move, 0, false, false, false) 125 | local pause = animation.duration - 500 if pause < 500 then pause = 500 end 126 | Wait(pause) 127 | AnimPlaying = false 128 | if ClothingTable[data.clothing].type == 'component' then 129 | LastIndexes[data.clothing] = GetPedDrawableVariation(PlayerPedId(), ClothingTable[data.clothing].id) 130 | LastTextureIndexes[data.clothing] = GetPedTextureVariation(PlayerPedId(), ClothingTable[data.clothing].id) 131 | SetPedComponentVariation(PlayerPedId(), ClothingTable[data.clothing].id, Config.Clothing[data.clothing].default, 0) 132 | else 133 | LastIndexes[data.clothing] = GetPedPropIndex(PlayerPedId(), ClothingTable[data.clothing].id) 134 | LastTextureIndexes[data.clothing] = GetPedPropTextureIndex(PlayerPedId(), ClothingTable[data.clothing].id) 135 | ClearPedProp(PlayerPedId(), ClothingTable[data.clothing].id) 136 | end 137 | SendNUIMessage({ type = 'UpdateStates', clothingStates = GetClothingState() }) 138 | end 139 | end) 140 | 141 | RegisterNuiCallback('close', function(data, cb) 142 | RenderScriptCams(false, true, 500, 1, 0) 143 | DestroyCam(CamHandle, false) 144 | SetNuiFocus(false, false) 145 | if Config.HideMinimap then DisplayRadar(true) end 146 | CamActive = false 147 | end) 148 | 149 | CreateThread(function() 150 | while true do 151 | if CamActive then 152 | SetUseHiDof() 153 | else 154 | Wait(1000) 155 | end 156 | Wait(0) 157 | end 158 | end) 159 | 160 | RegisterCommand(Config.Open.command, function() 161 | OpenMenu() 162 | end) 163 | 164 | RegisterKeyMapping(Config.Open.command, Config.Open.label, 'keyboard', Config.Open.key) -------------------------------------------------------------------------------- /UPCODE-CLOTHING/fxmanifest.lua: -------------------------------------------------------------------------------- 1 | fx_version 'adamant' 2 | game 'gta5' 3 | 4 | client_scripts { 'shared/*', 'client/*' } 5 | 6 | ui_page 'html/index.html' 7 | 8 | files { 9 | 'html/img/*.*', 10 | 'html/*' 11 | } -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes1.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes10.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes11.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes12.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes2.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes3.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes4.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes5.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes6.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes7.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes8.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/clothes9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/clothes9.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/fram1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/fram1.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/mouse-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/mouse-1.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/mouse-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/mouse-2.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/img/mouse-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/upcodestore/UPCODE-CLOTHING/dde5810dee33f04da9977282baabf82befcf4921/UPCODE-CLOTHING/html/img/mouse-3.png -------------------------------------------------------------------------------- /UPCODE-CLOTHING/html/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |