Functions/DarkRP/Shared/registerDoorVar

From Official DarkRP Wiki
Jump to: navigation, search
Function
Function name DarkRP.registerDoorVar(string name, function writeFn, function readFn)
Description:
Register a door variable by name. You should definitely register door variables. Registering DarkRPVars will make networking much more efficient.
Returns: nil
Part of Library: DarkRP
Realm: NewerShared.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Functions/DarkRP/Shared/registerDoorVar]DarkRP.registerDoorVar[/url][/b]

Function parameters

  1. name (string)
  2. The name of the door var.

  3. writeFn (function)
  4. The function that writes a value for this door var. Examples: net.WriteString, function(val) net.WriteUInt(val, 8) end.

  5. readFn (function)
  6. The function that reads and returns a value for this door var. Examples: net.ReadString, function() return net.ReadUInt(8) end.


Function return values

This function does not return any value.