AI Core

ai-pawnshop

Pawnshops that buy items at panel prices, and scrapyards that take unregistered vehicles apart for materials.

ai-pawnshop gives players a place to turn loot into money and stolen cars into materials. Pawnshops buy items at the prices you set. Scrapyards take apart vehicles that nobody owns and give materials for them.

What it does in the game

  • Pawnshop. Walk to the counter and open the shop. The menu lists the items this shop buys that you carry, with the price per piece. Pick one, type how many, and get paid into the panel's money account.
  • Scrapyard. Park a vehicle within 12 m of the yard's centre, get out and use the yard point. Nobody may sit in the driver seat. A progress bar runs (the panel's time per vehicle); then the vehicle is deleted and you get a random count of each material.
  • Only stolen vehicles. The yard refuses vehicles the server created (rentals, job and service cars, owned cars, the armored truck) and vehicles registered in ai-vehicles: "The yard does not take registered vehicles".
  • Scrap wait. After a vehicle, the same character waits the panel's time before the next one. A reconnect does not reset it.

Installation

Installed by the AI Core recipe. By hand: ensure ai-pawnshop after ensure ai-core. It needs ai-core.

Items used by the defaults: goldchain, diamond_ring, rolex, coral (bought), scrapmetal, plastic, copper, steel, glass (scrap materials). ai-inventory has them; with another inventory, add them or change the panel.

Panel settings

Admin panel > Pawnshops. Defaults come from data/shops.json, data/scrapyards.json and data/settings.json.

Pawnshops tab

One record per shop. Defaults: Vinewood Pawn & Jewelry (buys goldchain, diamond_ring, rolex at $75 each) and Del Perro Diving Shop (buys coral at $75, NPC a_m_m_salton_01).

Pawnshop

SettingWhat it changesDefault for a new shop
NameThe shop's name, shown on the blip. 1-48 characters.empty
PlaceStand at the counter and use your position.0, 0, 0
Show on the mapShows the shop's blip.on
Blip lookSprite, colour and size.sprite 431, colour 5, size 0.7

What it buys

SettingWhat it changesUnitDefault
ItemsUp to 100 rows, each an Item and the Price paid per piece (0-10,000,000).$empty

Each shop also has an NPC card: Model (empty means no NPC), What it does (idle animation) and Where it stands.

Scrapyards tab

One record per yard. Default: Sandy Shores Scrap Yard.

Scrapyard

SettingWhat it changesDefault for a new yard
NameThe yard's name, shown on the blip. 1-48 characters.empty
PlaceThe middle of the yard; vehicles within 12 m count.0, 0, 0
Show on the mapShows the yard's blip.on
Blip lookSprite, colour and size.sprite 380, colour 9, size 0.7

Materials (what one vehicle gives)

SettingWhat it changesDefault
MaterialsUp to 20 rows, each an Item with From and Up to (0-100). Each vehicle gives a random count between the two.Sandy Shores: scrapmetal 4-10, plastic 2-6, copper 1-4, steel 1-4, glass 1-4

Settings tab

Used by every pawnshop and scrapyard. These settings stay on the server.

SettingWhat it changesUnitDefault
Money accountSales are paid into this account.cash
Time per vehicleHow long scrapping one vehicle takes. 1-600.s30
Wait between vehiclesHow long one player waits before scrapping the next vehicle. 0-1440.min15

Commands

None.

Keybinds

None. Shops and yards use ai-core's Interaction style (prompt with E, or a target option).

What it stands in for

No fxProvide. It does not answer another pawnshop or scrapyard script's exports or events.

Compatible scripts

Items go through AI Core's inventory layer, so any inventory AI Core supports works. The owned-vehicle check reads ai-vehicles (see Compatibility).

Known limits

  • Shops only buy; they do not sell items to players.
  • Log channels: pawn (sales) and scrap (scrapped vehicles).

On this page