General Exports

This page explains the available exports for the r_bolawrap script and how to use them. These client-side exports allow you to interact programmatically with the rope system from other resources.


1. Exports Overview

1.1 Remove Ropes

exports['r_bolawrap']:RemoveRopes(targetServerId)

Description: Removes both the upper and lower rope states from a specific player.

Parameters:

  • targetServerId: The server ID of the target player to remove ropes from.


1.2 Set Recharge

exports['r_bolawrap']:SetRecharge(ammo)

Description: Sets the internal recharge count (rope ammo) of the bolawrap device for the local player.

Parameters:

  • ammo: Number of rope charges to assign.


1.3 Check Rope State

exports['r_bolawrap']:IsBolawrap(targetServerId)

Description: Returns the current rope state applied to the specified player.

Parameters:

  • targetServerId: The server ID of the player to check for rope state.

Returns:

  • 'both': If the player has both upper and lower ropes applied.

  • 'upper': If only the upper body of the player is tied.

  • 'lower': If only the lower body of the player is tied.

  • 'nothing': If no ropes are applied to the player.


2. Example Usage

Here is a basic example of how to use the rope exports:

-- Remove all ropes from player with ID 18
exports['r_bolawrap']:RemoveRopes(18)

-- Set recharge (ammo) of the Bolawrap device to 2
exports['r_bolawrap']:SetRecharge(2)

-- Check the rope state of the player with ID 15
local ropeState = exports['r_bolawrap']:IsBolawrap(15)

if ropeState == 'both' then
    print("Player is fully tied!")
elseif ropeState == 'upper' then
    print("Player's upper body is restrained.")
elseif ropeState == 'lower' then
    print("Player's legs are tied.")
else
    print("Player is free.")
end

Last updated