Garry's Mod Wiki

bf_read

This is the object passed to usermessage.Hook when a message is received. It contains each value stored in the message in sequential order. You should read values from it in the order you wrote them.

Methods

Angle bf_read:ReadAngle()
Reads an returns an angle object from the bitstream.
boolean bf_read:ReadBool()
Reads 1 bit an returns a bool representing the bit.
number bf_read:ReadChar()
Reads a signed char and returns a number from -127 to 127 representing the ascii value of that char.
Entity bf_read:ReadEntity()
Reads a short representing an entity index and returns the matching entity handle.
number bf_read:ReadFloat()
Reads a 4 byte float from the bitstream and returns it.
number bf_read:ReadLong()
Reads a 4 byte long from the bitstream and returns it.
number bf_read:ReadShort()
Reads a 2 byte short from the bitstream and returns it.
string bf_read:ReadString()
Reads a null terminated string from the bitstream.
Vector bf_read:ReadVector()
Reads a special encoded vector from the bitstream and returns it, this function is not suitable to send normals.
Vector bf_read:ReadVectorNormal()
Reads a special encoded vector normal from the bitstream and returns it, this function is not suitable to send vectors that represent a position.
bf_read:Reset()
Rewinds the bitstream so it can be read again.

Page Links


Special Pages


Wikis

?

Render Time: 92ms

Session 0
DB GetPage 2
Generate Html 4
SaveChanges 9
Render Body 0
Render Sidebar 75