Jump to content

Your #1 Resource Platform

Browse and download thousands of free and premium resources for FiveM, Minecraft, web development and much more. Whether you're building a server, a website or a creative project - PrimeLeaks has everything you need, all in one place.

Start Browsing

Unlock the Full Experience

Stop waiting and start downloading at full speed. Our membership plans give you unlimited downloads, zero wait times and access to exclusive VIP content - all starting at just $8.99/month. Upgrade today and get the most out of PrimeLeaks.

View Plans

Got Something to Say?

Our forum is the heart of the PrimeLeaks community. Report scammers, stay up to date with the latest announcements, get help from our team and connect with other members - everything happens right here.

Visit Forum

1 Screenshot

About This File

Disables all NPCs on the RedM server — pedestrians, coaches (wagons), and horse riders.
Compatible with scripts that intentionally spawn NPCs via a whitelist system.

Installation
1. Drop the `no_npcs` folder into your server's `resources` directory.
2. Add `ensure no_npcs` to your `server.cfg`.

Compatibility - Whitelisting Spawned NPCs
If another resource spawns NPCs/vehicles that should NOT be deleted, whitelist them.

From a client-side script
```lua
local ped = CreatePed(...)
exports['no_npcs']:whitelistAdd(ped)

-- When done:
exports['no_npcs']:whitelistRemove(ped)
```

### From a server-side script

```lua
-- entityNetId = NetworkGetNetworkIdFromEntity(entity) on the client, sent to server
exports['no_npcs']:whitelistAdd(entityNetId)
exports['no_npcs']:whitelistRemove(entityNetId)
```

Trigger from client to server (network event)

```lua
TriggerServerEvent('no_npcs:requestWhitelistAdd', NetworkGetNetworkIdFromEntity(myPed))
TriggerServerEvent('no_npcs:requestWhitelistRemove', NetworkGetNetworkIdFromEntity(myPed))
```

Toggle Suppression at Runtime (client export)

```lua
exports['no_npcs']:setSuppression(false)  -- turn off
exports['no_npcs']:setSuppression(true)   -- turn back on
```
 

User Feedback

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
×
×
  • Create New...

Important Information

Welcome! To ensure the best possible experience, we require your acceptance of our Terms of Use and Privacy Policy. We also recommend reviewing our Guidelines prior to participation.