载入中...

Dangerous Npc Attack (bazooka npc) v1.3

187

Here is information about the DangerousNpcAttack script for Grand Theft Auto V (GTA 5). This script periodically makes nearby NPCs turn hostile and attack the player in GTA 5, injecting dynamic combat tension into the gameplay.

The project uses Apache 2.0 protocol, so welcome everyone to go to the GitHub link at the bottom to obtain the source code and conduct secondary development. Looking forward to your works!

V1.1 fixes memory leaks and optimizes performance, details can be viewed on GitHub (bottom link)

v1.2 Update: Fixed an issue where police NPCs could be selected as attack targets, triggering wanted levels. Added a police relationship group filter to ensure only non-police NPCs are chosen for attacks, enhancing gameplay experience.

1.3 fixes the issue where police partners spawned when using LSPDFR's "Ultimate Backup" plugin (and with LSPDFR loaded) were incorrectly selected as NPCs attacking the player.

The script offers several notable features:
  • By default, it randomly selects a nearby NPC to attack the player every 5 minutes. However, this interval is fully configurable to suit your preference.
  • There is a customizable key (default: NumPad3) that allows you to manually trigger an NPC attack at any moment.
  • It employs smart NPC selection. The script will choose the closest valid NPC within 50 meters, ensuring the selected NPC is alive, not in a vehicle, and not the player. It then arms the chosen NPC with an RPG and sets them as hostile towards you.


Usage Instructions:
  • The script will automatically attempt to trigger an attack according to the interval set in the INI configuration file.
  • You can also press the configured key to manually trigger an attack immediately.
  • After making changes to the configuration file, pressing F10 will reload the settings.


Installation Steps:
  1. First, install the necessary dependencies:
    • .NET 8 Runtime (required for ScriptHookVDotNet)
    • ScriptHookV (needed for executing GTA 5 scripts)
    • ScriptHookVDotNet (enables .NET-based scripts)

  2. Then, place the compiled DLL and INI files into the scripts folder of your GTA 5 root directory.


The configuration file, DangerousNpcAttack.ini (which will be auto-generated if it's missing), enables you to set the interval in minutes for automatic attacks and define the key for manual triggers using enum names from the Keys class.

If you wish to compile the script yourself, make sure you have the .NET Framework SDK installed. Then, use the provided command in a terminal, ensuring that the required DLLs are accessible.

Important Notes:
  • The script works on PC versions of GTA 5 (tested on Steam and Epic). If you have concerns about pre-compiled files, you can review the source code.
  • The script will notify you if there are no valid NPCs nearby, for example, when all NPCs are in vehicles or dead.


You can find more details and access the source code on GitHub.
Show Full Description

首次上传时间: 10天前
最后更新时间: 3天前
最后下载: 3小时前

All Versions

 v1.3 (current)

25次下载 , 7.0 KB
3天前

 v1.2

21次下载 , 7.0 KB
6天前

 v1.1

34次下载 , 7.0 KB
7天前

 v1

107次下载 , 7.0 KB
10天前

2个评论

OSZAR »