Activity

kikolpnoob

I’ve implemented the basic scrapyard system using ox_lib. The script creates a scrapyard zone at a random location from the config file when the server starts. Each location has its own zone coordinates and NPC spawn point, so the scrapyard appears in different places each restart.
When a player enters the zone, the scrap dealer NPC spawns automatically. The NPC has animations and can be interacted with using ox_target. When all players leave the zone, the NPC despawns to save resources.
The vehicle detection system scans for all vehicles within the zone radius using ox_lib’s getNearbyVehicles function. When you interact with the NPC, it opens a context menu that shows all detected vehicles with their model names and license plates. Each vehicle gets its own button in the menu that you can click to select it for scrapping.

Attachment
0