-
Notifications
You must be signed in to change notification settings - Fork 0
Functions Reference
These in-game functions allow easier usage of the extensions, since this mod is intended for local use, Authentication data for PiShock is stored in CBA settings which are accessed by these functions. This allows calling the API with just the Intensity and Duration info.
Sends a shock request to the arma3_pishock extension.
[Intensity, Duration] call NUG_fnc_shock;Sends a vibrate request to the arma3_pishock extension.
[Intensity, Duration] call NUG_fnc_vibrate;Sends a beep request to the arma3_pishock extension.
[Duration] call NUG_fnc_beep;All functions perform the 4 following checks to ensure safety and consent.
Checks if the function was executed with remoteExec and if the client running the function Allows Remote Commands If unauthorized remoteExecution is detected a BIS_fnc_error is called with the steamID of the caller for reporting purposes.
A killswitch keybind is implemented to the mod, All executions are prevented while killswitch is off.
Checks if the given parameters are within allowed ranges a BIS_fnc_error is called if the values are out of range.
Cooldowns can be set globally or on command basis, this checks if the enough time has passed since the last command.
A list of variables are attached to the client to keep track of eventHandlers and Cooldown Timings.
| Variable | Description |
|---|---|
| NUG_lastShockTime | Records timestamp of the last shock. |
| NUG_lastVibrateTime | Records timestamp of the last vibration. |
| NUG_lastBeepTime | Records timestamp of the last beep. |
| NUG_shockEHIndex | Index of the shock EH. |
| NUG_shockEHType | Type of the shock EH |
| NUG_vibrateEHIndex | Index of the vibrate EH. |
| NUG_vibrateEHType | Type of the vibrate EH |
| NUG_beepEHIndex | Index of the beep EH. |
| NUG_beepEHType | Type of the beep EH. |
| NUG_debugEHIndex | Index of the Response Display EH. |
CBA Settings can be accessed with the following handles.
| Handle | Type | Description |
|---|---|---|
| NUG_piShock_enable | Bool | Main enable for piShock. |
| NUG_allow_remoteExec | Bool | Enables remoteExecution. |
| NUG_userName | String | PiShock Username. |
| NUG_shareCode | String | PiShock ShareCode. |
| NUG_APIKEY | String | PiShock API Key. |
| NUG_global_cooldown | Integer | Global cooldown for PiShock commands. |
| Handle | Type | Description |
|---|---|---|
| NUG_shock_enabled | Bool | Enable for shock commands. |
| NUG_shock_handler | Bool | EventHandler for shocks. |
| NUG_shock_intensity | Integer | Intensity of the shock. |
| NUG_shock_duration | Integer | Duration of the shock. |
| NUG_shock_cooldown | Integer | Cooldown for shock commands. |
| Handle | Type | Description |
|---|---|---|
| NUG_vibrate_enabled | Bool | Enable for vibration commands. |
| NUG_vibrate_handler | Bool | EventHandler for vibrations. |
| NUG_vibrate_intensity | Integer | Intensity of the vibration. |
| NUG_vibrate_duration | Integer | Duration of the vibration. |
| NUG_vibrate_cooldown | Integer | Cooldown for vibration commands. |
| Handle | Type | Description |
|---|---|---|
| NUG_beep_enabled | Bool | Enable for beep commands. |
| NUG_beep_handler | Bool | EventHandler for beeps. |
| NUG_beep_duration | Integer | Duration of the beep. |
| NUG_beep_cooldown | Integer | Cooldown for beep commands. |
| Handle | Type | Description |
|---|---|---|
| NUG_response_display | Bool | Enable for response display. |
The following functions were created for internal use only, as such will not be documented at this time.
-
NUG_fnc_shockEH_handler
-
NUG_fnc_vibrateEH_handler
-
NUG_fnc_beepEH_handler
-
NUG_fnc_APIResponseDisplay_handler
-
NUG_fnc_killswitch_handler
-
NUG_fnc_allowRE_handler