google-code-export / p-g-qvm

Automatically exported from code.google.com/p/p-g-qvm
Other
1 stars 0 forks source link

Custom votes controllable by cvar #185

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Attached patch add cvars:

  g_customVote1
  ...
  g_customVote8
  g_customVotePercent

It setting customized votes for the players.

Example, to allow voting unlagged on and off:

g_customVote1 = "unlagged_on,Turn on unlagged,g_unlagged 1"
g_customVote2 = "unlagged_off,Turn off unlagged,g_unlagged 0"

players can then do '/callvote unlagged_on' to start a vote to turn it on.

cvar format is comma seperated as:
"callvote_command,Vote display text,server command to run"

Original issue reported on code.google.com by Rez...@gmail.com on 5 Oct 2008 at 9:55

Attachments:

GoogleCodeExporter commented 9 years ago
Nice, but it would be nice to have a different percent for each custom vote.

Original comment by amanieu on 5 Oct 2008 at 11:02

GoogleCodeExporter commented 9 years ago
this could be better if you made it a command so you cn add as many as you like 
(to a
limit) but looks like a great idea. or even a admin.dat thing like custom admin 
commands.

Original comment by SlackerL...@gmail.com on 6 Oct 2008 at 12:21

GoogleCodeExporter commented 9 years ago
I'm considering adding the votes percent into the cvar format, just add another
command delimited field. Will probably just add it to the end and if it's not 
there
fall back to g_customVotePercent.

BTW, setting g_customVotePercent to 0 disables custom votes.

If it is stored in admin.dat, they would be lost if an older qvm was used even 
once,
plus This was easier to code up :)

Original comment by Rez...@gmail.com on 6 Oct 2008 at 3:33

GoogleCodeExporter commented 9 years ago
Updated patch which allows optional percentage per vote cvar.

It adds an optional fourth comma delimited section to the cvar format, if 
missing the
percent will fall back to g_customVotePercent.

example:
"g_customVote1 = "unlagged_on,Turn on unlagged,g_unlagged 1,75"
.. would require 75 percent.

Original comment by Rez...@gmail.com on 7 Oct 2008 at 8:12

Attachments:

GoogleCodeExporter commented 9 years ago
Sweet, ill apply this soon.

Original comment by Paradox460 on 24 Oct 2008 at 4:37