View Single Post
Author Message
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 02-09-2013 , 02:05   [L4D,L4D2,TF2,CSGO] NativeVotes (v0.8.3, 2014-10-16)
Reply With Quote #1

Upgrading from 0.7.x to 0.8.x
Download the entire zip again and extract it. NativeVotes gained translation files between 0.7.12 and 0.8.0 and they are required in order for revoting to work.

Transparent vote HUD (client mod)

For clients wanting a transparent vote HUD for TF2, download tf2_transvote.zip and unzip it to your steamapps\common\team fortress 2\tf\custom\ folder. Note: If you use a custom hud, it may already be using a different vote HUD.

CS:GO isn't currently working with Map votes or other Multiple Choice votes. This appears to be something that got broken when Valve changed the end of map vote to the current vote style in mid-March 2013.

(I apologize if you got here because this is marked as "Any". It only supports the 4 games listed up top.)

Source Code on GitHub
Bug Tracker on GitHub

Like my work? Now taking donations.

Requires MetaMod: Source 1.10.x
Requires SourceMod 1.5 or newer to compile

However, the plugin itself should run on SourceMod 1.4.

Changelog

Spoiler


What is NativeVotes?

NativeVotes is an API to generate vote panels using the game's own vote panels. It is the next version of the BuiltinVotes extension, but as a plugin.

What's new since BuiltinVotes 0.5.8?
  • NativeVotes_Close must be called instead of CloseHandle or the plugin will leak handles.
  • The API was completed redesigned. Whenever possible, the API was moved to be closer to the SourceMod menu API.
    • Unfortunately, that doesn't apply to the Vote Results callback. Plugins can't send back multi-dimensional arrays from natives. If you need to, you can call the NativeVotes_FixResults stock to change the votes back to multi-dimensional. An example of this is in NativeVotes MapChooser.
  • NativeVotes has its own configuration file now.
  • CS:GO is now supported. Needs testing.
  • Fail screen is no longer automatically shown if you close a vote without sending a fail or pass screen. Closing it without sending one IS a mistake on the plugin developers part.
  • NativeVotes manipulates the server's vote_controller entity. This should address issues where vote counts weren't showing up.

CVars

Edit these in cfg/sourcemod/nativevotes.cfg
  • nativevotes_version - NativeVotes API version
  • nativevotes_progress_hintbox - [0/1] def. 0 - Show current vote progress in a hint box
  • nativevotes_progress_chat - [0/1] def. 0 - Show current vote progress as chat messages
  • nativevotes_progress_console - [0/1] def. 0 - Show current vote progress as console messages
  • nativevotes_progress_client_console - [0/1] def 0 - Show current vote progress as console messages to clients
  • nativevotes_vote_delay - def 30 - Sets the recommended time in between public votes. This is only for votes that check NativeVotes_CheckVoteDelay or NativeVotes_IsNewVoteAllowed

Known Issues
  • Unloading NativeVotes while a vote panel is open may do bad things if the plugin isn't expecting it. The example plugin, NativeVotes MapChooser, doesn't expect it and will bomb.
  • NativeVotes_RegisterVoteManager currently does nothing and instead returns an error. This functionality will be added at a later time.
  • Yes/No votes may work, but "Yes" and "No" aren't being registered as answers correctly.
  • Natives dealing with adding and removing items shouldn't work on L4D and L4D2, but this isn't currently restricted.
  • NativeVotes_DisplayCallVoteFail does nothing on L4D and L4D2. I need more data about what they display when a vote fails to start.

NativeVotes API is in the attached nativevotes.inc. This is a work in progress and enum values in particular may change.

What is votediagnostics.smx?
votediagnostics is a special tool for people using the real vote panels that the game itself provides. It creates a logfile named vote_diagnostics.txt

I need people to do this to gather information on the vote IDs and also what CS:GO does with its other team strings.
Attached Files
File Type: smx nativevotes.smx (34.5 KB, 2614 views)
File Type: smx nativevotes-basecommands.smx (5.3 KB, 1941 views)
File Type: smx votediagnostics.smx (9.6 KB, 1587 views)
File Type: inc nativevotes.inc (35.1 KB, 3562 views)
File Type: zip tf2_transvote.zip (2.2 KB, 2205 views)
File Type: zip nativevotes-0.8.3.zip (95.0 KB, 6256 views)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 10-16-2014 at 00:30. Reason: Updated to 0.8.1
Powerlord is offline