Garry's Mod Wiki

net.WriteUInt64

  net.WriteUInt64( string uint64 )

Just Added

This was just added in the latest version (2023.09.06). It might only be available on the Dev Branch right now.

Description

Appends an unsigned integer with 64 bits to the current net message.

The limit for an uint64 is 18.446.744.073.709.551.615.
Everything above the limit will be set to the limit.

Unsigned numbers do not support negative numbers.

Arguments

1 string uint64
The uint64 to be sent. Can be a number.

If your input is a number and not a string, it won't be networked correctly as soon as it has more than 13 digits.
This is because Lua represents numbers over 13 digits as 1e+14(100.000.000.000.000)
You can do something like this to convert it to a string: string.format("%.0f", number).
If you try to use tostring it will fail because it will create a result something like 1e+14 which doesn't work.