Module swvr

SWVR Base Module

Info:

  • Author: Doctor Jew

Functions

GetVehicles() Retrieve all existing SWVR vehicles
GetPlayers() Retrieve all players current in a SWVR vehicle
Config(key, default) Retrieve the cached config value for better performance
GetSide(value) Get the side of an entity (light, dark, or neutral).
util.GenerateTransponder(entity) Generate a transponder for an entity.

Fields

Version Current SWVR version
Author Author of SWVR
config Configuration cache


Functions

GetVehicles()
Retrieve all existing SWVR vehicles

Returns:

    table Table of Entity classes
GetPlayers()
Retrieve all players current in a SWVR vehicle

Returns:

    table Table of Players

Usage:

    for _, ply in ipairs(swvr.GetPlayers()) do
    	print(ply:SteamID64())
    end
Config(key, default)
Retrieve the cached config value for better performance

Parameters:

  • key string The category or sub-category to retrieve
  • default Default value returned in case key is not found

Returns:

    The retrieved value if found or the default

Usage:

    local value = swvr.Config("volume.engine", 100)
GetSide(value)
Get the side of an entity (light, dark, or neutral).

Parameters:

  • value An Entity or string to get the side value of.

Returns:

    number The side enumeration value
util.GenerateTransponder(entity)
Generate a transponder for an entity.

Parameters:

  • entity entity The entity to use to generate

Returns:

    string The transponder code

Fields

Version
Current SWVR version
Author
Author of SWVR
config
Configuration cache
  • volume Volume levels for sounds
  • hud HUD settings, such as color or components
generated by LDoc 1.4.6 Last updated 2019-07-16 04:36:33