Hello, I was wondering it was possible to detect an interval of numbers in gmod. For example:
local randomeventprobability = math.random(0, 1000)
(randomeventprobability <= 999)
I was wondering if it would be possible to check if randomeventprobabiliity equals greater than 25 but less than 100.
Programming in Lua
Check the logical operators - use 'and' to get what you want.
if (randomeventprobability >= 25 and randomeventprobability < 100) then
--[[ stuff --]]
end
WOW thank you! That was quick!
Sorry, you need to Log In to post a reply to this thread.