Jump to content

[info]Play Again


HunT

Recommended Posts

I made it few monts ago. Anyway, I don't use it

1. Add this at beginning of racevoting_server.lua in race resource

local timesMapPlayed = 0 
local lastMapPlayed = 0 

2. REPLACE this

if currentMap then 
        table.insert(poll, {"Play again", 'nextMapVoteResult', getRootElement(), currentMap}) 
    end 

WITH this

   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 

It may work. At least it works for me

Link to comment

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...