Another great release as always thankyou!
What is the trigger if we want to activate it with another resource instead of a key like rgz_menu?
Great resource @Dullpear_dev
One note, in instructions it says to use TriggerEvent(“dp:EquipLast”) but after looking in the lua this looks to be TriggerEvent(“dpc:EquipLast”) (noting the missing c)
Keep up the good work
~Uki
Since they are made as a command too, then you could just use the native “ExecuteCommand(“command”)” when you press the button in the rgz_menu
Hi all,
Some people are having issues with the trigger or not sure where to put it so here are some details.
In short, any time you are about to change the clothing on a player, you will want to run the included trigger TriggerEvent('dpc:EquipLast')
Here is an example scenario and why you need the trigger: say you are wearing a red shirt and you use dpClothing to take it off, the menu saves your red shirt - if you then go in to a shop and put on a blue shirt, when you open dpClothing and click ‘put shirt back on’ it will change your blue shirt back to the red shirt (you don’t want this)
What the trigger does is ‘reset’ the menu back to normal state so that nothing is ‘taken off’ that way when you change clothes in the shop you can’t put the red shirt back on.
Here is an example of where I have put my triggers:
esx_clotheshop
Look for:
function OpenShopMenu()
hasPaid = false
openedMenu = true
TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
menu.close()
Add the trigger at the bottom (note the last line)
function OpenShopMenu()
hasPaid = false
openedMenu = true
TriggerEvent('esx_skin:openRestrictedMenu', function(data, menu)
menu.close()
TriggerEvent("dpc:EquipLast")
This will reset the dpClothing menu as they open up the shop menu (you could also put it right before it changes their skin, however they could still put on the ‘red shirt’ while they are in the clothing change menu).
Make sure you put it in each resource which changes the player skin, you can search for skinchanger:loadSkin
in all your resources.
~ Uki
Hi friends ! İm trying toggle key but i couldn’t. Can anyone help?
ORGİNAL:
local TextureDicts = {"dp_clothing", "dp_wheel"}
Citizen.CreateThread(function()
for k,v in pairs(TextureDicts) do while not HasStreamedTextureDictLoaded(v) do Wait(100) RequestStreamedTextureDict(v, true) end end
GenerateTheButtons()
while true do Wait(0)
if IsControlJustPressed(1, Config.GUI.Key) then
local Ped = PlayerPedId()
if Check(Ped) then SoundPlay("Open") SetCursorLocation(Config.GUI.Position.x, Config.GUI.Position.y) end
elseif IsControlPressed(1, Config.GUI.Key) then
local Ped = PlayerPedId()
if Check(Ped) then DrawGUI() end
elseif IsControlJustReleased(1, Config.GUI.Key) then
if Check(Ped) then SoundPlay("Close") end
end
--DrawGUI()
if Config.Debug then DrawDev() end
end
end)
İm trying this:
local TextureDicts = {"dp_clothing", "dp_wheel"}
Citizen.CreateThread(function()
for k,v in pairs(TextureDicts) do while not HasStreamedTextureDictLoaded(v) do Wait(100) RequestStreamedTextureDict(v, true) end end
GenerateTheButtons()
while true do Wait(0)
if IsControlJustPressed(1, Config.GUI.Key) then
local Ped = PlayerPedId()
if Check(Ped) then SoundPlay("Open") SetCursorLocation(Config.GUI.Position.x, Config.GUI.Position.y) end
elseif IsControlPressed(1, Config.GUI.Key) then
local Ped = PlayerPedId()
if Check(Ped) then DrawGUI() end
elseif IsControlJustPressed(1, 202) then
if Check(Ped) then SoundPlay("Close") end
end
--DrawGUI()
if Config.Debug then DrawDev() end
end
end)
Are you trying to change the toggle key? do this in the Config.lua
Would this be correct or am i missreading something here
You will want to trigger the equip last before it changes the skin so try switch those two lines around
ah ok thank you, but apart from that did i do that right?
Yeah man, looks good
Just make sure you put this in all the resources that are changing the skin (just do a search in all files for loadSkin)
Can you explain it a bit more to me please, im struggling here, do i put it under the menu.close() or above the loadskin event cause i tried both and both times i take off my hat and go into the barbershop and then when i go to try change hair it puts my hat on
So nice
I’m having the same problem
Looks really good will try this today
hello sir, my put/remove mask not run. help me all beloved
If you want to change toggle key, go to —>dpclothing/clinet/open functions.lua add into KEY TABLE [“F11”]= 344,( for me f11 is fine if you want another key than look at this key list key lists.lua (2.7 KB) ) and SAVE it! than open config.lua ( dpclothing/client/config.lua) and write same as in the picture!
Warning: Resource dpclothing does not specify an fx_version
in fxmanifest.lua.
Couldn’t start resource dpclothing.
i get this error why
Try updating your server, the server artifact thing. You might be on an outdated build.