Raised This Month: $ Target: $400
 0% 

Custom Vote Menus


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Plugin Info:     Modification:   ALL        Category:   Admin Commands        Approver:   Hawk552 (427)
GHW_Chronic
SourceMod Donor
Join Date: Sep 2004
Location: Texas
Old 09-02-2007 , 17:58   Custom Vote Menus
Reply With Quote #1

  • This plugin allows you to create a custom vote with any format you want. Includes the ability to set colors of words / letters and justify options. And then depending on what option won, the plugin will execute whatever you want on the admin/server's console (depending on cvar).

  • Example Syntax:
    • Code:
      [Menu]
      Choose A Mod:
      
      1. Halo Mod
      2. CSDM
      3. CTF
      4. Fun Mod
      5. Normal Gameplay
      
      0. Don't Care
      [/Menu]
      
      
      
      
      [1]
      amx_halomod on
      amx_csdm disable
      amx_ctf 0
      amx_funmod off
      [/1]
      
      [2]
      amx_halomod off
      amx_csdm enable
      amx_ctf 0
      amx_funmod off
      [/2]
      
      [3]
      amx_halomod off
      amx_csdm disable
      amx_ctf 1
      amx_funmod off
      [/3]
      
      [4]amx_halomod off
      amx_csdm disable
      amx_ctf 0
      amx_funmod on
      [/4]
      
      [5]
      amx_halomod off
      amx_csdm disable
      amx_ctf 0
      amx_funmod off
      [/5]
      
      [0]
      say Why doesn't anybody care :'(
      [/0]
    • The above example would print out the menu that is at the top of the config file (inbetween the [Menu] [ /Menu] ) and show it exactly as it looks. (white text). Then pretending option #5 won (the majority of people voted for it) then the stuff listed between the [5] [ /5] would be executed on admin/server console (again, depending on the cvar setting).

  • Color and Justification symbols:
    • \r - will make anything after it red
    • \y - will make anything after it yellow
    • \w - will make anything after it white
    • \R - will justify to the right

  • Example Menu with Color + Justification:
    • Code:
      [Menu]
      Choose A Mod:
      
      \y1. \wHalo Mod
      \y2. \wCSDM
      \y3. \wCTF
      \y4. \wFun Mod
      \y5. \wNormal Gameplay\R\rBoring
      
      \y0. \wDon't Care
      [/Menu]
    • The above will look like this:
    • Choose A Mod:

      1. Halo Mod
      2. CSDM
      3. CTF
      4. Fun Mod
      5. Normal Gameplay________Boring

      0. Don't Care
    • Please note that some mods don't support menu color. (CS/CZ do, TFC doesn't)

  • Commands:
    • amx_cvote <vote name>
    • amx_cvote_list - Lists all custom votes in the votes directory.

  • CVARs:
    • cvote_show - Show what a player voted for (1=show 0=don't show) (Default: 1)
    • cvote_execute - Execute winning console command(s) where? (1=admin's console 2=server's console)

  • Config Files:
    • Name.ini - Name is the name of the vote menu that will be used with the commands.
    • configs/votes - Place all vote menu config files into there (votes directory has to be created).
    • Only 1 vote menu per config file.
    • [Menu] and [#] can be in any order you want.
    • Even if an option doesn't execute anything you must have the [#][ /#] (on seperate lines)
Attached Files
File Type: sma Get Plugin or Get Source (GHW_Custom_Vote_Menus.sma - 3546 views - 5.6 KB)

Last edited by GHW_Chronic; 10-24-2007 at 10:21.
GHW_Chronic is offline
Send a message via AIM to GHW_Chronic
 



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 07:52.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode