Inrange
From EventScripts Community Encyclopedia
|
OverviewSyntax: Note: Command parameters are described inside the
< and > characters. Optional parameters are contained within [ and ] characters.Variation of this command that doesn't expand variables: {{{x}}} DescriptionChecks to see if <value1> is within +-<range> of <value2> and outputs 1 if true, or 0 if false, to <variable>. Parameters
Exampleses_xsetinfo myvar 0 // Check to see if 10 is within +-5 of 15. inrange myvar 10 5 15 //myvar = 1 // Check to see if 10 is within +- 3 of 6. inrange myvar 10 3 6 //myvar = 0 // Check to see if value1 is within 10 of value2. es_xset value1 85 es_xset value2 100 es inrange myvar server_var(value1) 10 server_var(value2) //myvar = 0
Notes
See alsoExternal linksinrange {{{category}}} |
