Hello, Guest

By registering with us, you'll be able to discuss, share and private message with other members of our community.
What's new

SCRIPT Revive the server - Add NPC+ traffic to the RAGE:MP server

Alexalsaud

Administrative
Staff member
Admin
Joined
Aug 5, 2024
Messages
337
ICoins
1,301
Revive the server - Add NPC+ traffic to the RAGE:MP server

1725169785866.png

Today we will revive our mod by generating NPCs like in GTA Online. ☝
It's just a pity that they don'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);
});
 
Back
Top