Fella Posted June 28, 2012 Share Posted June 28, 2012 Hi, im looking for a way to limit the play again option to only 2-3 times in a row. this code should get the job done: local timesMapPlayed = 0 local lastMapPlayed = 0 if currentMap ~= lastMapPlayed then timesMapPlayed = 1 lastMapPlayed = currentMap end if currentMap and timesMapPlayed <= 2 then -- map could be played max. 3 times in row timesMapPlayed = timesMapPlayed + 1 table.insert(poll, {"Play again", 'nextMapVoteResult', getRootElement(), currentMap}) end but for some reason it doesn't. What's wrong? Link to comment
Fury Posted July 3, 2012 Share Posted July 3, 2012 ^^ follow these steps viewtopic.php?f=91&p=347583#p347548 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