VoteProxy

Description

API for managing votes. Access via gVoteProxy in lua.

Methods

void StartVote(string prompt, List<string> options, float duration, VoteCompletedCallback callback)

  • Description: Starts a vote displayed to users. Specify a callback to be notified when the vote is ended. After duration amount of seconds has elapsed, the vote is automatically ended.

void Cancel()

  • Description: Cancels an ongoing vote.

int EndVote()

  • Description: Immediately end the current vote. Returns the index with most votes.

bool IsVoteInProgress()


List<int> GetVotes()

  • Description: Gets how many votes each options has received.