Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Voting Plugin
#1
Hi, would it be possible to have a custom vote plugin? An Admin could type a command such as !castvote Do you think im hot? Wink...and then it could give players the f1 and f2 option and say if the vote passes or not? or even better, give a percentage in chat? This would be useful if we are voting on what the next map should be or if we should change the gravity or speed on my server.

Also, it would be useful to have a command that can cancel the current vote that is pending. Such as !cancelvote, and whatever vote is being cast will be cancelled. Such as if a zombie votes to restart the map or if someone votes to kick another person, because we get a lot of vote spammers on my server.
Reply

#2
we can't press any buttons, however it should be possible with stuff like !voteyes !voteno
Reply

#3
It is possible. @Nukem get in here. Probably easiest to just put it in the addon
With F1/F2 support
Reply

#4
Sweet, somebody should make this then. It would be really useful Tongue
Reply

#5
(03-27-2012, 07:41)JariZ Wrote: we can't press any buttons, however it should be possible with stuff like !voteyes !voteno

(03-27-2012, 10:24)SuperNovaAO Wrote: It is possible. @Nukem get in here. Probably easiest to just put it in the addon
With F1/F2 support

at the moment isn't it possible with some thing like this?!
CSHARP Code
  1. public override void OnPlayerConnect(ServerClient Client)
  2. {
  3. /*SetClientDvar(Client.ClientNum, "unbind f1");
  4.   SetClientDvar(Client.ClientNum, "unbind f2");*/
  5. SetClientDvar(Client.ClientNum, "bind f2 \"say f2hasbeenpressed\"");
  6. SetClientDvar(Client.ClientNum, "bind f1 \"say f1hasbeenpressed\"");
  7. base.OnPlayerConnect(Client);
  8. }
  9. public override unsafe ChatType OnSay(string Message, ServerClient Client)
  10. {
  11. string lowMsg = Message.ToLower();
  12.  
  13. if (lowMsg.StartsWith("f2hasbeenpressed"))
  14. {
  15. ServerSay(Client.Name + " has voted NO", false);
  16. }
  17. else if ( lowMsg.StartsWith("f1hasbeenpressed"))
  18. {
  19. ServerSay(Client.Name + " has vote yes", false);
  20. }
  21. return ChatType.ChatContinue;
  22. }

ps: Please correct me if I am wrongSmile
Reply

#6
Bind is a command, not a client dvar.. I don't think it'll work.
[Image: 30xhrep.png]

A casual conversation between barata and I about Nukem.
Reply

#7
This is from config.cfg:

Code:
// generated by Infinity Ward, MODIFY!!!
unbindall
bind TAB "+scores"
bind ESCAPE "togglemenu"
bind SPACE "+gostand"
bind 1 "weapnext"
bind 2 "weapnext"
bind 3 "+actionslot 3"
bind 4 "+actionslot 4"
bind 5 "+actionslot 2"
bind A "+moveleft"
bind C "togglecrouch"
bind D "+moveright"
bind E "+melee_zoom"
bind F "+activate"
bind G "+frag"
bind N "+actionslot 1"
bind Q "+smoke"
bind R "+reload"
bind S "+back"
bind W "+forward"
bind PAUSE "pause"
bind CTRL "toggleprone"
bind SHIFT "+breath_sprint"
bind F5 "skip"
bind MOUSE1 "+attack"
bind MOUSE2 "+toggleads_throw"
bind MOUSE3 "+frag"
seta ai_badPathSpam "0"

If you look at the end (I didnt copy all), there is "seta", so "bind" must be the same so that might work @atenziono
Reply

#8
So is it possible D:?
Reply

#9
@kokole as @master131 said, bind is a command. Seta is also a command but when doing SetClientDvar the client automatically uses seta. It's not possible to use other commands.

Though with pressing F1/F2 it may be possible because the client actually sends a command to the server (vote yes/no).
[Image: azuw.jpg]
Reply

#10
So could someone "attempt" to make this? Big Grin
Reply



Possibly Related Threads…
Thread Author Replies Views Last Post
Wink Plugin with !ban !kick and !tampban clemi555 3 4,169 11-09-2013, 09:21
Last Post: clemi555
  AntiNoScope Plugin clemi555 5 4,748 11-08-2013, 19:13
Last Post: clemi555
  [Release] Bunker Plugin 1.3 archit 68 41,574 10-30-2013, 11:59
Last Post: clacki
  Help Modifying plugin maverigh 5 5,671 10-19-2013, 10:29
Last Post: Nekochan
Shocked [Request] Switch plugin axel-le-meilleur 6 5,179 10-19-2013, 06:59
Last Post: iRoNinja
  [Release] Yurio Map Plugin Yurio 101 62,316 09-26-2013, 13:38
Last Post: First_Semyon
Brick [Release] v1.1 ChangeMap/NextMap Plugin without any configuration milchshake 23 18,650 09-23-2013, 13:18
Last Post: SgtLegend
  Help !say Plugin (like the !say from GodPlugin) Hallla 0 2,712 09-13-2013, 09:31
Last Post: Hallla
Rainbow [Release] MW3: Random Weapon Plugin V1 Nekochan 50 33,292 09-11-2013, 15:11
Last Post: EnVi Sweden Rocks
  Search Plugin Fluid Killcam N3xT_974 1 3,066 09-10-2013, 20:27
Last Post: Nekochan

Forum Jump:


Users browsing this thread:
1 Guest(s)

Forum Powered By MyBB, Theme by © 2002-2024 Melroy van den Berg.