[ESX][FREE][First Script] Clear NPCs from MLOs and more [NPCs and spawned Cars]

Hey Guys,

created my first script ever. its nothing special but it was something, that i was searching for and didnt find. So i created this one.

You can set Coordinates and Radius, in which npcs cant spawn. You can set both, cars and npcs, or just one of each.

Hope you guys enjoy it.

Github: GitHub - FuzeVTeam/Clearpeds: Im a Starter. :) Hope you still enjoy. :)


Short, sweet, and to the point. I am sure there will be some to quickly criticize this as “too simple.” Sometimes the simplest things are all we need.

You have my respect and props. I am also a new scripter. I’ve written maybe six of these simple utility scripts, but I have yet to release any of them. Probably just nervous. I don’t like the idea of having my fresh newbie code picked apart by vultures.

My only small critique, I see no dependency on ESX. You should bill this as [STANDALONE].

1 Like

Well… Could be much better with less consumption if you define if the player is in a radius of a zone then it removes the npcs…

This is just a snippet and it can’t be in the release section as mentionned in rules

1 Like

The best way is to edit scenarios.


Both ways i guess are fine, but i didnt wanted to set it with a player radius because they should be deleted instantly. So i created this. :slight_smile: you guys can recreate it if u want, feel free to edit

Is there a chance that you can only delete the NPC vehicles everywhere :grinning:

What do you mean? So that no vehicles drive around ?

You want no one at all, best way is to add this to the command line option of your fxserver:

+set onesync_population false
  • Most easy way: txAdmin settings
  • Less easy way: edit batch file that launches the server
1 Like