Hooks/Server/canVote

From DarkRP
Hook
Hook name canVote(Player ply, table vote)
Description:
Whether a player can cast a vote.
Returns: boolean canVote, string message
Realm:
BBCode Link: [b][url=http://wiki.darkrp.com/index.php?title=Hooks/Server/canVote]canVote hook[/url][/b]

Parameters[edit]

  1. ply (Player)
  2. The player.

  3. vote (table)
  4. Table containing all information about the vote.

Return values[edit]

  1. canVote (boolean)
  2. Whether the player can vote.

  3. message (string)
  4. The message to show when the player cannot vote. Only useful when canVote is false.