GR1M Docs

Taser

Turns GTA's taser (WEAPON_STUNGUN) into something closer to a modern police conducted-energy weapon. Two probe wires run from the taser to the target, the officer holds fire to keep shocking, and every second of current comes out of a battery on the taser. The tranquilizer pistol (WEAPON_STUNGUN_MP, GR1M_Research) is not touched.

v1.0.0Needs ox_lib, ox_inventory, qbx_core

#Install

  1. Add taser_cartridge and taser_battery to ox_inventory/data/items.lua (the entries are in install/ox_inventory-items.lua).
  2. Add ensure GR1M_Taser after ox_inventory and qbx_core.
  3. Give officers a way to get cartridges and batteries (add the items to an armoury shop in ox_inventory, or your own shop script).
  4. Open /taseradmin and add a charging dock at each armoury (stand on the spot, name it, press Add Dock).

#Using it

#How it works

The server owns every link. The client reports each shot, each hit and the fire button, and the server re-checks the taser in hand, the loaded shots, the battery and the distance. The server also cancels vanilla taser hits past the wire length, or on players or locals when staff make them immune.

A shock only ragdolls the target (a pulse every 0.4 s, sent to whoever owns the ped), so health is never touched and anticheats have nothing to flag. The tased player also gets the game's own taser screen effect.

Battery (taserBattery, 0-100) and loaded shots (taserShots) are saved on the taser's ox_inventory metadata, so they follow the weapon. Settings and docks are in the server KVP.

Every nearby client draws the wires as two sagging lines from the muzzle to the target's chest and hips, with sparks and a crackle (made in the NUI, no sound files) while the current runs.