Ped Surgery (In-Game Money)
Let players change their ped through surgery roleplay and pay with in-game bank money instead of a Tebex purchase. A surgeon performs the operation, the patient picks their new look, and the money goes to the surgeon's job account.
[!NOTE] Surgery never gives out peds that are sold on Tebex. Tebex peds still go through the normal Ped Changer.
🩺 How It Works
[Surgeon targets a player] ──► [Enters a price]
│
▼
[Patient gets Accept / Decline] ──► [Accepts]
│
▼
[Ped Changer opens in surgery mode] ──► [Patient previews peds for free]
│
▼
[Patient confirms] ──► [Bank charged] ──► [Surgeon's job account paid]- A player with a surgeon job who is on duty looks at another player and picks Perform surgery from the target menu.
- The surgeon types a price between
MinPriceandMaxPrice. - The patient gets a popup showing the surgeon's name and price, with Accept and Decline buttons.
- After accepting, the menu opens as Surgery - $price with every tab the server allows, by default that is the whole character: body, heritage, face, hair, beard, makeup, skin, clothing, and tattoos.
- The patient previews everything for free. Money is only taken when they confirm.
- The price comes out of the patient's bank and goes to the surgeon's job account (society), or to the surgeon's own bank if no banking script is running.
[!IMPORTANT] The one price covers every tab the surgery opened, and it is charged whether or not the patient changed their body. A patient who only reshapes their face still pays, billing on the model swap alone would hand them the rest of the visit for free.
[!TIP] The price and offer popups use ox_lib. The target option needs ox_target or qb-target.
⚙️ Configuration (shared/config_surgery.lua)
Surgery is off by default. Set Enabled = true to turn it on.
Config.PedSurgery = {
Enabled = false,
Jobs = { 'ambulance' },
RequireOnDuty = true, -- set false if your server has no duty system
MinPrice = 5000,
MaxPrice = 100000,
PayTo = 'society', -- 'society' (falls back to surgeon's bank) or 'surgeon'
SocietyAccount = nil, -- nil uses the surgeon's job name
MaxDistance = 5.0,
OfferTimeout = 30, -- seconds to accept
SessionTimeout = 600, -- seconds to choose and pay
AllowGenderSwap = false,
UseCooldown = true, -- apply Config.PedChangeCooldown
Tabs = {
'ped', 'heritage', 'face', 'hair', 'beard', 'makeup', 'skin', 'clothing', 'tattoos',
},
}| Setting | Default | Description |
|---|---|---|
Enabled | false | Turns surgery on or off. |
Jobs | { 'ambulance' } | Jobs allowed to perform surgery. |
RequireOnDuty | true | Surgeon must be on duty. Set false if your server has no duty system, or the option never shows. |
MinPrice / MaxPrice | 5000 / 100000 | Price range the surgeon can charge. |
PayTo | 'society' | 'society' pays the job account (falls back to the surgeon's bank). 'surgeon' pays the surgeon directly. |
SocietyAccount | nil | Society account to pay. nil uses the surgeon's job name. |
MaxDistance | 5.0 | How close the surgeon must be, checked when offering and again when the patient pays. |
OfferTimeout | 30 | Seconds the patient has to accept. |
SessionTimeout | 600 | Seconds the patient has to choose a ped and confirm. |
AllowGenderSwap | false | Allow surgery to change to a ped of a different gender. |
UseCooldown | true | Apply Config.PedChangeCooldown from shared/config.lua to surgery too. |
Tabs | all nine | What the patient may change once the surgery starts. See below. |
🩹 What A Surgery Can Change
Tabs decides what the patient gets, in the order listed. Trim it to sell something narrower than a full re-edit.
| Tab | Opens |
|---|---|
ped | The model swap itself |
heritage | Mother, father, third parent, skin tone, genetic mix |
face | Face morph sliders and eye colour |
hair | Hair style and colour |
beard | Facial hair, eyebrows and chest hair |
makeup | Makeup, blush, lipstick |
skin | Blemishes, ageing, complexion, sun damage, freckles, body blemishes |
clothing | The full apparel wardrobe |
tattoos | Every tattoo zone |
An empty list falls back to { 'ped' }, and a name that doesn't match anything is skipped rather than breaking the menu.
[!TIP] Tabs needing a freemode body,
heritage,face,beard,makeup,skin, are dropped automatically while a story ped is selected, since head blend and overlays do nothing on one.
Want a clinic that only does noses? Tabs = { 'face' }. A barber-surgeon hybrid? Tabs = { 'hair', 'beard', 'makeup' }.
🛠️ Giving One Player The Surgery Menu
Staff can open the surgery menu on a specific player directly, no surgeon, no offer to accept, and every catalogue, cooldown, and gender rule waived. This is the tool for fixing a character someone is stuck in.
/givesurgery 12 -- free, all configured tabs
/givesurgery 12 5000 -- charge $5000
/givesurgery 12 0 ped,heritage,face -- only these tabs, freeIt ignores Enabled, so it works even on a server that runs no surgery roleplay at all. See Session Commands and the grantSurgery export.
💾 Saving
A surgery always commits its result to the character, even on a server running inventory clothing items. A shop hands you garments to carry; a patient who paid a surgeon bought the result, not items.
🛡️ Rules & Protection
Everything is checked on the server, so a modified client can't get around it.
- No Tebex peds: peds mapped to a Tebex package are never listed and are refused if requested, even if the patient owns them.
- Pay on confirm only: previewing is free, and backing out costs nothing.
- Surgeon must stay: the surgeon has to keep the job, stay on duty, and stay within
MaxDistanceuntil the patient pays. - No free staff surgery: admin bypass doesn't apply, so staff pay like everyone else.
- No unlock used: surgery doesn't need or use a Tebex ped unlock.
- Scope is server-side: the tab list comes from the server, so a modified client can't open tabs the surgery didn't sell.
- Cooldown: with
UseCooldown = true, a surgery counts as a ped change for the cooldown. - One at a time: a surgeon can run one surgery at a time, and a patient can have one offer at a time.
The surgery is cancelled, and the other player is told, when:
- the patient declines or closes the menu without paying;
- the offer or session times out;
- either player leaves the server.
💬 Messages
| Situation | Message |
|---|---|
| Price outside range | That price is outside the allowed range. |
| Too far away | The patient is too far away. |
| Patient already has an offer | That patient already has a surgery offer. |
| Surgeon already busy | You already have a surgery in progress. |
| Patient has no character yet | That patient has no saved character yet. |
| Patient can't afford it | You need $price in the bank. |
| Surgeon left or moved away | Your surgeon is no longer with you. |
🗄️ Database
| Database Table | Description |
|---|---|
kc_ped_surgeries | One row per paid surgery: patient, surgeon, old and new model, price, and where the money went. Created automatically. |
kc_ped_changes | Surgery changes are also logged here with context surgery. |
Ped Catalog & Unlocks
Allow players to wear non-freemode ped models (e.g. goon, hipster, zombie, custom add-on peds) and sell ped changes through your Tebex webstore.
Player to Player Styling
Let one player dress another. A stylist picks the clothes, the person in the chair watches it happen live, and nothing is saved or charged until they approve the result.