Hooks/Server/canStartVote

From Official DarkRP Wiki
Jump to: navigation, search
Hook
Hook name canStartVote(table vote)
Description:
Whether the vote can be started or not.
Returns: boolean canStartVote, boolean callSuccess, string message
Realm: NewerServer.png
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canStartVote]canStartVote hook[/url][/b]

Parameters

  1. vote (table)
  2. A table that contains information about the vote.

Return values

  1. canStartVote (boolean)
  2. Whether the vote can be started or not.

  3. callSuccess (boolean)
  4. True if the callback for a successful vote should be called, false if the callback for a failed vote should be called. Only works when canStartVote is false.

  5. message (string)
  6. The message to show when the vote cannot be started. Only works when callSuccess is false.