N.auto.load — Server Automatic JSON Loader
`N.auto.load()` automatically spawns **vehicles**, **objects**, and other entities from a JSON configuration file. This system is designed to make your development faster — just define everything on
N.auto.load({
file: "data/vehicles.json",
log: {
path: "logs/autospawn.log",
text: "[AUTO] Created {type} model={model} pos={pos}",
type: "info"
}
});[
{
"type": "vehicle",
"model": "sultan",
"pos": { "x": -1025.1, "y": -2735.3, "z": 20.2 },
"heading": 90,
"color": [0, 0, 0],
"engine": true,
"lock": false,
"plate": "NR-001",
"dimension": 0,
"data": { "garageId": 12 }
},
{
"type": "object",
"model": "prop_crate_11e",
"pos": { "x": 215.1, "y": -810.2, "z": 30.7 },
"dimension": 0,
"data": { "lootable": true }
}
]
Type
Description
⚙️ Parameters
Option
Type
Description
🔧 Example Setup
📁 Folder structure
🗂️ Logging System
🧩 Integration with N.spawn
🧱 Error Handling
Last updated