AlliedModders

AlliedModders (https://forums.alliedmods.net/index.php)
-   Unapproved Plugins (https://forums.alliedmods.net/forumdisplay.php?f=109)
-   -   Basic Votes (votemap, votekick, voteban) (https://forums.alliedmods.net/showthread.php?t=56488)

ferret 06-14-2007 15:19

Basic Votes (votemap, votekick, voteban)
 
Basic Votes
Version 1.3

By: ferret!

Description

This plugin adds a range of voting commands. Admins must have the Admin_Vote flag to use. They include kick, ban, and map commands, as well as a custom vote. Please note that an admin does not have to have admin_kick or admin_ban to use these.

Installation
  1. Place the basevotes.smx file inside of the addons/sourcemod/plugins/ folder.
  2. Place the plugins.basevotes.txt file inside of the addons/sourcemod/translations/ folder.
Commands
  • sm_votemap <mapname> [mapname2] ... [mapname5]
    • Issues a vote for map change. Map will change after the map.
    • Single map votes will display as a Yes or No vote.
    • Up to five maps may be specified.
    • See sm_vote_map cvar.
  • sm_votekick <player> [reason]
    • Issues a vote to kick a player. Player is kicked at vote completion.
    • Optional reason will be displayed to the target when kicked.
    • See sm_vote_kick cvar.
  • sm_voteban <player> [reason]
    • Issues a vote to ban a player. Player is banned and kicked afterwards.
    • Ban lasts for 30 minutes.
    • Reason if specified will be shown to user when kicked
    • See sm_vote_ban cvar.
  • sm_vote <question> [Answer1 .. [Answer5]
    • Issues a custom vote.
    • If no answers are specified, they will default to Yes and No.
    • Remember to use quotes around questions or answers with a space in them.
  • sm_votecancel
    • Cancels any vote currently in progress.
Cvars
  • sm_vote_master
    • Overrides all other sm_vote cvars for controlling the percentage of votes needed, when set to non-zero.
    • Default is 0.0.
    • Ranges from 0.0 (0%) to 1.0 (100%)
  • sm_vote_map
    • Percentage of votes needed to change the map for single map votes.
    • Default is 0.60 (60%)
    • Ranges from 0.05 (5%) to 1.0 (100%)
  • sm_vote_kick
    • Percentage of votes needed to kick a player
    • Default is 0.60 (60%)
    • Ranges from 0.05 (5%) to 1.0 (100%)
  • sm_vote_ban
    • Percentage of votes needed to ban a player.
    • Default is 0.60 (60%)
    • Ranges from 0.05 (5%) to 1.0 (100%)
  • sm_vote_show
    • Controls whether or not player's choices are broadcast to everyone.
    • Default is 1. Set to 0 to turn off.
Changelog
  • Version 1.3
    • Abandoned hungarian notation
    • New cvar: sm_vote_say. Default is off. Allows players to use votekick and voteban by saying them. "say votekick player". Personally, I would NOT use it. But it was requested, so there you go. Don't get yourself banned!
    • New cvar: sm_vote_master: Default is 0.0. If you set this, all other vote percentage Cvars will be ignored, and this will be used instead.
    • Fixed Kick Failed message, displayed sm_vote_map instead of sm_vote_kick
    • Fixed Ban Failed message, displayed sm_vote_map instead of sm_vote_ban
    • Fixed failed votes showing reversed percentages
    • Added natives necessary for ExtendedVotes to hook in.
  • Version 1.2 (June 29th)
    • Conform to plugin submission standards
    • Add version cvar sm_basevotes_version
  • Version 1.1 (June 28th)
    • Several fixes due to bad "Replace All"
  • June 18th
    • German Translations by Fisch.666
  • June 17th Part 2
    • French Translations by magicyan (Redownload plugin.basevotes.cfg)
  • June 17th
    • Requires SourceMod build R981 or higher
    • Took out timers that force cancel of menus, fixed in R981
    • Added a "no votes received" message if no one voted.
    • Took out vote counter variables, added to MenuAPI in R965
  • June 16th
    • Fixed vote failure percents being 61%
    • using a time to force votes to end in 20 seconds until MENU Api is fixed.
    • Other little tweaks (Make sure to get the translation file)
    • Changed ALL commands to ADM_VOTE access.
Bugs, Requests, Translations, or Other Issues

Please use my project area on the Allied Modders Bug Tracker to report any issues or make requests. Your login for the bug tracker is the same as your forum login. Set the category to this plugin's name.

FlyingMongoose 06-14-2007 15:36

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
I have to say good work so far :)

Hell Phoenix 06-14-2007 15:50

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Very nice. Glad to see people helping get sourcemod out the door =D

krod 06-14-2007 18:16

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Thanks for your hard work!

Fisch.666 06-14-2007 19:07

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
1 Attachment(s)
Hi!

First thanks for this plugin!! But when i try to add this plugin to my Hidden: Source linux server with the latest sourcemod, the server crashs with an Segmentation fault:

Quote:

L 06/15/2007 - 01:00:24: [SM] Warning(s) encountered in translation file "plugin.basevotes.cfg"
L 06/15/2007 - 01:00:24: [SM] Too many digits in format index on line %d, phrase will be ignored.
./srcds_run: line 344: 21217 Segmentation fault $HL_CMD
Add "-debug" to the ./srcds_run command line to generate a debug.log to help with solving this problem
After i've added the -debug line to my script, there is only a core.21272 file (which you can find attached to this post). No debug.log is created...

BAILOPAN 06-14-2007 20:24

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Fisch: what revision did this crash with?

Fisch.666 06-14-2007 20:42

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Hi!

First thanks for your reply.

My server is running the sourcemod rev. 937 with the metamod version 1.4.1.400.

Or do you mean the revision of this plugin?

ferret 06-14-2007 20:44

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Confirmed on my newly updated CSS server! Latest "simple package" download and metamod. I have not idea which line in the file is at fault though due to the debug message printing %d instead of line number.

BAILOPAN 06-14-2007 21:59

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
This bug has been fixed in r939. Thanks!

ferret 06-14-2007 22:34

Re: [PLUGIN] basevotes (votemap, votekick, voteban)
 
Tested with R939, no more segfault, whee


All times are GMT -4. The time now is 03:42.

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