deerAntiNPC | Stop modders from spamming peds!

antiNPC
A quick, simple script made with the goal of stopping modders from spamming peds.

Download: Tebex (FREE) OR Github

Features:

  • Stop the spawning of any new peds/npcs
  • Allow peds that have a specific health (ped whitelisting)

NOTICE: This will stop the spawning of ALL peds. If you have any script that spawns peds, or have AI turned on this will stop said peds/AI from spawning!

Thank you @NeonFahrer for the idea.

Ped Whitelisting:

If your server spawns peds, that you do not want to despawn in the script that creates that ped use SetEntityHealth() right after the ped is spawned, and set its heath to the defined ‘healthWhitelist’. This will allow the ped to stay.

If you need further help implementing this let me know.

My Other Work: deerBlacklister | deerESXBlacklister | deerRPChat | deerSaltyMic

3 Likes

Fixed the issue causing the script to crash some players / Sorry about that!

thank you for sharing

I use the Script “Peds” so this script will stop working after I add your script?

This idea is cool and all but the negative side is we can’t spawn any peds… dang

That is correct, you won’t be able to spawn any peds with the current state of the script.

I can implement a workaround for this, standby.

3/11/2021 Update

  • You can now allow specific peds by setting their health to the defined health in client.lua and server.lua.

For Instance:

If your server has a mechanic ped, that you do not want to despawn in the script that creates that ped use SetEntityHealth() right after the ped is spawned, and set its heath to the defined ‘healthWhitelist’. This will allow the ped to stay.

If you need further help implementing this let me know.

1 Like

“entityCreating”
and using DeleteEntity(ent) ? why ?

This one done to ensure deletion of the entity, there were times in testing where the entity would not delete even after canceling the event feel free to remove it, however as stated you may have times where it does not delete, for whatever reason.

if i’m being honest…

buy an anticheat…

Yes, you could buy an anti-cheat. But for those that do not want to do that, and just want a simple solution this is here.

I don’t know how your comment really helps anyone or contributes to this resource but thanks for the comment regardless.

Keep your illegal “workaround” out of the forum please.

“Illegal?” I beg your pardon?

Sorry sir, but you have me very confused.

image
Talking about this, of course he is referring to all “anti cheat” that are being sold somewhere else than tebex, wich is illegal

99.99% of FiveM servers have this “illegal” “workaround” lmao

And ? That’s not a reason to spread it on the forum