Garry's Mod Wiki

Garry's Mod Wiki

  boolean util.tobool( any input )

Description

We advise against using this. It may be changed or removed in a future update. You should use tobool instead.

Converts string or a number to a bool, if possible. Alias of tobool.

Arguments

1 any input
A string or a number to convert.

Returns

1 boolean
False if the input is equal to the string or boolean "false", if the input is equal to the string or number "0", or if the input is nil. Returns true otherwise.

This site is a community mirror of the official Garry's Mod wiki.. This site is not maintained by Facepunch Studios.

Page content is automatically updated twice a day. Edits and history are not available.

Last Parsed: Loading...