util.tobool
From GMod Wiki
Function | |
Syntax |
util.tobool( Number or String value ) Where is this used? |
Description: | |
Turns the value 0, "0", "false" or nil into boolean false. Anything else is boolean true. | |
Returns: | Boolean |
Part of Library: | Util |
Realm: | |
BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Util.tobool]Util.tobool [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
Description | Evaluates a value. |
---|---|
Used on | |
Code | util.tobool(0) |
Output | false |
Description | Evaluates the value. |
---|---|
Used on | |
Code | util.tobool(1) |
Output | true |