View Single Post
Author Message
alerad
Junior Member
Join Date: Mar 2016
Old 01-30-2017 , 22:45   [Any] Polling (v0.1, 1/31/2017)
Reply With Quote #1

A simple polling system using SQLite.
You can add options, delete options and vote options.
When players connect, if they haven't voted on the poll they'll be prompted with a voting screen. Useful to know what your players want.

Admin Commands
sm_addoption/sm_createpolloption I'd like to see skins
sm_deleteoption/sm_deletepolloption Opens panel with options, the selected one will be deleted WITH NO CONFIRMATION, so be extra careful

User commands
Both do the same, they open a panel with all the options, ordered from most votes to less votes and showing the percentage of votes for each option.
sm_poll
sm_results

Just drop polling.smx in addons/plugins.

The only configuration needed is adding this to /configs/databases.cfg

HTML Code:
"polling" {
    "driver" "sqlite"
    "host" "localhost"
    "database" "polling-sqlite"
    "user" "root"
    "pass" ""
}
Feel free to pull request at https://github.com/alerad/sm-polling
Attached Files
File Type: smx polling.smx (20.8 KB, 293 views)
File Type: zip polling.zip (70.8 KB, 182 views)

Last edited by alerad; 01-30-2017 at 22:48.
alerad is offline