Jump to content
Sign in to follow this  
zooloo75

How do I check if a number is even? or if it is divisible by a number.

Recommended Posts

I am making a script when an hour goes by in the server, then everyone gets something. Like a "Happy Hour".

The one problem I have though is checking if the time is even, or if it is divisible by a number.

For example - if time is divisible by 60, then {blablabla};

or if time is even then blablabla.

Something like that.

It would be more preferred if someone would help me with the "if number is divisible by x" issue though. - Thanks for the help in advance ;)

Share this post


Link to post
Share on other sites

if (_number % 2 == 0) then { hint "Number is even"};

;)

Share this post


Link to post
Share on other sites

Thanks Buliwyf, that did the trick! :D

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×