Player.AddPlayerOption
From GMod Wiki
| Function | |
| Syntax | Player:AddPlayerOption( String title, Number timeout, Function callback, Function optionsDraw ) |
| Description: | |
| This function sets up the voting system for a client. | |
| Returns: | nil |
| In Object: | Player |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=Player.AddPlayerOption]Player.AddPlayerOption [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Additional Notes
- This is how ULX displays active votes.
- The callback function is passed the index of the choice the player voted for.
- The optionsDraw function is called in HUDPaint for drawing any visuals.