Hooks/Server/canVote

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

Parameters

  1. ply (Player)
  2. The player.

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

Return values

  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.