View Single Post
Lucky_luck
AlliedModders Donor
Join Date: May 2011
Location: Germany
Old 02-20-2014 , 17:08   Re: Custom Votes Redux (v1.1 - 2/16/14)
Reply With Quote #30

is this ok?

Code:
// Custom Votes Redux
// By: ReFlexPoison
//
// Thank you for downloading Custom Votes Redux. If you like my work and want to help out send me a donation. https://forums.alliedmods.net/member.php?u=149090
//
// How to edit this file: (Not all values will effect every type of vote. Ex: "currentmap" won't change anything in "players" type votes)
//
// "Custom Votes"										<--	Leave this alone
// {													<--	Add all votes after first bracket (Leave this alone)
// 		"Say something funny!"							<--	This is the name of the vote. This will be shown in the vote menu
// 		{
// 			"type"					"list"				<--	This is the type of vote. Valid types: players, map, list
//															players - Populates the vote with online players
//															map - Populates the vote with a list of maps from a specific map list
//															list - Populates the vote with a custom list of choices
//
//			"options"									<-- These are your list options
//			{
//				"lol		"LOL"						<-- Option name: lol | Option result: LOL
//				"rofl"		"ROFL"						<-- Option name: rofl | Option result: ROFL
//			}
//
//			"override"				"sm_lol"			<--	This is the admin override of the vote. Use this with admin_overrides.cfg to prohibit access to this vote from specific players
//			"immunity"				"0"					<--	This determines what admins are removed from the vote. If an admin's immunity level is higher or equal to this, they are can not be selected upon
//
//			"delay"					"60"				<-- This is the delay in seconds before players can call a vote after the map has changed
//			"team"					"0"					<-- This determines if a players vote can only be voted upon by a member of the same team
//			"bots"					"0"					<-- This determines if bots are included in the players vote
//			"ratio"					"0.6"				<-- This is the ratio of players required to call a vote for the vote to pass
//			"multiple"				"0"					<-- This determines if players can choose more than one option for a specific vote
//			"minimum"				"4"					<-- This is the minimum amount of players required to call a vote for the vote to pass (Overrides ratio)
//			"maxcalls"				"3"								<-- This is the maximum amount of times a player can vote for that specific item (0 = No limit)
//			"command"				"sm_csay {OPTION_RESULT}"		<-- This determines what commands will be ran when a vote is passed. (View formatting below)
//
//			"call_notify"			"Voted for {OPTION_NAME}.		<-- This determines what is print to everyone's chat when a vote is called
//			"pass_notify"			"Vote passed!"					<-- This determines what is print to everyone's chat when a vote is passed
//
//			"maplist"				"default"			<-- This determines what maplist to use for map votes (See maplist.cfg)
//			"currentmap"			"0"					<-- This determines if players are allowed to vote for the current map in map votes
//			"recentmaps"			"3"					<-- This determines how many recent maps will be removed from map votes
//
//			"chattrigger"			"vote"				<-- This determines what the chat trigger of the vote will be. Do not include ! or / in the trigger, the plugin will handle the removal of them for non admin players.
//		}												<--	Leave this alone
//	}													<--	Leave this alone
//
// Formatting:
//
// Place these in command, call_notify, pass_notify to your liking
// {VOTE_AMOUNT} - Amount of votes called for that item
// {VOTE_REQUIRED} - Required vote calls for that vote to pass
//
// {VOTER_INDEX} - Voter client index
// {VOTER_ID} - Voter user id
// {VOTER_NAME} - Voter name
//
// {TARGET_INDEX} - Target client index
// {TARGET_ID} - Target user id
// {TARGET_NAME} - Target name
//
// {MAP_NAME} - Map name
// {CURRENT_MAP_NAME} - Current map name
//
// {OPTION_NAME} - Option name
// {OPTION_RESULT} - Option result
//
// Formatting Examples:
//
// "call_notify"	"{olive}[SM] {VOTER_NAME}{default} voted to ban {green}{TARGET_NAME}{default}."
// "command"		"kickid {TARGET_ID};sm_csay Kicked {TARGET_NAME}"
//

"Custom Votes"
{
	"Kick player"
	{
		"type"			"players"
		"command"		"sm_kick {TARGET_ID}"
		"team"			"1"
		"bots"			"1"
		"immunity"		"99"
		"multiple"		"1"
		"minimum"		"4"
		"ratio"			"0.6"
		"call_notify"	"{olive}{VOTER_NAME}{default} voted to kick {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
		"pass_notify"	"{olive}Vote to kick passed. Kicked {olive}{TARGET_NAME}{default}."
		"chattrigger"	"votekick"
	}
	"Ban player"
	{
		"type"			"players"
		"command"		"sm_ban {TARGET_ID} 0"
		"team"			"0"
		"bots"			"0"
		"immunity"		"99"
		"minimum"		"4"
		"ratio"			"0.7"
		"multiple"		"1"
		"call_notify"	"{olive}{VOTER_NAME}{default} voted to ban {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
		"pass_notify"	"{olive}Vote to ban passed. Banned {olive}{TARGET_NAME} Permanently{default}."
		"chattrigger"	"voteban"
	}
	"Mute player"
	{
		"type"			"players"
		"command"		"sm_mute {TARGET_ID}"
		"team"			"0"
		"bots"			"0"
		"immunity"		"99"
		"minimum"		"4"
		"ratio"			"0.5"
		"multiple"		"1"
		"call_notify"	"{olive}{VOTER_NAME}{default} voted to mute {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
		"pass_notify"	"{olive}Vote to mute passed. Mute {olive}{TARGET_NAME}{default}."
		"chattrigger"	"votemute"
	}
	"Silence player"
	{
		"type"			"players"
		"command"		"sm_silence {TARGET_ID}"
		"team"			"0"
		"bots"			"0"
		"immunity"		"99"
		"minimum"		"4"
		"ratio"			"0.5"
		"multiple"		"1"
		"call_notify"	"{olive}{VOTER_NAME}{default} voted to silence {olive}{TARGET_NAME}{default} [{green}{VOTE_AMOUNT}{default}/{green}{VOTE_REQUIRED}{default}]"
		"pass_notify"	"{olive}Vote to silence passed. Silence {olive}{TARGET_NAME}{default}."
		"chattrigger"	"votesilence"
	}
}

Last edited by Lucky_luck; 02-20-2014 at 18:03.
Lucky_luck is offline