Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sourcemod>
- #include <ccsplayer>
- #include <sdktools>
- #include <sdkhooks>
- #pragma semicolon 1
- #pragma newdecls required
- #define DEBUG
- #define PLUGIN_AUTHOR ""
- #define PLUGIN_VERSION "0.00"
- enum TenManSpecialStatus{
- DISABLED = 0,
- CT_ONLY,
- T_ONLY,
- ENABLED
- };
- public Plugin myinfo =
- {
- name = "",
- author = PLUGIN_AUTHOR,
- description = "",
- version = PLUGIN_VERSION,
- url = ""
- };
- ConVar ExoBootsToggle;
- ConVar BumpMineToggle;
- ConVar ShieldToggle;
- ConVar BreachChargeToggle;
- ConVar MediShotToggle;
- ConVar MediShotNum;
- public void OnPluginStart()
- {
- RegConsoleCmd("sm_wp", Command_WP);
- HookEvent("round_start", Event_RoundStart);
- HookEvent("round_end", Event_RoundEnd);
- ExoBootsToggle = CreateConVar("sm_10man_toggle_exoboots", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
- BumpMineToggle = CreateConVar("sm_10man_toggle_bumpmine", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
- ShieldToggle = CreateConVar("sm_10man_toggle_shield", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
- BreachChargeToggle = CreateConVar("sm_10man_toggle_breachcharge", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
- MediShotToggle = CreateConVar("sm_10man_toggle_medishot", "0", "0 = Disabled, 1 = CT, 2 = T, 3 = Both", _, true, 0.0, true, 3.0);
- MediShotNum = CreateConVar("sm_10man_num_medishot", "1", "Amount of MediShots", _, true, 0.0, true, 5.0);
- AutoExecConfig(true, "plugin.fancytenman");
- }
- public Action Command_bumpy(int client, int args){
- PrintToChatAll("bumpy bumpy");
- }
- public void Event_RoundStart(Event event, const char[] name, bool dontbroadcast){
- if(BumpMineToggle.IntValue == view_as<int>(CT_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_CT){
- GivePlayerWeapon(p, "weapon_bumpmine");
- }
- }
- }
- }
- else if(BumpMineToggle.IntValue == view_as<int>(T_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_T){
- GivePlayerWeapon(p, "weapon_bumpmine");
- }
- }
- }
- }
- else if(BumpMineToggle.IntValue == view_as<int>(ENABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- GivePlayerWeapon(p, "weapon_bumpmine");
- }
- }
- }
- if(ShieldToggle.IntValue == view_as<int>(DISABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- }
- }
- else if(ShieldToggle.IntValue == view_as<int>(CT_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_CT){
- GivePlayerWeapon(p, "weapon_shield");
- }
- }
- }
- }
- else if(ShieldToggle.IntValue == view_as<int>(T_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.Team == CS_TEAM_T){
- if(p.InGame && p.Alive){
- GivePlayerWeapon(p, "weapon_shield");
- }
- }
- }
- }
- else if(ShieldToggle.IntValue == view_as<int>(ENABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- GivePlayerWeapon(p, "weapon_shield");
- }
- }
- }
- if(BreachChargeToggle.IntValue == view_as<int>(DISABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- }
- }
- }
- else if(BreachChargeToggle.IntValue == view_as<int>(CT_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_CT){
- GivePlayerWeapon(p, "weapon_breachcharge");
- }
- }
- }
- }
- else if(BreachChargeToggle.IntValue == view_as<int>(T_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_T){
- GivePlayerWeapon(p, "weapon_breachcharge");
- }
- }
- }
- }
- else if(BreachChargeToggle.IntValue == view_as<int>(ENABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- GivePlayerWeapon(p, "weapon_breachcharge");
- }
- }
- }
- if(MediShotToggle.IntValue == view_as<int>(DISABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- }
- }
- else if(MediShotToggle.IntValue == view_as<int>(CT_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_CT){
- for(int num = 1; num <= MediShotNum.IntValue; num++){
- GivePlayerWeapon(p, "weapon_healthshot");
- }
- }
- }
- }
- }
- else if(MediShotToggle.IntValue == view_as<int>(T_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_T){
- for(int num = 1; num <= MediShotNum.IntValue; num++){
- GivePlayerWeapon(p, "weapon_healthshot");
- }
- }
- }
- }
- }
- else if(MediShotToggle.IntValue == view_as<int>(ENABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- for(int num = 1; num <= MediShotNum.IntValue; num++){
- GivePlayerWeapon(p, "weapon_healthshot");
- }
- }
- }
- }
- PrintToChatAll("MediShot Check");
- if(ExoBootsToggle.IntValue == view_as<int>(DISABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
- }
- }
- }
- else if(ExoBootsToggle.IntValue == view_as<int>(CT_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_CT){
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
- }
- else{
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
- }
- }
- }
- }
- else if(ExoBootsToggle.IntValue == view_as<int>(T_ONLY)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- if(p.Team == CS_TEAM_T){
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
- }
- else{
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 0, 1, 1);
- }
- }
- }
- }
- else if(ExoBootsToggle.IntValue == view_as<int>(ENABLED)){
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- SetEntProp(p.Index, Prop_Send, "m_passiveItems", 1, 1, 1);
- }
- }
- }
- PrintToChatAll("ExoBoots Check");
- }
- public void Event_RoundEnd(Event event, const char[] name, bool dontBroadcast){
- /*
- CCSPlayer p;
- while(CCSPlayer.Next(p)){
- if(p.InGame && p.Alive){
- CWeapon wep = p.GetWeapon(CS_SLOT_C4);
- char weaponClassName[32];
- wep.GetClassname(weaponClassName, sizeof(weaponClassName));
- PrintToChatAll(weaponClassName);
- if(StrEqual(weaponClassName, "weapon_bumpmine")||StrEqual(weaponClassName, "weapon_breachcharge")){
- p.RemoveItem(wep);
- wep.Kill();
- }
- }
- }
- */
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement