Turbe$Z Posted December 18, 2016 Share Posted December 18, 2016 I want make more than one function to math.random, when i click on a button, choose a function, for example god mode, or give weapons, how to make it? Sorry for my very bad english. Link to comment
Addlibs Posted December 18, 2016 Share Posted December 18, 2016 local random = math.random(1, 3) --change as appropriate if random == 1 then --random action, e.g. give weapon elseif random == 2 then --random aciton, e.g. give health elseif random == 3 then --random action, e.g. give armor --add more as appropriate end 1 Link to comment
Turbe$Z Posted December 19, 2016 Author Share Posted December 19, 2016 19 hours ago, MrTasty said: local random = math.random(1, 3) --change as appropriate if random == 1 then --random action, e.g. give weapon elseif random == 2 then --random aciton, e.g. give health elseif random == 3 then --random action, e.g. give armor --add more as appropriate end thanks Link to comment
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now