Skip to content

Commit

Permalink
refactor(client): Removed unnecessary checks for IsControlJustReleased
Browse files Browse the repository at this point in the history
  • Loading branch information
TheiLLeniumStudios committed May 23, 2022
1 parent 7f40f47 commit e98eb3f
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -726,31 +726,21 @@ local function ZonesLoop()
local sleep = 1000
if inZone then
sleep = 5
if string.find(zoneName, 'ClothingRooms_') then
if IsControlJustReleased(0, 38) then
if IsControlJustReleased(0, 38) then
if string.find(zoneName, 'ClothingRooms_') then
local clothingRoom = Config.ClothingRooms[tonumber(string.sub(zoneName, 15))]
local outfits = getPlayerJobOutfits(clothingRoom)
TriggerEvent('fivem-appearance:client:openJobOutfitsMenu', outfits)
end
elseif string.find(zoneName, 'PlayerOutfitRooms_') then
if IsControlJustReleased(0, 38) then
elseif string.find(zoneName, 'PlayerOutfitRooms_') then
local outfitRoom = Config.PlayerOutfitRooms[tonumber(string.sub(zoneName, 19))]
OpenOutfitRoom(outfitRoom)
end
elseif zoneName == 'clothing' then
if IsControlJustReleased(0, 38) then
elseif zoneName == 'clothing' then
TriggerEvent("fivem-appearance:client:openClothingShopMenu")
end
elseif zoneName == 'barber' then
if IsControlJustReleased(0, 38) then
elseif zoneName == 'barber' then
OpenBarberShop()
end
elseif zoneName == 'tattoo' then
if IsControlJustReleased(0, 38) then
elseif zoneName == 'tattoo' then
OpenTattooShop()
end
elseif zoneName == 'surgeon' then
if IsControlJustReleased(0, 38) then
elseif zoneName == 'surgeon' then
OpenSurgeonShop()
end
end
Expand Down

0 comments on commit e98eb3f

Please sign in to comment.