iiv03 Posted December 11, 2019 Share Posted December 11, 2019 (edited) hey yo all i have simple question if i write one command that come outputchatbox ("1") and if i type it again come outputchatbox ("2") i wan't it by math.random is there some other way? thx Edited December 11, 2019 by xFabel Link to comment
WorthlessCynomys Posted December 11, 2019 Share Posted December 11, 2019 (edited) local number = 1; function writeNumber() outputChatBox(number); number = number + 1; end addCommandHandler("number", writeNumber); Edited December 11, 2019 by WorthlessCynomys Link to comment
iiv03 Posted December 11, 2019 Author Share Posted December 11, 2019 1 minute ago, WorthlessCynomys said: lov local number = 1; function writeNumber() outputChatBox(number); number = number + 1; end addCommandHandler("number", writeNumber); i wanna do like something start first local gOutput = false but i forget... can u remember it to me? excuse Link to comment
WorthlessCynomys Posted December 11, 2019 Share Posted December 11, 2019 1 minute ago, xFabel said: i wanna do like something start first local gOutput = false but i forget... can u remember it to me? excuse Can you explain it better? Link to comment
iiv03 Posted December 11, 2019 Author Share Posted December 11, 2019 (edited) 4 minutes ago, WorthlessCynomys said: Can you explain it better? something like this? local gOutput = false function project1() if gOutput == true then outputChatBox("1") --elseif outputChatBox == false then if gOutput == false then outputChatBox("2") end end end addCommandHandler("code", project1) it's just random between ("1,2") Edited December 11, 2019 by xFabel Link to comment
WorthlessCynomys Posted December 11, 2019 Share Posted December 11, 2019 local gOutput = true; function writeStuff() if (gOutput) then outputChatBox("1"); else outputChatBox("2"); end gOutput = not gOutput; end addCommandHandler("stuff", writeStuff); 1 Link to comment
iiv03 Posted December 11, 2019 Author Share Posted December 11, 2019 1 minute ago, WorthlessCynomys said: local gOutput = true; function writeStuff() if (gOutput) then outputChatBox("1"); else outputChatBox("2"); end gOutput = not gOutput; end addCommandHandler("stuff", writeStuff); thx for help i forget that's but u remember me 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