TimeVoter

Approved TimeVoter 1.1.1

No permission to download

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
Jakkee submitted a new resource:

TimeVoter - Let your players vote for the server time and have the option to rig the vote?

Description:
Let your players vote for the server time, If you want the time to stay the way it is then you have the option to set the time or rig the vote to what ever time you want.
This plugin supports DreTaX's Moderator Plugin

Installation:
- Place into Python folder
- Reload the server
- Done

Player Commands:
/vote - Shows the help
/vote start - Starts a vote
/vote day - Votes for day
/vote night - Votes for Night

Admin/Moderator Commands:
/vote stop -...
Read more about this resource...
 

maughanorama

Member
Member
Nov 27, 2014
181
10
18
50
hi Jakke,,, sorry to keep coming with errors.
everytime anybody does /vote my server spits an error up

IronPython.Runtime.UnboundNameException: global name 'isMod' is not defined

thanks
 

Jakkee

Retired Staff
Retired Staff
Plugin Developer
Jul 28, 2014
1,465
932
113
Australia
hi Jakke,,, sorry to keep coming with errors.
everytime anybody does /vote my server spits an error up

IronPython.Runtime.UnboundNameException: global name 'isMod' is not defined

thanks
Redownload this plugin :p
I uploaded a version I didn't test.
I hav uploaded the correct file.
Also Thanks for posting these errors, Not many people do
 

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
def On_PlayerDisconnected(self, Player):
try:
if DataStore.Get("VoteNight", Player.SteamID) == "night":
DataStore.Remove("VoteDay", Player.SteamID)

elif DataStore.Get("VoteDay", Player.SteamID) == "day":
DataStore.Remove("VoteDay", Player.SteamID)

does it not have to be:

def On_PlayerDisconnected(self, Player):
try:
if DataStore.Get("VoteNight", Player.SteamID) == "night":
DataStore.Remove("VoteNight", Player.SteamID)
elif DataStore.Get("VoteDay", Player.SteamID) == "day":
DataStore.Remove("VoteDay", Player.SteamID)

?
 
  • Informative
Reactions: Jakkee

tarynkelley

Retired Staff
Retired Staff
Trusted Member
Nov 14, 2015
575
178
28
Parts Unknown
I could fix the 0.0% Problem with this code:

Python:
day = float(DataStore.Count("VoteDay"))
night = float(DataStore.Count("VoteNight"))
min = float(DataStore.Get("TimeVoter", "Min"))
total = float(day + night)