Jump to content

help with voteredo


ALw7sH

Recommended Posts

hello

i have code voteredo [but not my code : )]

i want he redo after the map we end

this is the code :

function startMidMapVoteForRestartMap(player) 
    displayHilariarseMessage( player ) 
    exports.votemanager:stopPoll() 
  
    -- Actual vote started here 
    local pollDidStart = exports.votemanager:startPoll { 
            title='Do you want to restart the current map?', 
            percentage=51, 
            timeout=15, 
            allowchange=true, 
            visibleTo=getRootElement(), 
            [1]={'Yes', 'midMapRestartVoteResult', getRootElement(), true}, 
            [2]={'No', 'midMapRestartVoteResult', getRootElement(), false;default=true}, 
    } 
  
    -- Change state if vote did start 
    if pollDidStart then 
        gotoState('MidMapVote') 
    end 
  
end 
addCommandHandler('voteredo',startMidMapVoteForRestartMap) 

Link to comment
You want it to redo AFTER the map is finished and not instantly?

Or do u just want to play the same map over and over again?

now if the vote redo is end with yes

the map is restart Even if there was played

i want if voteredo end with yes the map restart after he finsh (after all players die)

Link to comment
You want it to redo AFTER the map is finished and not instantly?

Or do u just want to play the same map over and over again?

now if the vote redo is end with yes

the map is restart Even if there was played

i want if voteredo end with yes the map restart after he finsh (after all players die)

Ah, I see.

So basically you want to set nextmap to the currently played map when the voting is successful.

The thing you need to edit is not in the part of the code u posted.

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...