General Exports

This page explains the available client-side exports for the r_megaphone and their usage. These exports allow you to interact with the script programmatically from other resources.


1. Exports Overview

1.1 Get Aerial Water Quantity

exports['r_aerialfire']:GetAerialWaterQuantity(netId)

Description: Returns the current water quantity of a specific aerial firefighting vehicle using its network ID.

Parameters:

  • netId: The network ID of the aerial firefighting vehicle.

Returns:

  • number: The quantity of water remaining. Returns nil if the entity doesn't exist or isn't tracked.

Example Usage:

local netId = NetworkGetNetworkIdFromEntity(vehicle)
local quantity = exports['r_aerialfire']:GetAerialWaterQuantity(netId)

1.2 Set Aerial Water Quantity

exports['r_aerialfire']:SetAerialWaterQuantity(netId, quantity)

Description: Sets a new water quantity for a specific aerial firefighting vehicle and syncs the change with the server.

Parameters:

  • netId: The network ID of the aerial firefighting vehicle.

  • quantity: The new amount of water to set.

Example Usage:

local netId = NetworkGetNetworkIdFromEntity(vehicle)
exports['r_aerialfire']:SetAerialWaterQuantity(netId, 1500)

Last updated