Player:AddPlayerOption
Player:AddPlayerOption( string name, number timeout, function vote_callback, function draw_callback )
Description
Sets up the voting system for the player. This is a really barebone system. By calling this a vote gets started, when the player presses 0-9 the callback function gets called along with the key the player pressed. Use the draw callback to draw the vote panel.
Arguments
Example
Simple example. Prints player's choice in chat.
Garry's Mod
Rust
Steamworks
Wiki Help