Page cover

Client Exports

This page serves to outline and explain the developer exports offered by Zea Developments' z_taser resource. These exports allow you to further integrate z_taser into your server!


Collect Taser

This export enables you to assign a specific taser to users. It can be utilized within an armoury system or a similar setup where users are required to visit a designated location or complete a specific task to receive a taser.

exports["z_taser"]:collectTaser(`TASER_HASHKEY`)

Toggle Laser

This export will toggle the current status of the user's taser laser on or off. No parameters are required.

exports["z_taser"]:toggleLaser()

Get Is Laser Active

This export will return a boolean value indicating whether the user's current taser has its laser activated.

exports["z_taser"]:isLaserActive()

Toggle Flashlight

This export will toggle the current status of the user's taser flashlight on or off. No parameters are required.

exports["z_taser"]:toggleFlashlight()

Get Is Flashlight Active

This export will return a boolean value indicating whether the user's current taser has its flashlight activated.

exports["z_taser"]:isFlashlightActive()

Toggle Safety

This export will toggle the safety switch on the user's taser. It does not require any parameters.

exports["z_taser"]:toggleSafety()

Get Is Armed

This export will return a boolean value indicating whether the user's taser is armed. Specifically, it reflects whether the safety switch is disengaged, allowing the taser to fire. No parameters are required.

exports["z_taser"]:isTaserArmed()

Get Cartridge Count

This export will return an integer value indicating the number of cartridges currently loaded in the user's taser. No parameters are required.

exports["z_taser"]:getCartridgeCount()

Set Cartridge Count

This export enables manual updating of the number of cartridges currently loaded for the user. The function accepts a single parameter, which should be an integer representing the updated count of loaded cartridges.

exports["z_taser"]:setCartridgeCount(count)

Arc Taser

This export will activate the user's current taser for a 5-second pulse, identical to the keybind. It was created with the intention of facilitating further integration.

exports["z_taser"]:arcTaser()

Get Unique Id

This export will return a string value, which serves as a unique identifier for the user's taser. No other taser will share this identifier within the same session.

exports["z_taser"]:getUniqueId()

Reload Taser

This export will reload the user's current taser. It functions in the same way as the keybind and the command input. No parameters are required.

exports["z_taser"]:reloadTaser()

Remove Prongs

This export will remove the prongs from the specified target ID, if any are present. The provided target ID must be the network identifier of the pedestrian, or, if applicable, the server ID of the player.

exports["z_taser"]:removeProngsFromPed(target_id)

Last updated