Cut Players Hair

Installation

Installation

1. Drop the resource

Extract the package into your resources folder. The final path should look like:

server-data/resources/[suty]/suty-shave/

The folder must be named exactly suty-shave. A renamed copy prints FATAL: resource must be named "suty-shave" and stops. Check that fxmanifest.lua sits directly inside the folder (no suty-shave/suty-shave/).

The animations, the clipper prop and the trimmer sound ship inside the resource.

2. Start order in server.cfg

Ready-made examples live in install/server/. Merge only the one for your framework, without duplicating resources you already start. suty-shave goes after ox_lib, the inventory and the target.

setr inventory:framework "qbx"
ensure oxmysql
ensure ox_lib
ensure qbx_core
ensure ox_inventory
ensure ox_target
ensure suty-shave

OneSync must be enabled: the server checks that both players are really next to each other.

3. The clipper item

Item Label What it does ox_inventory export
hairclipper Maquinita de recortar Use it to take the clipper out (or put it away), then aim at a player and pick Recortar suty-shave.useClipper

Register it only in your inventory, inside the existing item table. Don't replace the file and don't duplicate the entry.

Add to ox_inventory/data/items.lua (QBX, QB-Core or ESX):

['hairclipper'] = {
    label = 'Maquinita de recortar',
    weight = 300,
    stack = false,
    close = true,
    consume = 0,
    description = 'Maquinita para recortar. Úsala para sacarla a la mano y apunta a otro jugador para raparle el pelo.',
    client = { export = 'suty-shave.useClipper', image = 'hairclipper.png' }
},

Keep consume = 0: the clipper is never used up.

Item image

The image ships in install/ox_inventory/hairclipper.png. Copy it to your inventory's image folder:

Inventory Folder
ox_inventory ox_inventory/web/images/
qb-inventory qb-inventory/html/images/

4. Restart

Restart ox_inventory (or the whole server) after adding the item. Restarting only suty-shave doesn't reload the inventory's items. On a healthy boot the console prints the SUTY SHAVE banner with the version and Loaded.

5. Quick test

  1. Give yourself a hairclipper and stand next to another player.
  2. Use the clipper from the inventory: it goes to your right hand (use it again to put it away).
  3. Aim at the other player with the target eye and pick Recortar.
  4. If Config.ShaveConditions.consent = true, they get Solicitud de Recorte and have 15 seconds to press Aceptar or Negar.
  5. Both players play the animation with the trimmer sound. The shaved player ends up bald for 20 minutes.

6. (Optional) Admin-granted players only

Config.RequirePermission = true

Then an admin grants access per player:

/recorteperm 5 on    # grant player ID 5
/recorteperm 5 off   # revoke

Grants are saved by license and survive restarts while Config.PersistGrants = true (default).

Merry Christmas.

From Suty.