Garry's Mod Wiki

bit.tohex

  string bit.tohex( number value, number characters = 8 )

Description

Returns the hexadecimal representation of the number with the specified number of characters.

Arguments

1 number value
The value to be normalized.
2 number characters = 8
Maximum number of characters, if set. The absolute maximum is 8.

Returns

1 string
The hexadecimal representation, such as "00000001".