# Install CXG-GTFAT

Install the resource under the exact name `CXG_GTFAT`, enable `OneSync`, and add it to the server's startup order. A framework is only required if you choose a persistence option that depends on one.

## Requirements

- FiveM with `OneSync` enabled.
- Folder and resource name: `CXG_GTFAT`.
- No older CXG Fat/Luxe selector or other alternative metadata package managing the same clothing.

The default mode does not require QB, ESX, or an external interface or language library. If you configure qb or esx persistence, install and start the selected framework. For custom persistence, implement identity resolution; the built-in `KVP` storage continues to work. You can replace it with your own storage provider if needed.

## Installation steps

1. Copy the resource folder into the server's resources as `CXG_GTFAT`.
2. Remove older CXG Fat/Luxe resources and do not start two selectors or alternative packages for the same clothing.
3. Check that `OneSync` is enabled in the server configuration.
4. Add this to `server.cfg`:

   ~~~cfg
   ensure `CXG_GTFAT`
   ~~~

5. Start or restart the server. If you change configuration files, restart the resource:

   ~~~cfg
   restart `CXG_GTFAT`
   ~~~

6. With the default access mode, grant the `ACE` permission `cxg_gtfat.use` to the relevant group or principal. For example:

   ~~~cfg
   add_ace group.admin `cxg_gtfat.use` allow
   ~~~

   To use a custom group, associate real identifiers:

   ~~~cfg
   add_ace group.fat_scale `cxg_gtfat.use` allow
   add_principal identifier.license:YOUR_REAL_IDENTIFIER group.fat_scale
   ~~~

7. Connect an authorized freemode player and use `/fatweight`. Try a value below the configured threshold and then one at or above it to check the Normal/Fat change.

Replace YOUR_REAL_IDENTIFIER with a valid identifier from your server. The resource does not create permissions or principals automatically.

## First use

With the default values, `/fatweight` opens the scale to set a weight between 50 and 180 kg. The Fat threshold is 100 kg inclusive. `/fatdecal ui` opens the same interface; `/fatdecal status` checks the status, while on and off change the weight to cross the threshold. See [Interface](https://docs.cxgstudios.com/docs/en/02-cxg-gtfat/06-interfaz.md).

Close the scale with Esc or the X button. Closing the window does not revert the applied weight or turn off Fat.

## Common issues

| Symptom | What to check |
| --- | --- |
| The resource does not start | Check the exact `CXG_GTFAT` name, that `OneSync` is enabled, and for Lua errors while loading the configuration. |
| The command reports no access | With the default `ACE` access, grant `cxg_gtfat.use`. If you changed to jobs, groups, or custom, implement the policy in `bridge/server.lua`. |
| No station appears | Stations are disabled by default. Enable and configure an entry in `Config.Stations`; you can also use `/fatweight`. |
| Weight resets after reconnecting | This is expected with framework = 'none', which saves only for the session. Configure per-character persistence if needed. |
| Clothing does not change | Check that the character uses one of the two freemode models, that the clothing is covered, and that another resource is not managing the same decal at the same time. |
| A menu saves a technical decal | Manually apply the patch for that menu version or integrate `SanitizeAppearance` at its save point. |
| Effects remain after changing metadata or removing the resource | Stop duplicate selectors, remove the alternative metadata package that no longer applies, and fully restart the server and client to load the current metadata. |
