What other players see
Why the game alone isn't enough
GTA sends each player's tattoos to the others in a fixed block of 1,792 slots, one per design, counting only the collections marked bRequiredForSync. The game's own tattoos already take about 1,600 of them. Designs past that are never seen by the others, and because the game sorts the collections in a broken way, which ones fall off can change between restarts (FiveM issues #2010 and #3092).
So this pack doesn't use that block: its collection has bRequiredForSync = false, and every base game tattoo keeps its slot. The pack shows its tattoos to the others itself.
How it works
- Each player's game reads the tattoos on that player's own character and sends them to the server, which passes them to the players around. All of them: this pack's, the game's and any other pack's.
- The others put exactly that list on that player's character.
- The list goes on again when the player changes tattoos or clothes, when they come near, and again every 2 seconds within 30 meters and every 5 seconds farther, up to
Config.SyncDistance, in case the game puts its own copy back. - It never reads another player's character: FiveM doesn't guarantee what the game says about it.
- The server checks every list before passing it on, so it works with
sv_stateBagStrictMode. - A list keeps up to 100 tattoos. Past that the first ones stay, in the order the game lists them, the same on the server and on every screen. A list is never thrown away whole.
- A list is sent once it reads the same twice, and not while the player is in a menu (
Config.HoldWhileMenus), so tattoos only tried on aren't sent. Nor for 3 seconds after the player's ped or model changes, because a skin reload puts the tattoos back a moment later.
So the others see what the player's character wears. If another menu takes tattoos off it (a barber putting on a hair fade, a shop that clears them when it closes), the others see that too, as with the game's own tattoos.
It doesn't depend on the tattoo script: it reads the character, not the script's database. It also turns on FiveM's fix for the game's broken sort (game_enableStableOverlaySort), for the tattoos the game still sends itself.
With ZAIDERS Appearance
ZAIDERS Appearance shows every player's tattoos to the others itself, and also sends darker layers (a tattoo put on more than once). While it does, this pack steps aside on its own: it doesn't send anything or touch anyone. The pack finds ZAIDERS Appearance by the name in its fxmanifest.lua, whatever its folder is called, and asks it once a second, so only one of the two ever runs.
- If ZAIDERS Appearance's sync is turned off, it isn't running, or it's a version without its own tattoo sync, the pack does it.
- When ZAIDERS Appearance stops while it syncs (an
ensure zaiders_appearance), the pack waits 20 seconds before taking over. If it comes back meanwhile, nothing changes hands. When the pack takes over, each player keeps what they show until their own fresh list arrives (a second or two). - While a ZAIDERS Appearance shop is open, what the player tries on isn't sent. The others keep seeing what the player wears.
- While another tattoo script keeps the tattoos, ZAIDERS Appearance also holds back what is tried on in other menus, as the pack does, and
exports.zaiders_tattoos:setBusyis passed on to it: the same call works either way.
What it needs
- OneSync on, not
legacy. FiveM only sends player state bags with OneSync on. With legacy or off, the server console warns when the pack starts, the pack's sync stays idle (/zaiderstattoossaysidle) and the others only see what the game sends. - The same pack on every player. It happens by itself: everyone downloads it from your server.
- Only one script doing this. If another tattoo pack brings its own script to show tattoos to other players, turn that one off: this pack shows every tattoo, from every collection. If you turn this one off instead (
Config.Sync = false), nobody else sees this pack's tattoos unless ZAIDERS Appearance syncs them.
Settings
| Setting | Default | What it does |
|---|---|---|
Config.Sync | true | Turns this on or off. |
Config.SyncDistance | 120 | Meters around a player in which their tattoos are put on. |
Config.SyncInterval | 1000 | Milliseconds between looks at the player's own tattoos (250 at least). |
Config.HoldWhileMenus | true | Doesn't send the player's list while they're in a menu (60 seconds at most). Other scripts can say it with exports.zaiders_tattoos:setBusy, which holds the list even with this setting false. |
Config.FixTattooSort | true | Turns on game_enableStableOverlaySort. |
Config.DiagCommand | false | Adds /zaiderstattoos (chat or F8): who syncs, what you wear and published, and what each player around published and when it was put on. |
Config.Sync, Config.SyncDistance and Config.SyncInterval can also be set from server.cfg (setr zaiders_tattoos_sync 0, setr zaiders_tattoos_distance 150, setr zaiders_tattoos_interval 750). The other three only in config.lua. See Configuration.
