Jump to content

A couple of problems

Work in Progress 1.2.4

HunterZ
HunterZ

Posted

First, something is off with the vote count...the "still needed" number seems to go up instead of down as more people vote.

Second, while the plugin saves off the list of voters, it doesn't re-add them to `votingProperties.votes` if the plugin gets reloaded.

If it helps, here is my config:

{
  "Settings": {
    "Time to announce heli vote's [in seconds]": 300,
    "Percentage of vote's required [0 - 100]": 80.0,
    "Cancel vote for Helicopters spawned by a player [Requires: Heli Signals]": false,
    "Cancel vote for locked Helicopters [Requires: Loot Defender]": false
  },
  "Commands & Permissions": {
    "Heli vote Command": "voteheli",
    "Heli kill command [Requires admin perm]": "killhelis",
    "Voting Permission": "use",
    "Admin Permission": "admin"
  },
  "Messages": {
    "Use Chat Messages?": true,
    "Use chat for Server Messages?": true,
    "Use Toastify Messages?": false,
    "Use Toastify for Server Messages?": false,
    "Use Notify Messages?": false,
    "Use Notify for Server Messages?": false,
    "Steam ID to use for the image for messages? [0 = default]": 0
  },
  "Notifications": {
    "Toastify Positive Msg ID": "success",
    "Toastify Negative Msg ID": "error",
    "Toastify Msg Duration": 10.0,
    "Notify Positive Msg ID": 0,
    "Notify Negative Msg ID": 1
  },
  "Version": {
    "Major": 1,
    "Minor": 2,
    "Patch": 4
  }
}

 

Snaplatack

Posted

Changed Status from Pending to Work in Progress

Snaplatack

Posted

Ill look into this tomorrow. I saw your post on Umod but got lost with real life stuff happening. sorry...

  • Like 1
HunterZ

Posted

No worries, just wanted to make sure you saw it.

I've been tempted to rework the plugin but I'd rather let you do it lol

Snaplatack

Posted

11 hours ago, HunterZ said:

No worries, just wanted to make sure you saw it.

I've been tempted to rework the plugin but I'd rather let you do it lol

If you wish to do that it's fine. Feel free to send it to me for me to review. I'm in the middle of rewriting it since it's horrendous lmao. This was my first plugin I ever made lol

Snaplatack

Posted (edited)

Care to test out this version? It wont actually be named KillHeliVote2 just doing that for now when rewriting
KillHeliVote2.cs

Edited by Snaplatack
HunterZ

Posted

On 10/9/2025 at 5:14 AM, Snaplatack said:

Care to test out this version? It wont actually be named KillHeliVote2 just doing that for now when rewriting
KillHeliVote2.cs

Thanks, I'll give it a try and get back to you.

HunterZ

Posted

Some initial findings:

  • Shows both toasts and chat messages, even when toasts are disabled.
  • Shows "We still need 0/1 votes!" when a single player is online, and they haven't voted (seems like it should say "still need 1/1 votes" or "have 0 of 1 needed votes").
  • Shows "1 Patrol Helis have been KILLED!!" twice in a row in chat on vote.
  • Like 1
Snaplatack

Posted

Ill look into those problems. The vote goes up to the max amount of people required to vote. I can make it count down if that makes more sense

Snaplatack

Posted

Give this one a swing. I couldnt reproduce the 2 message bug you were talking about. Fixed the toasts actually working as intended and the 0/1 votes now read as whats below
"A Patrol Helicopter has appeared!\nCast your vote with <color=#87a3ff>/{2}</color> to kill it!\nWe still need {0} out of {1} votes!"
Ofc that m essage is a config option so you can change it as you see fit.
KillHeliVote2.cs

  • Like 1
HunterZ

Posted

We just had a successful vote with 4 people online. The last voter reported getting only a single kill message, so I'm not sure why I saw two myself.

At this point the only issue I have is that the messages and/or numbers don't make sense:

  • "We are still waiting for 0/4 players to vote!"
  • "We are still waiting for 1/4 players to vote!"
  • "We are still waiting for 2/4 players to vote!"
  • "We are still waiting for 3/4 players to vote!"

 

Either the numbers should count down instead of up:

  • "We are still waiting for 4/4 players to vote!"
  • "We are still waiting for 3/4 players to vote!"
  • "We are still waiting for 2/4 players to vote!"
  • "We are still waiting for 1/4 players to vote!"

 

...Or the text should be changed so that the number progression makes sense:

  • "0/4 needed players have voted!"
  • "1/4 needed players have voted!"
  • "2/4 needed players have voted!"
  • "3/4 needed players have voted!"
Snaplatack

Posted (edited)

You can change it in the config. Like this
"A Patrol Helicopter has appeared!\nCast your vote with <color=#87a3ff>/{2}</color> to kill it!\n{0}/{1} needed players have voted!"
Ill update all messages that are like that to use that format tho. Thanks again for testing my dude!

Edited by Snaplatack
HunterZ

Posted (edited)

Sounds good.

Another possible issue:

3 people online. 2 voted. One of the voters logged off. Now it says this:

image.png.1a28047fa6dc1b821ec091fc1bb8da5b.png

Edited by HunterZ
2m

Downloads

Total number of downloads.

9.5k

Customers

Total customers served.

137.7k

Files Sold

Total number of files sold.

2.9m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.