iLLeniumStudios / illenium-appearance

fivem-appearance for qb-core and ESX framework, packed with a lot of features
MIT License
237 stars 213 forks source link

Mining script change clothes back to normal after exiting job #396

Closed djthemask closed 5 months ago

djthemask commented 5 months ago

Hi there,

I am running a mini script that basically changes your clothes while you are on "duty". I am trying to add a function where when you exit the job it returns you your appearence before starting the job but for some reason it doesnt work.

I tried to force a reload skin as that returns the peds clothes as they where before but it doesnt work. Any tips on what im doing wrong? imagen

Appearently that doesnt work im not sure if i need to add an export.

TheiLLeniumStudios commented 5 months ago

Its not a server event

djthemask commented 5 months ago

So how could i add it? I also tried to add it as a client event but that also doesnt work. I would highly apreciate your helping hand :(

djthemask commented 5 months ago

imagen

djthemask commented 5 months ago

@TheiLLeniumStudios whenever u have a second please <3

TheiLLeniumStudios commented 5 months ago
TriggerEvent("illenium-appearance:client:reloadSkin", true)
djthemask commented 5 months ago

Fantastic that worked perfectly! There is also a function that resets the clothes when exiting the working area. When i apply the same command it says i can't do it in a vehicle, how could i force the reloadskin execution even while in vehicle, or how would you suggest i could apply a function that would work whilist in a vehicle?

Thanks a million for your time @TheiLLeniumStudios i really apreciate it!