Raised This Month: $32 Target: $400
 8% 

CallVoteFailed - UserMessage: List of "reason"s


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 08-30-2015 , 19:41   CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #1

Hello,

as I was not able to find a fitting "vote_create_failed_t" for CS:GO,
I put some effort into "research" the phrases displayed for the regarding reason parameter.

You will only find information about TF2 and the source SDK 2013, but not CS:GO,
so maybe someone could make use out of it (mainly while building a callvote blocker).


Regards!


--------------------------------------------------------------------------------------


00 - Vote Failed.

01 - You cannot call a new vote while other players are still loading.
02 - You called a vote recently and can not call another for %s1 seconds.
03 - Vote Failed.
04 - Vote Failed.
05 - Server has disabled that issue.

06 - That map does not exist.
07 - You must specify a map name.
08 - This vote recently failed. It can't be called again for %s1 secs.
09 - Voting to kick this player failed recently. It can't be called for %s1 secs.
10 - Voting to this map failed recently. It can't be called again for %s1 secs.

11 - Voting to swap teams failed recently. It can't be called again for %s1 secs.
12 - Voting to scramble failed recently. It can't be called again for %s1 secs.
13 - Voting to restart failed recently. It can't be called again for %s1 secs.
14 - Your team cannot call this vote.
15 - Voting not allowed during warmup.

16 - Vote Failed.
17 - You may not vote to kick the server admin.
18 - A Team Scramble is in progress.
19 - A Team Swap is in progress.
20 - This server has disabled voting for Spectators.

21 - This server has disabled voting.
22 - The next level has already been set.
23 - Vote Failed.
24 - You cannot surrender until a teammate abandons the match.
25 - Vote Failed.

26 - The match is already paused!
27 - The match is not paused!
28 - The match is not in warmup!
29 - This vote requires 10 players.
30 - Vote can't succeed after round has ended. Call vote again.

Last edited by RootCore; 08-30-2015 at 19:42. Reason: Typo
RootCore is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-01-2015 , 12:08   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #2

The ones that just appear as a generic Vote Failed message (except for 0) are probably used by the VoteFailed usermessage instead... the two usermessages share an enum.

3 is VOTE_FAILED_YES_MUST_EXCEED_NO (i.e. "Yes votes must outnumber No votes." in TF2)
4 is VOTE_FAILED_QUORUM_FAILURE (i.e. "Not enough votes" in TF2)

Be aware that the CS:GO team has renumbered some of these and may do so again in the future.

It used to be that numbers 0 through 15 matched up directly with the values TF2 used. As it is, 0 through 8 still match, but the values that used to be 9-13 are now 14-18.

Incidentally, the attached plugin can be used to test CallVoteFailed and VoteFailed numbers on both TF2 and CS:GO, provided Valve hasn't changed the usermessages.

Edit: The commands for the attached plugin are
callvotefail 1 0
votefail 1

where 1 is the number you're checking and 0 is the argument for types that take that (leaving this blank will use the value 0). Requires the generic admin permission ("b").

Edit 2: Plugin needs testing, as Valve may have changed the team number argument for votefail around... they did in TF2.
Attached Files
File Type: sp Get Plugin or Get Source (votefailed.sp - 563 views - 4.3 KB)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-02-2015 at 14:39.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-02-2015 , 17:03   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #3

I know I said the ones that just return Vote Failed may be for VoteFail usermessage instead, but there are some CallVoteFailed types that don't work. For example, TF2 reason 11 / CSGO reason 16 is supposed to be "Player not found", but it never has appeared to work correctly.

Who knows, maybe it does if you pass a userid for the second argument.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-02-2015 at 17:04.
Powerlord is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 09-03-2015 , 04:31   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #4

I could test this, but i don't think that it should work nevertheless, as if the player is not found he may not have an userid too I guess.

So they are changing around the numbers of the reason argument? This doesn't help much, thanks Valve. Well, the list in the first post should be okay for a while (for CS:GO at least).
RootCore is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-03-2015 , 14:49   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #5

Quote:
Originally Posted by RootCore View Post
I could test this, but i don't think that it should work nevertheless, as if the player is not found he may not have an userid too I guess.
It could be the client ID, too... but I don't know why it'd need either of them. Point is that it doesn't work.

Quote:
Originally Posted by RootCore View Post
So they are changing around the numbers of the reason argument? This doesn't help much, thanks Valve. Well, the list in the first post should be okay for a while (for CS:GO at least).
The reason why they renumbered is because they put similar reasons together. For example Team Swap is next to Surrender and the vote-specific Recently Failed messages are next to the generic Recently Failed.

To put it another way, here are the enums as I know it. Note: The names of the values in the first enum are taken directly from the Source SDK 2013, the second one is based on it.

Note: The first 2-3 in both lists are originally from L4D/L4D2's voting system. That's why transitioning exists despite TF2/CSGO specifically having one for Waiting For Players / Warmup.

TF2:
Code:
	VOTE_FAILED_GENERIC,
	VOTE_FAILED_TRANSITIONING_PLAYERS,
	VOTE_FAILED_RATE_EXCEEDED,
	VOTE_FAILED_YES_MUST_EXCEED_NO,
	VOTE_FAILED_QUORUM_FAILURE,
	VOTE_FAILED_ISSUE_DISABLED,
	VOTE_FAILED_MAP_NOT_FOUND,
	VOTE_FAILED_MAP_NAME_REQUIRED,
	VOTE_FAILED_FAILED_RECENTLY,
	VOTE_FAILED_TEAM_CANT_CALL,
	VOTE_FAILED_WAITINGFORPLAYERS,
	VOTE_FAILED_PLAYERNOTFOUND,
	VOTE_FAILED_CANNOT_KICK_ADMIN,
	VOTE_FAILED_SCRAMBLE_IN_PROGRESS,
	VOTE_FAILED_SPECTATOR,
	VOTE_FAILED_NEXTLEVEL_SET,
	VOTE_FAILED_MAP_NOT_VALID,
	VOTE_FAILED_CANNOT_KICK_FOR_TIME,
	VOTE_FAILED_CANNOT_KICK_DURING_ROUND,
	VOTE_FAILED_MODIFICATION_ALREADY_ACTIVE,
Note that the last 3 for TF2 were added to TF2 after CSGO added its voting system, hence why they aren't used at all in CSGO.

CSGO:

Code:
	VOTE_FAILED_GENERIC,
	VOTE_FAILED_TRANSITIONING_PLAYERS,
	VOTE_FAILED_RATE_EXCEEDED,
	VOTE_FAILED_YES_MUST_EXCEED_NO,
	VOTE_FAILED_QUORUM_FAILURE,
	VOTE_FAILED_ISSUE_DISABLED,
	VOTE_FAILED_MAP_NOT_FOUND,
	VOTE_FAILED_MAP_NAME_REQUIRED,
	VOTE_FAILED_FAILED_RECENTLY,
	VOTE_FAILED_FAILED_RECENTLY_KICK,
	VOTE_FAILED_FAILED_RECENTLY_MAP,
	VOTE_FAILED_FAILED_RECENTLY_SWAP,
	VOTE_FAILED_FAILED_RECENTLY_SCRAMBLE,
	VOTE_FAILED_FAILED_RECENTLY_RESTART,
	VOTE_FAILED_TEAM_CANT_CALL,
	VOTE_FAILED_WAITINGFORPLAYERS,
	VOTE_FAILED_PLAYERNOTFOUND,
	VOTE_FAILED_CANNOT_KICK_ADMIN,
	VOTE_FAILED_SCRAMBLE_IN_PROGRESS,
	VOTE_FAILED_SWAP_IN_PROGRESS,
	VOTE_FAILED_SPECTATOR,
	VOTE_FAILED_NEXTLEVEL_SET,
	VOTE_FAILED_UNKNOWN1,
	VOTE_FAILED_SURRENDER_ABANDON,
	VOTE_FAILED_UNKNOWN2,
	VOTE_FAILED_PAUSED,
	VOTE_FAILED_NOT_PAUSED,
	VOTE_FAILED_NOT_WARMUP,
	VOTE_FAILED_MIN_PLAYERS,
	VOTE_FAILED_ROUND_ENDED,
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-03-2015 at 14:54.
Powerlord is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-04-2015 , 17:22   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #6

Well, I found some translation strings that may correspond to the missing CallVoteFail reasons.

Specifically, they are:
"Failed to collect 10 votes required for rematch." (this is a VoteFail, not CallVoteFail)
"All players did not agree to continue with bots." (this is a VoteFail, not CallVoteFail)
"Matchmaking parameters adjusted, not offering rematch."
"Cannot rematch because less than 10 players are connected."
"Not offering rematch because less than 10 players are connected."

I have to test things in CS:GO to see what's what.
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-04-2015 at 17:29.
Powerlord is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 09-09-2015 , 04:50   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #7

Quote:
Originally Posted by Powerlord View Post
"Matchmaking parameters adjusted, not offering rematch."
"Cannot rematch because less than 10 players are connected."
"Failed to collect 10 votes required for rematch."
This should be broken, as there are no rematches anymore. At least not in the matchmaking.. maybe it is possible to use it in a other context (community competitive?).

You don't get the parameter warning too. So i think it is gone now.

Quote:
Originally Posted by Powerlord View Post
"Not offering rematch because less than 10 players are connected."
Well, this seems to be a hint targeted towards the console or something, as it is quiet equal to the "cannot rematch" one.

Quote:
Originally Posted by Powerlord View Post
"All players did not agree to continue with bots." (this is a VoteFail, not CallVoteFail)
This was never added, i guess. That's a shame, as i would love to see that.
Valve, plz fix.



It would be nice, if something like the enum would be added to source mod or smlib maybe.
Unfortunately they are not equal in all games.
RootCore is offline
Powerlord
AlliedModders Donor
Join Date: Jun 2008
Location: Seduce Me!
Old 09-09-2015 , 10:43   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #8

I don't think there's enough demand to add it to SourceMod itself and SMLIB hasn't been updated for years.

Here's a stock for it, you just have to know which reason number to pass it (which could be put into a pair of enums... one for TF2 and one for CS:GO).

PHP Code:
stock CallVoteFailed(clientreasontime)
{
    new 
Handle:message StartMessageOne("CallVoteFailed"clientUSERMSG_RELIABLE);
    if (
GetUserMessageType() == UM_Protobuf)
    {
        
PbSetInt(message"reason"reason);
        
PbSetInt(message"time"time);
    }
    else
    {
        
BfWriteByte(messagereason);
        
BfWriteShort(messagetime);
    }
    
EndMessage();

(Note: This is in the older SM syntax for compat reasons)
(Note 2: This was backported from the SM 1.7 syntax version of the NativeVotes plugin)
__________________
Not currently working on SourceMod plugin development.

Last edited by Powerlord; 09-09-2015 at 10:46.
Powerlord is offline
RootCore
Junior Member
Join Date: Feb 2014
Location: Germany
Old 09-09-2015 , 11:21   Re: CallVoteFailed - UserMessage: List of "reason"s
Reply With Quote #9

I actually know how to do this. I have done a plugin that suites my needs.

The thread was just to provide some info, just in case someone searches for the given strings to the given ids.
It's just quick lookup, that they don't need to do the research I've already done. ;)
RootCore is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 18:23.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode