Anti-ND Module


  1. Users
    1. Features
    2. Usage
      1. Enabling Anti-ND
  2. Advanced Mission-making
    1. Functions
    2. Eventhandlers

Users

Features

  • Enable or disable prevention of negligent discharges of:
    1. Rifles
    2. Pistols
    3. Launchers

While the player is:

  • Within a specified radius from their spawn location

  • And until a certain time limit has been reached

The module will prevent players from causing damage through negligent discharge (ND).

Usage

Enabling Anti-ND

  • Open the UO Framework Menu and select Module Settings.

  • Open the Anti-ND Settings tab and change settings appropriately.

You can configure the timing after player spawn (or JiP) and distance from the spawn location here.
These settings apply to all factions and all players.


Advanced Mission-making

Functions

This module may provide functions end-users can call themselves.

Eventhandlers

  • UO_FW_AntiND_Event

This event is a PreInit event. Read more about CBA Extended Event Handlers (a.k.a XEH) here.

_antiEvent = ["UO_FW_AntiND_Event", {systemChat "Output"}] call CBA_fnc_addEventHandler;

The above code handler adds an event handler called _antiEvent which when triggered will print to system chat “Output”, when the event “UO_FW_AntiND_Event” is activated.

More information about adding code to execute when events are triggered can be found here.