PDA

View Full Version : [Lua] Vote system



Grandelf
22-11-09, 07:51 AM
Vote system

So what this does?

If you have the Vote Item, you will be able to call votes.
Players will be able to typ #yes if they agree and #no if they disagree.

You'll just get a code box, you fill in a question and players can vote once.
When you close the vote you will be able to see how many voted yes and how many voted no.
This might be usefull if you want to know things players like, so they keep plaing on your server.

You have to import this item:



INSERT INTO `items` VALUES ('99832', '0', '0', '-1', 'Vote Caller', '4716', '4', '1', '0', '0', '0', '0', '-1', '-1', '272', '1', '0', '0', '0', '0', '0', '0', '0', '0', '1', '0', '10', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', '0', null, '0', null, null, '0', null, '0', null, '0', null, null, '-1', '0', '0', '0', '0');


If you get an error with importing this item, you can also create an item yourself, just dont forget to put the flags on 1. And the "99832" to the ID of your item.



local VoteItem = 99832


The script: http://pastebin.com/f3d2581bb

Flake
28-01-10, 05:30 AM
im a little cunfused?
does it just list the id in the DB or on screen ?