diff --git a/.gitignore b/.gitignore index ccdf81b..38c4a88 100644 --- a/.gitignore +++ b/.gitignore @@ -6,4 +6,5 @@ typescript/yarn.lock ui/node_modules/ ui/build/ -ui/yarn.lock \ No newline at end of file +ui/yarn.lock +.idea/ \ No newline at end of file diff --git a/typescript/src/client/index.ts b/typescript/src/client/index.ts index 78734a8..50772da 100644 --- a/typescript/src/client/index.ts +++ b/typescript/src/client/index.ts @@ -387,41 +387,32 @@ function setPedAppearance(ped: number, appearance: Omit) } } -function init(): void { - Customization.loadModule(); - - // Getters - exp('getPedModel', getPedModel); - exp('getPedComponents', getPedComponents); - exp('getPedProps', getPedProps); - exp('getPedHeadBlend', getPedHeadBlend); - exp('getPedFaceFeatures', getPedFaceFeatures); - exp('getPedHeadOverlays', getPedHeadOverlays); - exp('getPedHair', getPedHair); - - exp('getPedAppearance', getPedAppearance); - - // Setters - exp('setPlayerModel', setPlayerModel); - exp('setPedHeadBlend', setPedHeadBlend); - exp('setPedFaceFeatures', setPedFaceFeatures); - exp('setPedHeadOverlays', setPedHeadOverlays); - exp('setPedHair', setPedHair); - exp('setPedEyeColor', setPedEyeColor); - - exp('setPedComponent', setPedComponent); - exp('setPedComponents', setPedComponents); - - exp('setPedProp', setPedProp); - exp('setPedProps', setPedProps); - - exp('setPlayerAppearance', setPlayerAppearance); - exp('setPedAppearance', setPedAppearance); -} - -on('onClientResourceStart', resourceName => { - if (GetCurrentResourceName() != resourceName) { - return; - } - init(); -}); +Customization.loadModule(); + +// Getters +exp('getPedModel', getPedModel); +exp('getPedComponents', getPedComponents); +exp('getPedProps', getPedProps); +exp('getPedHeadBlend', getPedHeadBlend); +exp('getPedFaceFeatures', getPedFaceFeatures); +exp('getPedHeadOverlays', getPedHeadOverlays); +exp('getPedHair', getPedHair); + +exp('getPedAppearance', getPedAppearance); + +// Setters +exp('setPlayerModel', setPlayerModel); +exp('setPedHeadBlend', setPedHeadBlend); +exp('setPedFaceFeatures', setPedFaceFeatures); +exp('setPedHeadOverlays', setPedHeadOverlays); +exp('setPedHair', setPedHair); +exp('setPedEyeColor', setPedEyeColor); + +exp('setPedComponent', setPedComponent); +exp('setPedComponents', setPedComponents); + +exp('setPedProp', setPedProp); +exp('setPedProps', setPedProps); + +exp('setPlayerAppearance', setPlayerAppearance); +exp('setPedAppearance', setPedAppearance); \ No newline at end of file