I created and tested this script in VORP, but it would probably work in other frameworks as well.
A small SERVER side script that cancels the event entityCreating to block the spawning of a ped from all populations. (Formerly a client side script that used the CFX event populationPedCreating to block the spawning of a ped.)
I created this script after being unable to find any existing repositories that prevented a ped model from spawning at the source instead of just despawning ones that were already being created. Despawners work fine for one or two specific peds that you want to not spawn in an area (IE, removing a bear from spawning near a camp ymap without disabling ALL bears in your server), but for widespread / multiple peds I found that it created weird visuals when the peds would respawn and despawn, and relied on you knowing the locations of all those spawns - this is just better all around!
Currently the script is set to prevent the underage ped models (IE, the orphan teenagers in Saint Denis) from spawning, but you could add any ped to the list that you wanted at the top of the client.lua!
Download
| Information | |
|---|---|
| Code is accessible | Yes |
| Subscription-based | No, it’s free! |
| Lines (approximately) | 20 |
| Requirements | Standalone |
| Support | No |