What the server checks
Prices, stock and who may wear each garment are decided by the server, never by the player's game. A modified game can't buy a garment for less, wear one that's out of stock, or keep a VIP or job garment it isn't allowed.
Purchases
- What a player pays for is priced against the look the server has saved for them, with the server's prices. The server never charges more than the menu showed.
- Every payment and every save is checked, wherever the menu was opened. Housing wardrobes and job lockers can open menus anywhere, but the server checks what's paid and saved, not where the menu was.
- With a slow database (for example, a backup locking a table), a purchase may say it's still being saved. The money only comes back if the save really fails, and the player is told either way.
- The character creator is free, but it still can't give out-of-stock or job-only garments, nor an eye hidden with
Config.Eyes.hidden("The purchase isn't valid.", and the console names it). A character that already has a look can't save a new one through the creator; only admins can. - A hidden eye is never sold. A player who already has one keeps it.
- The barber's Trim is decided by the server with the same table as the menu: only a beard or eyebrows that really had hair taken away pay the Trim price.
- Save changes (free changes, such as the other sex or taking something off) goes through the same check as a purchase, at $0, and never pays: if a price shows up, the purchase opens instead.
Each shop sells its own
- The clothing store sells clothes, and the haircut with its color. Never the barber's face, eyes, beard, eyebrows or makeup.
- The barber shop sells the hair and the face (for a ped that isn't freemode, its head and that head's textures, never an empty head). Never clothes, nor another model.
- Another model (the other sex, a ped) is sold with the clothing store's Peds.
Anything else is refused with "This store doesn't sell that.", whatever a modified game says about which menu it was in.
A shop's own catalog and prices
A map shop can have its own percent of prices and sell only some things or some packs (panel → Shops → Catalog and prices). The server decides which shop the player is at:
- The percent and the limits count only while the player stands at that shop (its radius plus 3 m, or its drawn area), as the server sees the player. Away from every shop, the usual prices.
- A garment from a pack the shop doesn't sell is refused: "This store doesn't sell clothes from that pack."
- Without OneSync the server can't see where the player stands, so the shop the menu says is used.
Tattoos
The server doesn't send anyone's tattoos: each player's game sends the others what their own character wears (see What other players see). The tattoos a player buys and keeps are priced and checked on the server like any purchase: price, stock, layers up to Config.Tattoos.maxLayers, and at most 200 tattoos and 300 layers in all.
What the console says about tattoos when the server starts:
game_enableStableOverlaySort was off and this resource turned it on ...:server.cfgdoesn't have thesetrline. Add it near the top and restart the whole server.<resource> handles the tattoos: this menu's tattoo shop is off.orThe tattoo shop is off (Config.Tattoos.enabled = false).: another resource puts on the tattoos and fades, or none does.- From ZAIDERS Tattoos 1.0.4:
[zaiders_tattoos] ZAIDERS Appearance ... is older than 2.3.2: update it(older than 2.3.1for 2.3.0 and older), and[zaiders_tattoos] started with N players online: ...when the pack was started with players online (restart the whole server).
Which garment is which
GTA numbers clothing in the order the packs start, so the same number can be a different garment on another server, or after a change. The server keeps its own list of which garment is behind each number:
- An admin's game sends it. The server asks for it once an admin is online, after it starts or after a clothing pack changes.
- Until it has one, a garment that is job-only, VIP or out of stock is recognized from what each player's game reports, together with the last list. The stricter of the two wins.
After installing, or after adding or removing a clothing pack, join once with an admin.
Restart the whole server, not one pack
Restarting a single clothing pack while the server runs gives the players who join afterwards different garment numbers, because FiveM numbers clothing in start order. The console warns when a pack starts or stops while the server runs. Restart the whole server instead.
Codes
- Outfit codes: whoever uses a code pays, as in the store, for the garments they aren't wearing. Out-of-stock and restricted garments stay as their own. A code can't be used to get clothes for free.
- Ped codes: each code is claimed by one player only, even if two try at the same moment. If the ped can't be given (for example, it already has its one owner), the code is released and stays unused. Each player can try a limited number of wrong codes per minute.
Photos on demand
Each player can get at most Config.Photos.bps bytes a second and Config.Photos.perMinute photos a minute. Only the pictures in zaiders_photos/photos/ and zaiders_photos/tattoos/ are sent, by their exact name; master/ and data/ never leave the server.
ESX with esx_skin running
esx_skin's own save event stores whatever clothes a player's game sends, a sex change too, because that's how esx_skin works. ZAIDERS Appearance doesn't save through that event out of the box (Config.Compat.esxSkinSave = false). Even so, esx_skin itself still listens to it.
If you sell VIP or job garments on ESX, or use the sex change only at creation or by request, stop esx_skin when you can (ESX without a multicharacter), or protect that event in esx_skin.
Peds
- ESX with skinchanger running: peds aren't sold, because skinchanger only keeps the freemode man and woman.
- Qbox: only peds the server knows by name are saved (the game's peds and your addon peds from the panel), because Qbox's character screen loads the model by its name.
- Ped by name:
Config.PedByNameandConfig.PedBlacklistare checked again when paying, so nobody keeps a ped they can't use.
Sex change
- Every save follows the mode chosen in the panel's Settings (see Sex change): the other sex is only saved in Free, by an admin, at a character's first save, or with an accepted permission. A modified game can't save the other sex.
- A permission is taken in one database update, so two saves at once never use it twice. It comes back if the payment or the save fails.
- A payment is checked and saved for the character loaded when it starts: if another character is loaded meanwhile, nothing is charged or saved.
- Answering a request is atomic and checked against the database's clock: an expired one can't be accepted, and nobody answers their own, nor one from another of their characters.
esx_skin:savethrough this menu (withConfig.Compat.esxSkinSave) only takes skinchanger'ssex0 or 1. esx_skin's own event is outside this menu: see ESX with esx_skin running.- A save of the other sex that the mode doesn't allow is refused, and the console says so:
... tried to save the other sex (... → ...) without permission (mode ...).
Height
- With the height off (out of the box) none of this runs: no state bag is written and no query touches
zaiders_bodyorzaiders_height_requests. Saved heights stay. - Only the server writes each player's height. A game that writes its own gets the server's back, and every game keeps it within the range of the sex it sees.
- The creator saves the height before the look: if it can't be written, nothing is saved and the creator asks to try again.
- A request is checked against the range of the sex the server sees, one at a time per character, with its waits. Accepting is atomic (two staff can't accept the same one, and an expired one can't be accepted) and never one's own, nor one from another of one's characters.
- With a price, the player pays when it's accepted, only if they're online on that character; if the save fails, the money comes back.
