'results[MAXPLAYERS+1]' stores the clients vote decisions by this enum (located in customvotes.inc):
Code:
/**
* Client's custom vote decisions.
*/
enum
{
VOTE_DECISION_NONE = -1,
VOTE_DECISION_YES,
VOTE_DECISION_NO
}
So for example, if you want to know what each player voted for it'd be like this:
Code:
public void Handler_CustomVotePassed(int results[MAXPLAYERS + 1])
{
for (int current_client = 1; current_client <= MaxClients; current_client++)
{
// If the current client isn't in game, results[current_client] will always be 'VOTE_DECISION_NONE'.
if (IsClientInGame(current_client))
{
switch (results[current_client])
{
// Didn't vote at all.
case VOTE_DECISION_NONE:
{
}
// Voted positively.
case VOTE_DECISION_YES:
{
}
// Voted negatively.
case VOTE_DECISION_NO:
{
}
}
}
}
}
__________________