โComparison Functions
All functions relating to comparing values to numbers
isGreaterThanOrEqual(player: Player, value, num): boolean
isGreaterThanOrEqual(player: Player, value, num): boolean
Returns whether or not value
's value is greater than or equal to num
.
Example
Ezstatz:isGreaterThanOrEqual(player, cash, 10)
--[[
If cash is greater than or equal to 10, this function returns true.
Otherwise, it'll return false.
]]--
isLessThanOrEqual(player: Player, value: ValueBase, num: number): boolean
isLessThanOrEqual(player: Player, value: ValueBase, num: number): boolean
Same as isGreaterThanOrEqual()
, however it'll do the exact opposite, instead checking if the provided value
is less than or equal to num
.
Example
Ezstatz:isLessThanOrEqual(player, cash, 10)
--[[
If cash is less than or equal to 10, this function returns true.
Otherwise, it'll return false.
]]--
isGreaterThan(player: Player, value: ValueBase, num: number): boolean
(player: Player, value: ValueBase, num: number): boolean
Returns true if the given value
's Value
property is greater than num
. Otherwise, returns false.
Example
Ezstatz:isGreaterThan(player, cash, 10)
--[[
If cash is greater than 10, this function returns true.
Otherwise, it'll return false.
]]--
isLessThan(player: Player, value: ValueBase, num: number): boolean
isLessThan(player: Player, value: ValueBase, num: number): boolean
Similar to isGreaterThan()
, it will instead return true if the value's Value property is less than num
Example
Ezstatz:isLessThan(player, cash, 10)
--[[
If cash is less than 10, this function returns true.
Otherwise, it'll return false.
]]--
Last updated