- Thread Author
- #1
Revive the server - Add NPC+ traffic to the RAGE:MP server


Today we will revive our mod by generating NPCs like in GTA Online. ☝
It's just a pity that theydon't sync
between players....
And so, in fact, comrades, to the point. The script is not complicated!
All you need to do is add the following to the index.js on the client (a clean server):
JavaScript:
mp.events.add('guiReady', () => {
mp.game.ped.removeScenarioBlockingArea(0, true);
mp.game.streaming.setPedPopulationBudget(3);
mp.game.ped.setCreateRandomCops(true);
mp.game.vehicle.setRandomBoats(true);
mp.game.vehicle.setRandomTrains(true);
mp.game.vehicle.setGarbageTrucks(true);
mp.game.streaming.setVehiclePopulationBudget(3);
mp.game.invoke('0x34AD89078831A4BC'); // SET_ALL_VEHICLE_GENERATORS_ACTIVE
mp.game.vehicle.setAllLowPriorityVehicleGeneratorsActive(true);
mp.game.vehicle.setNumberOfParkedVehicles(-1);
mp.game.vehicle.displayDistantVehicles(true);
mp.game.graphics.disableVehicleDistantlights(false);
});