Closed Kraleemil closed 1 year ago
@pedr0fontoura
@pedr0fontoura
Store player weapons before opening the customization and apply them after you exit it.
If players change their model while on customization the weapons are removed, and that's the general use case. I can't make a workaround on the script thinking about each specific use case.
Store player weapons before opening the customization and apply them after you exit it.
If players change their model while on customization the weapons are removed, and that's the general use case. I can't make a workaround on the script thinking about each specific use case.
How can I do that in typescript, i haven't been coding in it before
You don't need to make changes to the fivem-appearance source code.
This workaround should be done on your side, where you call the startPlayerCustomization export.
Something like:
local weapons = MyFrameworkFunctionToGetPlayerWeapons(PlayerPedId())
exports['fivem-appearance']:startPlayerCustomization(...)
MyFrameworkFunctionToApplyPlayerWeapons(PlayerPedId(), weapons)
You don't need to make changes to the fivem-appearance source code.
This workaround should be done on your side, where you call the startPlayerCustomization export.
Something like:
local weapons = MyFrameworkFunctionToGetPlayerWeapons(PlayerPedId()) exports['fivem-appearance']:startPlayerCustomization(...) MyFrameworkFunctionToApplyPlayerWeapons(PlayerPedId(), weapons)
Arhh you just want to do it that way, didn't even think about that
Hi i have the problem where if you cancel when you are in the editor. Its like your ped gets respawned and you lose all your weapons