[Free][Release] MFPD-NoWrithe! Disable NPC's from dying too quickly

MFPD-NoWrithe! :heart:

The NoWrithe! resource ensures that NPCs within a specified distance from the player will not perform the writhing animation when injured, which is the cause for their short time during fights.

The script runs upon player entering in the server and checks all nearby NPCs, modifying their behavior if they meet certain conditions.

Preview:

RESMON: 0.00ms-0.01ms (Idle and while using). Preview W/ Resmon:

Captura de tela 2024-07-01 102746

DOWNLOAD HERE!

Installation :floppy_disk:

  • DRAG “MFPD-NoWrithe!” To your resources folder and add to your server.cfg “ensure MFPD-NoWrithe!

  • Another way of installing it is by creating or selecting a folder inside your resources folder with brackets

    • Let’s Suppose you have a folder called “[Scripts]”, every resource you drag inside this folder will be automatically started just by having “ensure [Scripts]” inside your server.cfg!

Functionality:

Initialization: A table, handledPeds, is used to keep track of NPCs that have already been processed by the script.

Main Loop: A thread that runs very light on resources to check around and update NPCs table.

Distance Check: The resource calculates the distance between the player and each NPC. If an NPC is within 100 units of the player and meets the specified criteria, it updates the NPC’s behavior.

Radius can be changed if distance <= 100.0 but I haven’t tested any perfomance above “100”, so I can not guarantee you anything.

Behavior Modification: The resource sets configuration flags to prevent the writhing animation and ensure the NPC behaves as desired and withstand longer. *NPC HEALTH WASN’T MODIFIED, Every ped has it’s own health as normal.

DOWNLOAD

This resource is licensed under Apache License 2.0 .

|-------------------------------------|----------------------------|

| Code is accessible | Yes |
| Subscription-based | No |
| Lines (approximately) | 24 |
| Requirements | N/A |
| Support | Yes |

|-------------------------------------|----------------------------|

4 Likes

Just stream .meta files with increased health

1 Like

Will NPCs still attempt to fight or run away when attacked?

1 Like

Interresting idea, i will try it

1 Like

NPCs work normally, these ones I spawned with Menyoo, to demonstrate that they weren’t going to writhe.

But if you fight/shoot any other NPC within the radius, it will do the same reaction they were going to do in vanilla and they are not going to writhe obviously too.

If they are hostile, allies, or civilian, nothing was changed in this aspect, the ones in the preview did not react because of the “do not flee” set by menyoo, so I could demonstrate the resource.

I did not aim to just increase health, that’s why I kept everything default in this aspect, in my tests, it worked better the way made now, but obviously opinions may vary, this way was how I solved the problem I had with them writhing, but I get your take too.

1 Like

nice idea

1 Like

o maior de minas tem quer respeitar! GALOO :rooster:

1 Like

Exatamente, sempre GAAALOOO

1 Like