- Code:
NAME = "votes"
VERSION = "1.0"
AUTHOR = "amagos10"
WEBSITE = "http://sandboxcomunityclan.forumieren.de"
DESCRIPTION = "This addon can cancel and enable the votes of the game"
COMMANDS = {
"vote on": ["Enable the votes"],
"vote off": ["Disables the votes."],
"vote": ["Toggle"]
}
PERMISSIONS = {
"chat": {
"vote on": 19,
"vote off": 19,
"vote": 19
}
}
import host
class Addon:
def __init__(self, core):
self.core = core
chat_vote(self, p, params):
cmd = "sv.votingEnabled"
if params[0] == "on": host.rcon_invoke(cmd + " 1")
elif params[0] == "off": host.rcon_invoke(cmd + " 0")
else:
state = [1, 0][host.rcon_invoke(cmd)]
host.rcon_invoke(cmd + " " + str(state))
p.sendMsg("Done")
Addon made by ME and with this you can enable and disable votes.
Commands:
@vote on - on
@vote off - off
@vote - toggle
I think that should work. I didn't try it cause i can't do vots in local. Please try this on server and tell me if it works.
To download: amagos10@amagos10.bplaced.net/votes.py
(without http or ftp),(just copy and paste)