๐ Script Flow
Petty Crimes turns the ordinary street furniture of Los Santos into low-level crime. There is no job to take and no mission to start โ a player simply walks up to a mailbox, a parking meter, a payphone, a parked car or another pedestrian and takes what is there. The loot is then sold to a black-market dealer.
Eight activities ship with the script. Every one of them is enabled, tuned and placed from the in-game editor, and every one of them can alert the police.
The in-game editor
Everything except the four files described in configuration is edited in-game and saved to the database โ no server restart, no file editing.
Open it
Log in as an admin and type /pettyCrimes, or open the DevHub admin menu with /admindevhub and pick Petty Crimes. Players without admin rights cannot open it.
Pick an activity
The sidebar lists the Dashboard, the Map, the Shop and the eight crimes. The Dashboard shows which activities are on, the Map draws every configured location and lets you teleport to it.
Configure it
Each crime page has the same tabs: General (cooldowns, target label, animation, prop models), Minigame, Rewards, Coords and Dispatch. Toggle ENABLED at the top to make the activity live.
Place the coords
On the Coords tab you can type coordinates by hand, IMPORT one of the ready-made presets from the json/ folder, or hit PLACE IN WORLD โ that closes the editor, drops you into the world and lets you walk to a spot and press Enter to drop a coordinate. Save and you are back in the editor.
Save
SAVE CHANGES writes the config to the database and it applies immediately.
What every activity shares
- Rewards โ a list of item / money / empty entries with a percentage chance each. The chances should add up to at most 100; whatever is left over is an implicit "found nothing".
- Cooldowns โ a cooldown on the spot (or vehicle/ped) itself, so the same mailbox cannot be farmed, and a personal cooldown on the player.
- Minigame โ three crimes use a fixed, purpose-built minigame; the others let you pick from Balance Core, Matrix Align, Glyph Sequence, Relay Switch and Hex Match, each with its own tunables.
- Dispatch โ a code, title, message, priority, alert chance, the jobs to notify and a map blip. The alert itself is sent by the
Config.SendDispatchhook in sh.main.lua, which you wire into your own dispatch system. - Skill perks โ with devhub_skillTree enabled, every crime grants XP and can be sped up, auto-solved or made quieter.
The eight activities
The values below are the defaults the SQL file installs โ all of them are editable.
๐ฎ Postal Box Theft
The player walks up to a mailbox standing on the map (prop_postbox_01a, prop_postbox_01b), takes the eye-target option and picks the lock in the Mailbox Break-in minigame. Success empties the box: a little cash, stolen letters, a sheet of stamps or a small parcel โ and sometimes nothing at all. The box goes on cooldown for 10 minutes afterwards.
๐ ฟ๏ธ Parking Meter Theft
Same idea on parking meters (prop_parknmeter_01, prop_parknmeter_02). The Parking Meter minigame has the player force the service panel and flip the switches to empty the coin vault. Loot is coins, parking tokens or the whole coin vault. The meter is on cooldown for 5 minutes.
โ๏ธ Phone Booth Theft
Payphones (prop_phonebox_01a, prop_phonebox_02, prop_phonebox_04) are cracked in the Payphone minigame โ pry off the case, break the lock box, enter the code. The reward is the change inside or the entire coin box. 10-minute cooldown per booth.
These three crimes need no coords at all to work โ leave the coord list empty and every prop of those models, anywhere on the map, becomes robbable. Add coords when you want to restrict the crime to specific spots (the json/ presets already contain the map's mailboxes, meters and phone boxes).
๐ป Car Radio Theft
The only activity with no world target: the player sits in a vehicle and uses the tool item (devhub_pc_car_radio_tools, bought from the dealer). By default they must be in the driver's seat. The Car Radio minigame has them bypass the security, unscrew the unit and pull the screen โ success hands over a car radio. The tool is reusable by default, and each vehicle's radio can only be taken once every 10 minutes.
๐ฆ Porch Theft
Delivery packages spawn on porches and doorsteps at the configured coords โ up to 8 at a time by default, and a stolen one is replaced as soon as a slot frees up.
Steal the package
The player targets a package, a short progress bar runs and the box ends up in their hands.
Carry it away
The carry animation loops while the package is held. G drops it โ the drop key, the bone it attaches to and the offsets are all configurable.
Open it
Once dropped, the package can be opened. That runs the minigame (Balance Core by default) and only then is the loot rolled: cash, a delivery package or a cardboard parcel.
๐ค NPC Pickpocket
The player sneaks up behind an ambient pedestrian who is standing still or walking slowly, and takes the "Pickpocket" option. The minigame (Balance Core by default) runs while the player quietly trails the ped, so a walking mark can still be robbed. Success hands over pocket change, a worn wallet, cigarettes, gum, spare keys or a bit of cash โ a fair share of attempts turn up nothing.
Fail it and the ped catches the player red-handed and turns hostile for about 12 seconds.
The NPC blacklist on this activity's page keeps the crime off the wrong peds: it can auto-skip pedestrians spawned by other scripts (shop, job and mission NPCs), and you can block individual ped models such as s_m_y_cop_01.
๐ซ NPC Mugging
The loud version. The player aims a firearm at a pedestrian within 15 metres and holds the aim; the ped gives in and a "Robbingโฆ" progress bar runs. The take is much better than pickpocketing โ up to $180, a fat wallet, a smartphone, a gold chain, a luxury watch or a diamond ring. Afterwards the ped flees.
๐ Smash & Grab
Parked cars spawn at the configured spawn points on every restart (only a random share of the points is used, so the street looks different each time). The server rolls loot for each car and, when it has some, a visible prop sits on the passenger seat โ a laptop, a handbag, a duffel bag.
The player smashes the passenger window, reaches in, and clears the minigame to grab what is inside. The loot was already decided when the car was stocked, so the minigame is pure skill โ win it and the item is yours. A looted car restocks after a few minutes.
Selling the loot โ the black-market dealer
Stolen goods are worthless until someone buys them. A dealer ped spawns at one of the configured locations โ picked at random on each restart, or fixed if you turn randomization off โ and the player talks to him to open the trade dialogue.
- Sell: every stolen item has a price, from a $15 letter up to the more valuable jewellery and electronics.
- Buy: the tools the crimes need, such as the car radio tools.
The dealer's ped model, name, role, icon, locations and the whole buy/sell list live on the Shop page of the in-game editor.
Police response
Every crime carries its own dispatch settings, and the alert only fires if the activity's dispatch is enabled and its alert-chance roll passes. What happens then is up to you โ the Config.SendDispatch function ships empty so you can forward the call to whatever dispatch resource your server runs.