Jump to content

Get what's typed


Recommended Posts

Hi I wanna edit the vote system so you can vote anything but how would I make it so I can get what the player types like /vote should I jump off this? And it would vote that.
local pollDidStart = exports.votemanager:startPoll { 
            title='My question', 
            percentage=65, 
            timeout=10, 
            allowchange=true, 
            visibleTo=getRootElement(), 
            [1]={'Answer 1'}, 
            [2]={'Answer 2'}, 
    } 
  

Link to comment

Like:

addCommandHandler ( "vote" , function ( player , cmd , firstArgument ) --Read about addCommandHandler 
local pollDidStart = exports.votemanager:startPoll { 
            title=firstArgument, 
            percentage=65, 
            timeout=10, 
            allowchange=true, 
            visibleTo=getRootElement(), 
            [1]={'Answer 1'}, 
            [2]={'Answer 2'} 
    } 
end) 

Link to comment

Hmm.. I replaced something in JR10 version and not working :x

addCommandHandler ( "vote" , function ( player , cmd ) 
local pollDidStart = exports.votemanager:startPoll { 
            title='Event', 
            percentage=65, 
            timeout=10, 
            allowchange=true, 
            visibleTo=getRootElement(), 
            [1]={'WWK'}, 
            [2]={'KSW'}, 
            [3]={'CPW'), 
            [4]={'Ganiany'}, 
    } 
end) 

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