Silenci0/UMC

Vote Warnings not working

Erik-97 opened this issue · 5 comments

Here is my cfg, check it out, everything set up correctly and the vote warnings are not showing up in hint box, no sound etc...

Here is the pastebin links

umc-endvote.smx
umc-endvote-warnings.smx
vote_warnings.txt

Edit: All modules are used except "umc-randomcycle.smx"

Hello Erik,

Which game are you using UMC for? I will need to know since some source games may not support Hints or the plugin itself is not running Hints correctly for that game, so I would need to check to see if UMC is working properly.

In regards to the sounds, it seems you are using custom sounds for your vote warnings. This should be fine, but there are possibly several issues that may occur that could be preventing the sounds from playing:

  • The sound files are not being precached and/or downloaded by the client, you may need to use a plugin that assists in putting custom files on the download table and precaching them such as this one: https://forums.alliedmods.net/showthread.php?p=602270
  • The game you are using this plugin for has some issues playing custom sounds. If the game is CS:GO, it does not cache custom sounds after a user downloads the sounds for the first time. It may play the sounds if the user restarts the game client but not directly after download. As far as I am aware, it seems playing custom sounds in general might be an issue in CS:GO.
  • The .mp3 files are not formatted correctly for the Source Engine. Sounds in most Source games should be formatted to be 44100Hz (you'll need to look up specifics on custom sound formatting yourself).

Being that I've never used custom sounds for UMC, I cannot be sure how well they work myself. I may look into testing it when I have time. You may want to use default sounds for now.

Finally, do you happen to have any error logs for UMC? Logs can be found in addons/sourcemod/logs

Sounds works perfectly at vote starts and vote ends and runoffs (path located in cfg files), but the vote_warnings not working completly, it does nothing even its enabled, the hints not showing up....

UMC Log Pastebin

Judging from your logs, the game is CS:GO. It looks like it does load the vote_warnings.txt file and recognizes that there are 13 warnings, but it does not seem to be triggering for some reason and it doesn't seem like the plugin isn't work/throwing errors, so its either a bug or something else is going on.

Being that I don't play/work with CS:GO, I will need some time to work on this for that game, so it probably won't be an immediate fix. In the meantime, could you try to use Chat ( S ) or Center ( C ) for the vote warning notifications and see if that works for you? You can see the notification options available in comments of the vote_warnings.txt file here: https://github.com/Silenci0/UMC/blob/master/addons/sourcemod/configs/vote_warnings.txt

Its not an important issue so please take your time with the fix and i will set it to both Chat (S) and Center (C) and im gonna notify you if its working or not and send the logs also

I can confirm this bug.
Looking into code right now.

It seems that UMC_EndVote_OnTimeTimerUpdated is not being called.

Edit.
Found the issue in line 390 -> 0 < 0 here
if (current_time < GetArraySize(time_array))

Edit 2.

This is exactly what's happening.

Line 67
//TODO:
// -Possible bug where warnings are never updated (vote timer activates before OnConfigsExecuted
// finishes) Possible solution is to update the warnings when the timer ticks (use flags so its
// only done when necessary).