#include <core>
#include <console>
#include <string>
#include <admin>
#include <adminlib>
 
#define RESTRICT_RATIO 55
#define ACCESS_CLASS 8192
 
new STRING_VERSION[MAX_DATA_LENGTH] = "2.50.07";
 
public admin_vote_scout(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text,MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Scout* right now", User);
		say(Text);
		return PLUGIN_HANDLED;
}		
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Scout?", "Yes", "No", "HandleScoutVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleScoutVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_scout")==0) {
				centersay("Vote over and Scout Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Scout class allowed!",10,0,187,0);
				exec("cr_scout 0");
			}
		} else {
			if(getvar("cr_scout")==-1) {
				centersay("Vote over and Scout class is allowed! ",10,0,187,239);
				exec("cr_scout 1");
			} else {
				centersay("Vote over and Scout Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_scout")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Scout class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Scout vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_sniper(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1){
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Sniper* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Sniper?", "Yes", "No", "HandleSniperVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleSniperVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_sniper")==0) {
				centersay("Vote over and Sniper Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Sniper class allowed!",10,0,187,0);
				exec("cr_sniper 0");
			}
		} else {
			if(getvar("cr_sniper")==-1) {
				centersay("Vote over and Sniper class is allowed! ",10,0,187,239);
				exec("cr_sniper 1");
			} else {
				centersay("Vote over and Sniper Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_sniper")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Sniper class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Sniper class vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_soldier(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Soldier* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Soldier?", "Yes", "No", "HandleSoldierVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleSoldierVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_soldier")==0) {
				centersay("Vote over and Soldier Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Soldier class allowed!",10,0,187,0);
				exec("cr_soldier 0");
			}
		} else {
			if(getvar("cr_soldier")==-1) {
				centersay("Vote over and Soldier class is allowed! ",10,0,187,239);
				exec("cr_soldier 1");
			} else {
				centersay("Vote over and Soldier Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_soldier")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Soldier class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Soldier vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_demoman(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Demoman* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Demoman?", "Yes", "No", "HandleDemoVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleDemoVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_demoman")==0) {
				centersay("Vote over and Demoman Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Demoman class allowed!",10,0,187,0);
				exec("cr_demoman 0");
			}
		} else {
			if(getvar("cr_demoman")==-1) {
				centersay("Vote over and Demoman class is allowed! ",10,0,187,239);
				exec("cr_demoman 1");
			} else {
				centersay("Vote over and Demoman Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_demoman")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Demoman class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Demoman vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_medic(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Medic* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Medic?", "Yes", "No", "HandleMedicVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleMedicVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_medic")==0) {
				centersay("Vote over and Medic Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Medic class allowed!",10,0,187,0);
				exec("cr_medic 0");
			}
		} else {
			if(getvar("cr_medic")==-1) {
				centersay("Vote over and Medic class is allowed! ",10,0,187,239);
				exec("cr_medic 1");
			} else {
				centersay("Vote over and Medic Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_medic")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Medic class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Medic vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_hwguy(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *HWGuy* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class HWGuy?", "Yes", "No", "HandleHWVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleHWVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_hwguy")==0) {
				centersay("Vote over and HWGuy Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded HWGuy class allowed!",10,0,187,0);
				exec("cr_hwguy 0");
			}
		} else {
			if(getvar("cr_hwguy")==-1) {
				centersay("Vote over and HWGuy class is allowed! ",10,0,187,239);
				exec("cr_hwguy 1");
			} else {
				centersay("Vote over and HWGuy Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_hwguy")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "HWGuy class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "HWGuy vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_pyro(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Pyro* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Pyro?", "Yes", "No", "HandlePyroVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandlePyroVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_pyro")==0) {
				centersay("Vote over and Pyro Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Pyro class allowed!",10,0,187,0);
				exec("cr_pyro 0");
			}
		} else {
			if(getvar("cr_pyro")==-1) {
				centersay("Vote over and Pyro class is allowed! ",10,0,187,239);
				exec("cr_pyro 1");
			} else {
				centersay("Vote over and Pyro Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_pyro")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Pyro class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Pyro vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_engineer(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Engineer* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Engineer?", "Yes", "No", "HandleEngineerVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleEngineerVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_engineer")==0) {
				centersay("Vote over and Engineer Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Engineer class allowed!",10,0,187,0);
				exec("cr_engineer 0");
			}
		} else {
			if(getvar("cr_engineer")==-1) {
				centersay("Vote over and Engineer class is allowed! ",10,0,187,239);
				exec("cr_engineer 1");
			} else {
				centersay("Vote over and Engineer Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_engineer")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Engineer class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Engineer vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_vote_spy(HLCommand,HLData,HLUser,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
	new Text[MAX_TEXT_LENGTH];
	new strDummy[10];
 
	if (vote_allowed()!=1) {
		snprintf(Text, MAX_TEXT_LENGTH, "Sorry %s but you cannot open a vote to restrict class *Spy* at the time.", User);
		say(Text);
		return PLUGIN_HANDLED;
	}
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUser,User,MAX_NAME_LENGTH);
 
	vote("Disable Class Spy?", "Yes", "No", "HandleSpyVote",strDummy);
	return PLUGIN_HANDLED;
}
 
public HandleSpyVote(WinningOption,HLData,VoteCount,UserCount) {
	new Text[MAX_TEXT_LENGTH];
	new strNumber[MAX_NUMBER_LENGTH];
	new Ratio = RESTRICT_RATIO;
	new strData[MAX_DATA_LENGTH];
	convert_string(HLData, strData,MAX_DATA_LENGTH);
 
	if (VoteCount >= Ratio*UserCount/100) {	
		if (WinningOption==1) {
			if(getvar("cr_spy")==0) {
				centersay("Vote over and Spy Class still allowed!",10,220,0,1);
			} else {
				centersay("Vote succeded Spy class allowed!",10,0,187,0);
				exec("cr_spy 0");
			}
		} else {
			if(getvar("cr_spy")==-1) {
				centersay("Vote over and Spy class is allowed! ",10,0,187,239);
				exec("cr_spy 1");
			} else {
				centersay("Vote over and Spy Class still allowed!",10,25,2,0);
			}
		}
	} else {
		numtostr(Ratio*UserCount/100,strNumber);
		if(getvar("cr_spy")==-1) {
			snprintf(Text, MAX_TEXT_LENGTH, "Spy class vote succceded but not enough for change (needed %s).", strNumber);
		} else {
			snprintf(Text, MAX_TEXT_LENGTH, "Spy vote succeded but not enough for change (needed %s)", strNumber);
		}
		say(Text);
	}
}
 
public admin_scout(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_scout",Data);
	return PLUGIN_HANDLED;
}
 
public admin_sniper(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_sniper",Data);
	return PLUGIN_HANDLED;
}
 
public admin_soldier(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_soldier",Data);
	return PLUGIN_HANDLED;
}
 
public admin_demoman(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_demoman",Data);
	return PLUGIN_HANDLED;
}
 
public admin_medic(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_medic",Data);
	return PLUGIN_HANDLED;
}
 
public admin_hwguy(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_hwguy",Data);
	return PLUGIN_HANDLED;
}
 
public admin_pyro(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_pyro",Data);
	return PLUGIN_HANDLED;
}
 
public admin_engineer(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_engineer",Data);
	return PLUGIN_HANDLED;
}
 
public admin_spy(HLCommand,HLData,HLUserName,UserIndex) {
	new Command[MAX_COMMAND_LENGTH];
	new Data[MAX_DATA_LENGTH];
	new User[MAX_NAME_LENGTH];
 
	convert_string(HLCommand,Command,MAX_COMMAND_LENGTH);
	convert_string(HLData,Data,MAX_DATA_LENGTH);
	convert_string(HLUserName,User,MAX_NAME_LENGTH);
	execute_command(User,Command,"cr_spy",Data);
	return PLUGIN_HANDLED;
}
 
public plugin_init() {
plugin_registerinfo("Sharp's TFC Class Restrict","Allows you to vote restrict any TFC Class",STRING_VERSION);
 
plugin_registercmd("admin_vote_scout","admin_vote_scout",ACCESS_CLASS,"admin_vote_scout : Opens a vote to restrict class scout");
 
plugin_registercmd("admin_vote_sniper","admin_vote_sniper",ACCESS_CLASS,"admin_vote_sniper : Opens a vote to restrict class sniper");
 
plugin_registercmd("admin_vote_soldier","admin_vote_soldier",ACCESS_CLASS,"admin_vote_soldier : Opens a vote to restrict class soldier");
 
plugin_registercmd("admin_vote_demoman","admin_vote_demoman",ACCESS_CLASS,"admin_vote_demoman : Opens a vote to restrict class demoman");
 
plugin_registercmd("admin_vote_medic","admin_vote_medic",ACCESS_CLASS,"admin_vote_medic : Opens a vote to restrict class medic");
 
plugin_registercmd("admin_vote_hwguy","admin_vote_hwguy",ACCESS_CLASS,"admin_vote_hwguy : Opens a vote to restrict class hwguy");
 
plugin_registercmd("admin_vote_pyro","admin_vote_pyro",ACCESS_CLASS,"admin_vote_pyro : Opens a vote to restrict class pyro");
 
plugin_registercmd("admin_vote_engineer","admin_vote_engineer",ACCESS_CLASS,"admin_vote_engineer : Opens a vote to resirict class engineer");
 
plugin_registercmd("admin_vote_spy","admin_vote_spy",ACCESS_CLASS,"admin_vote_spy : Opens a vote to resirict class spy");
 
plugin_registercmd("admin_scout","admin_scout",ACCESS_CLASS,"admin_scout <1|0> : 1 allows people to be the scout class");
 
plugin_registercmd("admin_sniper","admin_sniper",ACCESS_CLASS,"admin_sniper <1|0> : 1 allows people to be the sniper class");
 
plugin_registercmd("admin_soldier","admin_soldier",ACCESS_CLASS,"admin_soldier <1|0> : 1 allows people to be the soldier class");
 
plugin_registercmd("admin_demoman","admin_demoman",ACCESS_CLASS,"admin_demoman <1|0> : 1 allows people to be the demoman class");
 
plugin_registercmd("admin_medic","admin_medic",ACCESS_CLASS,"admin_medic <1|0> : 1 allows people to be the medic class");
 
plugin_registercmd("admin_hwguy","admin_hwguy",ACCESS_CLASS,"admin_hwguy <1|0> : 1 allows people to be the hwguy class");
 
plugin_registercmd("admin_pyro","admin_pyro",ACCESS_CLASS,"admin_pyro <1|0> : 1 allows people to be the pyro class");
 
plugin_registercmd("admin_engineer","admin_engineer",ACCESS_CLASS,"admin_engineer <1|0> : 1 allows people to be the engineer class");
 
plugin_registercmd("admin_spy","admin_spy",ACCESS_CLASS,"admin_spy <1|0> : 1 allows people to be the spy class");
return PLUGIN_CONTINUE;
}