Skip to content

Commit

Permalink
feat: remove customization feature toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
snakewiz committed May 6, 2021
1 parent 00297ec commit a13625b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 14 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ This is a development resource, if you don't use the exports the resource itself

Since this is a client script, you will need to use **setr** to set these convars.

- **fivem-appearance:customization**: 1 or 0, default **1**, toggle the built-in customization interface and customization exports.
- **fivem-appearance:locale**: the name of one file inside `locales/`, default **en**, choose the locale file for the customization interface.

config.cfg example:
Expand Down
15 changes: 5 additions & 10 deletions fxmanifest.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,15 @@ game { "gta5" }
author 'Snake'
description 'A flexible player customization script for FiveM.'
repository 'https://github.com/snakewiz/fivem-appearance'
version '1.1.0'
version '1.2.0'

client_script 'typescript/build/client.js'

files {
'ui/build/index.html',
'ui/build/static/js/*.js',
'locales/*.json',
'peds.json'
}

if GetConvarInt('fivem-appearance:customization', 1) then
ui_page 'ui/build/index.html'

files {
'ui/build/index.html',
'ui/build/static/js/*.js',
'locales/*.json',
}
end
ui_page 'ui/build/index.html'
4 changes: 1 addition & 3 deletions typescript/src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -388,9 +388,7 @@ function setPedAppearance(ped: number, appearance: Omit<PedAppearance, 'model'>)
}

function init(): void {
if (GetConvarInt('fivem-appearance:customization', 1)) {
Customization.loadModule();
}
Customization.loadModule();

// Getters
exp('getPedModel', getPedModel);
Expand Down

0 comments on commit a13625b

Please sign in to comment.