Jump to content

Get what's typed


Recommended Posts

Posted
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'}, 
    } 
  

San Andreas Utopia RPG (SAUR) Owner & Developer.

560x95_FFFFFF_FF9900_000000_000000.png

Education is the most powerful weapon which you can use to change the world.

Posted

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) 

Business System viewtopic.php?f=108&t=35797

Notepad++ Syntax Highlighting & Auto Completion viewtopic.php?f=91&t=76726

SQLite Tutorial viewtopic.php?f=148&t=38203

Posted

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) 

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