Koja Scripts

Features

How every gameplay feature works: trunks and trunk props, drops, shops, crafting, durability, clothing, held items, throwing, the workshop, giving and frisking.

Features

Trunks and gloveboxes

Open a trunk by standing at the back of a vehicle and pressing TAB. The door opens with an animation and the trunk grid appears next to your pockets. Grid size and weight come from Config.Trunk by vehicle class or model; frontTrunk models open at the front. Inside a vehicle, TAB opens the glovebox. Two players at the same trunk see each other's changes right away.

Trunk props

The button above the trunk grid lays the trunk contents out as real props in the car. Props lie flat on the trunk floor, sized to the item's grid footprint, and stay in place for everyone nearby. The trunk area is found automatically from the rear axle. If the props end up in the cabin of a specific model, an admin can fix it with /trunkarea: stand at the trunk, move the box with the arrow keys (Shift for the bumper edge, left/right for width, Page Up/Down for floor height), Enter saves it for that model, Delete goes back to automatic, Backspace cancels.

Drops

Dropping an item puts it on the ground with physics. Items dropped close together (Config.Drops.mergeRadius) merge into one drop and show as a pile. A small dot floats over items on the ground; the one you can pick up is highlighted. Press E to open it. Drops disappear after Config.Drops.lifetime seconds without being touched. Weapons on the ground are the real weapon model with its attachments.

Stashes

Stashes come from Config.Stashes, from ox_inventory's stashes.lua, from RegisterStash and from the admin panel. A stash can be limited to jobs and grades. shared = false gives every player their own copy at the same spot.

Shops

Shops show a floating sign with the shop name and the interact key. The shop grid shows every item with its price tag. Click or drag an item to buy it: a window shows the item, price, stock, an amount stepper with quick buttons and the payment choice (cash or card). Cash is the money item in your inventory. Shops support item currencies (for example black_money), job and grade limits, licenses and limited stock.

Crafting

At a bench, the crafting panel lists its recipes with the ingredients you have and need. Pick an amount and press Craft: a progress bar with an animation runs, then the ingredients are taken and the result is added (or dropped at your feet if it does not fit). Walking away from the bench during the progress cancels it without taking anything. Recipes in Config.Crafting.hand are also available from the inventory's Crafting tab without a bench. Tools are needed but not consumed. Ingredient aliases let ox item names count, for example scrapmetal for scrap_metal.

Salvage

Items with a salvage block have Salvage in the right-click menu. It takes the item apart after a progress bar and gives the results (weapons into scrap, clothes into cloth and so on).

Durability and repair

Weapons lose durability with every shot (the rate depends on the weapon class: snipers wear fast, SMGs slowly). Tools lose durability every time they are used and when they are used as a crafting tool. The bar on the tile shows what is left.

At 0% the item is broken: it is greyed out with a Broken tag, a weapon cannot be drawn (and is holstered if you hold it), a tool cannot be used. With Config.Durability.broken = 'remove' the item falls apart instead. In a stack, one piece breaks and the rest stay at 100%.

To repair, right click the item → Repair · . You need a repair item that fits the item's category, for example a weapon_kit (+40%) for weapons or a repairkit (+60%) for weapons and tools. The entry is greyed out with the reason when the item is not damaged or you have nothing to repair it with.

Clothing as items

Every clothing piece has its own slot: hat, glasses, mask, earrings, chain, jacket, shirt, pants, shoes, watch and bracelet. Drag a piece off the character to undress and get it as an item; drag it back to dress. Wrong-gender clothes are refused.

  • The first time a player loads, what they wear becomes items.
  • Clothes bought in a shop or put on by another script (wardrobe, skin menu, job uniform) are picked up automatically and become items in the slots, replacing the old ones. Nothing syncs while a menu has focus, so browsing a clothing shop does not create items.
  • In a vehicle, while ragdolled or falling, nothing syncs. Hats GTA takes off in a car come back on exit.
  • Changing an item in the inventory only changes that piece on the character, so clothes from other scripts are never reverted.
  • Equipped backpacks and vests show on the character and come off when unequipped.

Outfit bags

The outfit_bag item (Garment bag) holds clothing and outfits only. Right click it → Wear contents puts on the clothes in the bag; what you were wearing goes into the bag.

Held items

Food, drinks and items with hold can be held in the hand: right click → Hold in hand, or press the item's hotbar key. While holding: E uses it (one bite or sip), right mouse throws one unit (hold to aim with an arc), left mouse puts one unit down in front of you, X puts it away. Attacking is blocked while holding.

Throwing weapons

With a weapon drawn, hold the middle mouse button. An arc shows where it will land and the force charges while you hold; release to throw, right mouse cancels. The weapon flies with physics and lands as a drop with its ammo and attachments. It works from a vehicle too: the throw animation plays through the window and the vehicle speed is added. The server only removes the item on release and checks the landing spot, so it cannot be duplicated.

Weapon workshop

Right click a firearm → Modify. The weapon model with its attachments appears in front of a camera; drag to rotate, scroll to zoom. Markers sit on each mount point. Drag a part from the list onto a marker (or click it) to attach it; a new part in an occupied slot swaps the old one back into your inventory.

Giving items

Right click an item → Give. The inventory closes and you pick the receiver with the camera: an arrow and a ring on the ground mark the person you are aiming at (a lone person nearby is picked automatically). E or left mouse confirms, right mouse cancels. You hold the item out, and the receiver gets a window to accept or decline. The ring stays on the receiver until they answer.

Search and frisk

  • Frisk: walk up behind a player who has their hands up, is cuffed or dead, and use the ox_target option or /frisk. Their inventory is revealed cell by cell, and you can take items.
  • Search: police jobs from Config.Search can use /search on the nearest player.

Cash as an item

With Config.Cash.enabled, money and black_money are items synced with the framework accounts both ways. Money added by another script appears as items; giving, dropping or spending the items changes the account.

Dumpsters

World dumpsters can be searched for random loot from Config.Dumpsters.loot. They refill after refill seconds and each player has a searches-per-hour limit.

Item popups

Every change to what you carry shows a card on the right side of the screen, for example +2 Water or -$450.