// ---------------------------------------------------------------------------
// ClanMod 1.82b1 Config Pack v1.82b1 [18 February, 2004]
// ---------------------------------------------------------------------------
// This file is part of ClanMod (See README for more information).
// Copyright 2002 - 2004 UnitedAdmins (www.unitedadmins.com)
// Project originally created by OLO (http://olo.counter-strike.pl)
// ---------------------------------------------------------------------------
// Please read the manual carefully before altering this file!
// The Manual is located at docs.unitedadmins.com
// ---------------------------------------------------------------------------

cm_log "[CLANMOD] Loading WarMenu League Script (&cm_configpath&/configs/warmenu/cm_warmenu.cfg)"

cm_addcvar "cm_warmenu_version" "1.0.0.0b"

cm_addcvar "cm_war_menu_aktive" "0"
cm_war_menu_aktive 0

//Menu Line
cm_cmd "Load War Menu" "cm_war_menu_on" Was

// Console Commands
cm_remove alias cm_war_menu_on
cm_alias "cm_warmenu_on" "cm_war_menu_on" Wc  			// activate war menu

// Commands To Toggle the WarMenu
alias "cm_war_menu_off_if" "cm_if cm_war_run == 0 than cm_war_menu_off"
alias "cm_war_menu_off" "cm_exec clanmod.cfg"
cm_command "cm_war_menu_on" "cm_exec configs/mods/&cm_mod&/cm_warmenu.cfg"

// WarMenu Cvars 
cm_addcvar "cm_war_system" "1" 		 
cm_addcvar "cm_war_demo" "1" 		 
cm_addcvar "cm_war_snapshot" "1"	 
cm_addcvar "cm_war_hostname" "1"
cm_addcvar "cm_war_statsme_off" "1" 	 
cm_addcvar "cm_war_hostname_msg" "ClanWar ||"
cm_addcvar "cm_war_map_1" ""
cm_addcvar "cm_war_map_2" ""
cm_addcvar "cm_war_map_nr" "0"
cm_addcvar "cm_war_settings" ""
cm_addcvar "cm_war_run" "0"
cm_addcvar "cm_war_ready_run" "0"
cm_addcvar "cm_war_revote_time" "45"	 
cm_addcvar "cm_war_password" "clanmatch"

cm_cvar cm_war_system "0" "1" "2" Sc
cm_cvar cm_war_demo "0" "1" Sc
cm_cvar cm_war_snapshot "0" "1" Sc
cm_cvar cm_war_hostname "0" "1" Sc
cm_cvar cm_war_password "cw" "clanwar" "fw" "war" Sc

cm_remove alias cm_warmap1
cm_remove alias cm_warmap2
cm_remove alias cm_warsettings
cm_remove alias cm_warpw
cm_remove alias cm_warstart
cm_remove alias cm_warstop
cm_remove alias cm_warcancel
cm_remove alias cm_lo3

// Console Commands
cm_alias "cm_warmap1" "cm_war_map_1" W 		 	 // Setup map 1
cm_alias "cm_warmap2" "cm_war_map_2" W  		 // Setup map 2
cm_alias "cm_warsettings" "cm_war_settings" W   	 // Setup war settings [filename]
cm_alias "cm_warpw" "cm_war_password" W 		 // Setup war PW
cm_alias "cm_warstart" "cm_war_on" Wc			 // Start war
cm_alias "cm_warstop" "cm_war_stop_if" Wc  		 // cancel war
cm_alias "cm_warcancel" "cm_war_stop_if" Wc		 // cancel war
cm_alias "cm_lo3" "cm_war_system_yes2" Wc		 // lo3 console [Manual Warstart!!!]

cm_remove alias /warmap1
cm_remove alias /warmap2
cm_remove alias /warsettings
cm_remove alias /warpw
cm_remove alias /warstart
cm_remove alias /warstop
cm_remove alias /warcancel
cm_remove alias /lo3

// Chat Commands
cm_alias "/warmap1" "cm_war_map_1" Wsdc 		 // Setup map 1
cm_alias "/warmap2" "cm_war_map_2" Wsdc  		 // Setup map 2
cm_alias "/warsettings" "cm_war_settings" Wsdc   	 // Setup war settings [filename]
cm_alias "/warpw" "cm_war_password" Wsdc 		 // Setup war PW
cm_alias "/warstart" "cm_war_on" Wsdc			 // Start war
cm_alias "/warstop" "cm_war_stop_if" Wsdc  		 // cancel war
cm_alias "/warcancel" "cm_war_stop_if" Wsdc		 // cancel war
cm_alias "/lo3" "cm_war_system_yes2" Wsdc		 // lo3 [Manual Warstart!!!]

//War Managment
cm_command "cm_war_on" "cm_remove cmd ?x;cm_say @@g WAR started, please stand by!;run_war;cm_password_save;cm_maxrounds_save;cm_nextmap_save;cm_timelimit_save;cm_war_run 1;cm_loadconfig_change;cm_war_map_nr 5;cm_task 3 'changelevel &cm_war_map_1&' rsun"

alias "cm_war_stop_if" "cm_if cm_war_run == 1 than cm_war_stop"
alias "cm_war_stop" "cm_war_0;cm_war_map_nr 0;cm_war_demo_stop;cm_nextmap_return;cm_remove task ?j;cm_say @@r The War is canceled"

//System Task
cm_task 1 "cm_war_status" asnf "system check"
alias "cm_war_status" "cm_if cm_war_map_nr >> 0 than cm_war_status_on"

//Auto detect War-round and load roundspecific settings
alias "cm_war_status_on" "cm_cvarcalc cm_war_map_nr - 1;cm_if cm_war_map_nr == 4 than cm_war_4 else cm_if cm_war_map_nr == 3 than cm_war_3 else cm_if cm_war_map_nr == 2 than cm_war_2 else cm_if cm_war_map_nr == 1 than cm_war_1 else cm_if cm_war_map_nr == 0 than cm_war_0"
cm_command "cm_war_4" "cm_statsme_change_if;cm_war_hostname_if;cm_load_message;cm_war_set_password;cm_nextmap &cm_war_map_1&;mp_maxrounds 0"
cm_command "cm_war_3" "cm_statsme_change_if;cm_war_hostname_if;cm_load_message;cm_war_set_password;cm_nextmap &cm_war_map_2&;mp_maxrounds 0"
cm_command "cm_war_2" "cm_statsme_change_if;cm_war_hostname_if;cm_load_message;cm_war_set_password;cm_nextmap &cm_war_map_2&;mp_maxrounds 0"
cm_command "cm_war_1" "cm_statsme_change_if;cm_war_hostname_if;cm_load_message;cm_war_set_password;cm_nextmap_return;mp_maxrounds 0"
alias "cm_war_0" "cm_war_hostname_return;run_public;cm_war_demo_end;cm_loadconfig_return;cm_war_run 0;cm_war_ready_run 0;cm_war_menu_off"

cm_command "cm_war_set_password" "sv_password '&cm_war_password&'"

alias "cm_war_hostname_if" "cm_if cm_war_hostname == 1 than cm_war_hostname_on"
cm_command "cm_war_hostname_on" "cm_war_hostname_change;hostname '&cm_war_hostname_temp_save&'"

alias "cm_statsme_change_if" "cm_if cm_war_statsme_off == 1 than cm_statsme_change"

//War System Select
cm_command "cm_load_message" "cm_war_ready_run 0;cm_if cm_war_system == 0 than cm_load_message0 else cm_if cm_war_system == 1 than cm_load_message1 else cm_if cm_war_system == 2 than cm_load_message2" 
cm_command "cm_load_message0" "cm_task 30 'cm_say @@g Settings loaded and fight in 90 seconds' snruj;cm_task 60 'cm_say @@g Settings loaded and fight in 60 seconds' snruj; cm_task 90 'cm_say @@g Settings loaded and fight in 30 seconds' snruj; cm_task 105 'cm_say @@g Settings loaded and fight in 15 seconds' snruj; cm_task 120 'cm_war_load_settings;cm_war_snapshot_if;cm_war_demo_if' snruj"
cm_command "cm_load_message1" "cm_task 30 'cm_say @@g Ready for fight in 90 seconds' snruj;cm_task 60 'cm_say @@g Ready for fight in 60 seconds' snruj; cm_task 90 'cm_say @@g Ready for fight in 30 seconds' snruj; cm_task 105 'cm_say @@g Ready for fight in 15 seconds' snruj; cm_task 120 'cm_war_system_ready' snruj"
cm_command "cm_load_message2" "cm_task 20 'cm_say @@g say /start for start the war' spnuj"

//War System 1 Start Vote
cm_command "cm_war_system_ready" "cm_war_voteratio_change;cm_war_system_sound;cm_vote 'Are You ready?' 'yes' 'cm_war_system_yes' 'no' 'cm_war_system_no';cm_war_voteratio_return"
alias "cm_war_system_yes" "cm_war_snapshot_if;cm_war_demo_if;cm_war_load_settings"
cm_command "cm_war_system_no" "cm_task '&cm_war_revote_time&' 'cm_war_system_ready' snruj;cm_say @@r Sorry not all peoples are ready!;cm_say @@r New war start in &cm_war_revote_time& sec."
cm_command "cm_war_system_sound" "cm_msgpos_change;cm_clexec * 'play vox/question';cm_msgpos_return"

//Demo system
alias "cm_war_demo_if" "cm_if cm_war_demo == 1 than cm_war_demo_on"
cm_command "cm_war_demo_on" "cm_msgpos_change;cm_clexec * 'stop;wait:wait;wait:wait;wait:wait;record &cm_mod&_&cm_currentmap&_&cm_war_map_nr&';cm_msgpos_return;cm_task 1 'cm_war_demo_stop' bsnruj"
cm_command "cm_war_demo_stop" "cm_msgpos_change;cm_clexec * 'wait:wait;wait:wait;wait:wait;stop';cm_msgpos_return"

cm_command "cm_war_demo_end" "cm_task 60 'cm_war_demo_stop' snruj"

//End-Score Snapshot System
alias "cm_war_snapshot_if" "cm_if cm_war_snapshot == 1 than cm_war_snapshot_task"
cm_command "cm_war_snapshot_task" "cm_task 1 'cm_war_snapshot_on' bsnruj"
cm_command "cm_war_snapshot_on" "cm_msgpos_change;cm_clexec * '+showscores;wait;wait;wait;wait;wait;wait;snapshot';cm_msgpos_return"

//Settings Load System
cm_command "cm_war_load_settings" "cm_exec configs/leagues/&cm_war_settings&;cm_war_tl_settings;cm_task 3 'cm_war_system_lo3' rsun"
cm_command "cm_war_load_settings2" "cm_exec configs/leagues/&cm_war_settings&;cm_war_tl_settings"

alias "cm_war_tl_settings" "cm_if mp_timelimit == 0 than mp_timelimit 120"

//Restart War System [Restart Round]
cm_remove alias /unready
cm_remove alias /restart
cm_alias "/unready" "cm_vote_war_unready_if" sdac
cm_alias "/restart" "cm_vote_war_unready_if" sdac

alias "cm_vote_war_unready_if" "cm_if cm_war_run == 1 than cm_vote_war_unready_if2 else cm_say @@@@ Sorry, no war is running!"
alias "cm_vote_war_unready_if2" "cm_if cm_war_ready_run == 1 than cm_vote_war_unready else cm_say @@@@ Sorry, war is not started!"
cm_command "cm_vote_war_unready" "cm_war_voteratio_change;cm_war_system_sound;cm_vote 'Are want to restart the map?' 'yes' 'cm_war_system_re_yes' 'no' 'cm_war_system_re_no';cm_war_voteratio_return"
alias "cm_war_system_re_yes" "cm_say @@g Map is restarting, ready for fight!;cm_war_system_lo3"
alias "cm_war_system_re_no" "cm_say @@r Sorry the other guys dont want it!"

//LO3
cm_command "cm_war_system_lo3" "cm_war_system_&cm_mod&"
cm_command "cm_war_system_cstrike" "cm_say @@g Three Round Restarts than We Are Playing!;sv_restartround 5;cm_task '7' 'sv_restartround 1' snr;cm_task '10' 'sv_restartround 1' snr;cm_task '13' 'cm_say @@r Fight is ON, may the best team win!;cm_say @y GAME ON;cm_say @@@ Server Password: &sv_password&' snr"
cm_command "cm_war_system_dod" "cm_clan_match_change_if;cm_say @@g One Restarts than We Are Playing!;mp_clan_restartround 1;cm_task '21' 'cm_say @@r Fight is ON, may the best team win!;cm_say @y GAME ON;cm_say @@@ Server Password: &sv_password&' snr;cm_clan_match_return"
cm_command "cm_war_system_ns" "cm_say @@g Three Round Restarts than We Are Playing!;sv_restartround 5;cm_task '7' 'sv_restartround 1' snr;cm_task '10' 'sv_restartround 1' snr;cm_task '13' 'cm_say @@r Fight is ON, may the best team win!;cm_say @y GAME ON;cm_say @@@ Server Password: &sv_password&' snr"

alias "cm_clan_match_change_if" "cm_if cm_mod == dod than cm_clan_match_change"

//War System 2 [Say Commands to Start War]

cm_remove alias /start
cm_alias "/start" "cm_vote_war_ready_if" sdac
alias "cm_vote_war_ready_if" "cm_if cm_war_run == 1 than cm_vote_war_ready_if1 else cm_say @@@@ Sorry, no war is running!"
alias "cm_vote_war_ready_if1" "cm_if cm_war_ready_run == 0 than cm_vote_war_ready_if2 else cm_say @@@@ Sorry, war is allready running!"
alias "cm_vote_war_ready_if2" "cm_if cm_war_system == 2 than cm_war_system_ready2 else cm_say @@@@ Sorry, feature is disable!"

cm_command "cm_war_system_ready2" "cm_war_voteratio_change;cm_war_system_sound;cm_vote 'Are You ready?' 'yes' 'cm_war_system_yes2' 'no' 'cm_war_system_no2';cm_war_voteratio_return"
alias "cm_war_system_yes2" "cm_remove task ?j;cm_war_snapshot_if;cm_war_demo_if;cm_war_load_settings"
alias "cm_war_system_no2" "cm_say @@r Sorry not all peoples are ready!"

//Load Settings Without WarMenu
alias "no_warmenu" "cm_if cm_war_menu_aktive << 1 than no_warmenu_start"
cm_command "no_warmenu_start" "cm_password_save;sv_password '&cm_war_password&';run_war;cm_exec configs/leagues/&cm_war_settings&"

//Save System For War Management

cm_addcvar "cm_msgpos_temp" ""
cm_addcvar "cm_msgpos_temp_on" "0"
cm_command "cm_msgpos_change" "cm_if cm_msgpos_temp_on == 0 than cm_msgpos_temp &cm_msgpos&;cm_if cm_msgpos_temp_on == 0 than cm_msgpos 0;cm_if cm_msgpos_temp_on == 0 than cm_msgpos_temp_on 1"
cm_command "cm_msgpos_return" "cm_if cm_msgpos_temp_on == 1 than cm_msgpos &cm_msgpos_temp&;cm_if cm_msgpos_temp_on == 1 than cm_msgpos_temp_on 0"

cm_addcvar "cm_war_voteratio_temp" ""
cm_addcvar "cm_war_voteratio_temp_on" "0"
cm_command "cm_war_voteratio_change" "cm_if cm_war_voteratio_temp_on == 0 than cm_war_voteratio_temp '&cm_voteratio&';cm_if cm_war_voteratio_temp_on == 0 than cm_voteratio '0.99';cm_if cm_war_voteratio_temp_on == 0 than cm_war_voteratio_temp_on 1"
cm_command "cm_war_voteratio_return" "cm_if cm_war_voteratio_temp_on == 1 than cm_voteratio '&cm_war_voteratio_temp&';cm_if cm_war_voteratio_temp_on == 1 than cm_war_voteratio_temp_on 0"

cm_addcvar "cm_loadconfig_temp" ""
cm_addcvar "cm_loadconfig_temp_on" "0"
cm_command "cm_loadconfig_change" "cm_if cm_loadconfig_temp_on == 0 than cm_loadconfig_temp &cm_loadconfig&;cm_if cm_loadconfig_temp_on == 0 than cm_loadconfig 0;cm_if cm_loadconfig_temp_on == 0 than cm_loadconfig_temp_on 1"
cm_command "cm_loadconfig_return" "cm_if cm_loadconfig_temp_on == 1 than cm_loadconfig &cm_loadconfig_temp&;cm_if cm_loadconfig_temp_on == 1 than cm_loadconfig_temp_on 0"

cm_addcvar "cm_war_hostname_temp" ""
cm_addcvar "cm_war_hostname_temp_on" "0"
cm_addcvar "cm_war_hostname_temp_save" ""
cm_command "cm_war_hostname_change" "cm_if cm_war_hostname_temp_on == 0 than cm_war_hostname_temp '&hostname&';cm_if cm_war_hostname_temp_on == 0 than hostname '&cm_war_hostname_msg& &hostname&';cm_if cm_war_hostname_temp_on == 0 than cm_war_hostname_temp_save '&cm_war_hostname_msg& &hostname&';cm_if cm_war_hostname_temp_on == 0 than cm_war_hostname_temp_on 1"
cm_command "cm_war_hostname_return" "cm_if cm_war_hostname_temp_on == 1 than hostname '&cm_war_hostname_temp&';cm_if cm_war_hostname_temp_on == 1 than cm_war_hostname_temp_on 0"

cm_addcvar "cm_nextmap_temp" ""
cm_addcvar "cm_nextmap_temp_on" "0"
cm_command "cm_nextmap_save" "cm_if cm_nextmap_temp_on == 0 than cm_nextmap_temp &cm_nextmap&;cm_if cm_nextmap_temp_on == 0 than cm_nextmap_temp_on 1"
cm_command "cm_nextmap_return" "cm_if cm_nextmap_temp_on == 1 than cm_nextmap &cm_nextmap_temp&;cm_if cm_nextmap_temp_on == 1 than cm_nextmap_temp_on 0"

cm_addcvar "cm_password_temp" ""
cm_addcvar "cm_password_temp_on" "0"
cm_command "cm_password_save" "cm_if cm_password_temp_on == 0 than cm_password_temp &sv_password&;cm_if cm_password_temp_on == 0 than cm_password_temp_on 1"
cm_command "cm_password_return" "cm_if cm_password_temp_on == 1 than sv_password &cm_password_temp&;cm_if cm_password_temp_on == 1 than cm_password_temp_on 0"

cm_addcvar "cm_timelimit_temp" ""
cm_addcvar "cm_timelimit_temp_on" "0"
cm_command "cm_timelimit_save" "cm_if cm_timelimit_temp_on == 0 than cm_timelimit_temp &mp_timelimit&;cm_if cm_timelimit_temp_on == 0 than cm_timelimit_temp_on 1"
cm_command "cm_timelimit_return" "cm_if cm_timelimit_temp_on == 1 than mp_timelimit &cm_timelimit_temp&;cm_if cm_timelimit_temp_on == 1 than cm_timelimit_temp_on 0"

cm_addcvar "cm_maxrounds_temp" ""
cm_addcvar "cm_maxrounds_temp_on" "0"
cm_command "cm_maxrounds_save" "cm_if cm_maxrounds_temp_on == 0 than cm_maxrounds_temp &mp_maxrounds&;cm_if cm_maxrounds_temp_on == 0 than cm_maxrounds_temp_on 1"
cm_command "cm_maxrounds_return" "cm_if cm_maxrounds_temp_on == 1 than mp_maxrounds &cm_maxrounds_temp&;cm_if cm_maxrounds_temp_on == 1 than cm_maxrounds_temp_on 0"

cm_addcvar "cm_clan_match" ""
cm_addcvar "cm_clan_match_on" "0"
cm_command "cm_clan_match_change" "cm_if cm_clan_match_on == 0 than cm_clan_match &mp_clan_match&;cm_if cm_clan_match_on == 0 than mp_clan_match 1;cm_if cm_clan_match_on == 0 than cm_clan_match_on 1"
cm_command "cm_clan_match_return" "cm_if cm_clan_match_on == 1 than mp_clan_match &cm_clan_match&;cm_if cm_clan_match_on == 1 than cm_clan_match_on 0"

//Disable Statsme Addon
cm_addcvar "cm_statsme_temp" ""
cm_addcvar "cm_statsme_temp_on" "0"
cm_command "cm_statsme_change" "cm_if cm_statsme_temp_on == 0 than cm_statsme_temp &sm_enabled&;cm_if cm_statsme_temp_on == 0 than sm_enabled 0;cm_if cm_statsme_temp_on == 0 than cm_statsme_temp_on 1"
cm_command "cm_statsme_return" "cm_if cm_statsme_temp_on == 1 than sm_enabled &cm_statsme_temp&;cm_if cm_statsme_temp_on == 1 than cm_statsme_temp_on 0"

//cm_common.cfg System

//Saves value of cm_tkrevenge
cm_addcvar "cm_tkrevenge_temp" ""
cm_addcvar "cm_tkrevenge_temp_on" "0"
cm_command "cm_tkrevenge_change" "cm_if cm_tkrevenge_temp_on == 0 than cm_tkrevenge_temp &cm_tkrevenge&;cm_if cm_tkrevenge_temp_on == 0 than cm_tkrevenge 0;cm_if cm_tkrevenge_temp_on == 0 than cm_tkrevenge_temp_on 1"
cm_command "cm_tkrevenge_return" "cm_if cm_tkrevenge_temp_on == 1 than cm_tkrevenge &cm_tkrevenge_temp&;cm_if cm_tkrevenge_temp_on == 1 than cm_tkrevenge_temp_on 0"

//Saves Value of cm_teleport
cm_addcvar "cm_teleport_temp" ""
cm_addcvar "cm_teleport_temp_on" "0"
cm_command "cm_teleport_change" "cm_if cm_teleport_temp_on == 0 than cm_teleport_temp &cm_teleport&;cm_if cm_teleport_temp_on == 0 than cm_teleport 0;cm_if cm_teleport_temp_on == 0 than cm_teleport_temp_on 1"
cm_command "cm_teleport_return" "cm_if cm_teleport_temp_on == 1 than cm_teleport &cm_teleport_temp&;cm_if cm_teleport_temp_on == 1 than cm_teleport_temp_on 0"

//Saves Value of cm_enableslap
cm_addcvar "cm_enableslap_temp" ""
cm_addcvar "cm_enableslap_temp_on" "0"
cm_command "cm_enableslap_change" "cm_if cm_enableslap_temp_on == 0 than cm_enableslap_temp &cm_enableslap&;cm_if cm_enableslap_temp_on == 0 than cm_enableslap 0;cm_if cm_enableslap_temp_on == 0 than cm_enableslap_temp_on 1"
cm_command "cm_enableslap_return" "cm_if cm_enableslap_temp_on == 1 than cm_enableslap &cm_enableslap_temp&;cm_if cm_enableslap_temp_on == 1 than cm_enableslap_temp_on 0"

//Saves Value of cm_chatspeed
cm_addcvar "cm_chatspeed_temp" ""
cm_addcvar "cm_chatspeed_temp_on" "0"
cm_command "cm_chatspeed_change" "cm_if cm_chatspeed_temp_on == 0 than cm_chatspeed_temp &cm_chatspeed&;cm_if cm_chatspeed_temp_on == 0 than cm_chatspeed 0;cm_if cm_chatspeed_temp_on == 0 than cm_chatspeed_temp_on 1"
cm_command "cm_chatspeed_return" "cm_if cm_chatspeed_temp_on == 1 than cm_chatspeed &cm_chatspeed_temp&;cm_if cm_chatspeed_temp_on == 1 than cm_chatspeed_temp_on 0"

//Saves Value of cm_highlander
cm_addcvar "cm_highlander_temp" ""
cm_addcvar "cm_highlander_temp_on" "0"
cm_command "cm_highlander_change" "cm_if cm_highlander_temp_on == 0 than cm_highlander_temp &cm_highlander&;cm_if cm_highlander_temp_on == 0 than cm_highlander 0;cm_if cm_highlander_temp_on == 0 than cm_highlander_temp_on 1"
cm_command "cm_highlander_return" "cm_if cm_highlander_temp_on == 1 than cm_highlander &cm_highlander_temp&;cm_if cm_highlander_temp_on == 1 than cm_highlander_temp_on 0"

//Saves Value of cm_mapcyclecontrol
cm_addcvar "cm_mapcyclecontrol_temp" ""
cm_addcvar "cm_mapcyclecontrol_temp_on" "0"
cm_command "cm_mapcyclecontrol_change" "cm_if cm_mapcyclecontrol_temp_on == 0 than cm_mapcyclecontrol_temp &cm_mapcyclecontrol&;cm_if cm_mapcyclecontrol_temp_on == 0 than cm_mapcyclecontrol 0;cm_if cm_mapcyclecontrol_temp_on == 0 than cm_mapcyclecontrol_temp_on 1"
cm_command "cm_mapcyclecontrol_return" "cm_if cm_mapcyclecontrol_temp_on == 1 than cm_mapcyclecontrol &cm_mapcyclecontrol_temp&;cm_if cm_mapcyclecontrol_temp_on == 1 than cm_mapcyclecontrol_temp_on 0"

//Saves Value of cm_addonmapextend
cm_addcvar "cm_addon_mapextend_temp" ""
cm_addcvar "cm_addon_mapextend_temp_on" "0"
cm_command "cm_addon_mapextend_change" "cm_if cm_addon_mapextend_temp_on == 0 than cm_addon_mapextend_temp &cm_addon_mapextend&;cm_if cm_addon_mapextend_temp_on == 0 than cm_addon_mapextend 0;cm_if cm_addon_mapextend_temp_on == 0 than cm_addon_mapextend_temp_on 1"
cm_command "cm_addon_mapextend_return" "cm_if cm_addon_mapextend_temp_on == 1 than cm_addon_mapextend &cm_addon_mapextend_temp&;cm_if cm_addon_mapextend_temp_on == 1 than cm_addon_mapextend_temp_on 0"

//Saves Value of cm_addon_afk_on
cm_addcvar "cm_addon_afk_on_temp" ""
cm_addcvar "cm_addon_afk_on_temp_on" "0"
cm_command "cm_addon_afk_on_change" "cm_if cm_addon_afk_on_temp_on == 0 than cm_addon_afk_on_temp &cm_addon_afk_on&;cm_if cm_addon_afk_on_temp_on == 0 than cm_addon_afk_on 0;cm_if cm_addon_afk_on_temp_on == 0 than cm_addon_afk_on_temp_on 1"
cm_command "cm_addon_afk_on_return" "cm_if cm_addon_afk_on_temp_on == 1 than cm_addon_afk_on &cm_addon_afk_on_temp&;cm_if cm_addon_afk_on_temp_on == 1 than cm_addon_afk_on_temp_on 0"

//Saves Value of cm_addon_claninfo_on
cm_addcvar "cm_addon_claninfo_on_temp" ""
cm_addcvar "cm_addon_claninfo_on_temp_on" "0"
cm_command "cm_addon_claninfo_on_change" "cm_if cm_addon_claninfo_on_temp_on == 0 than cm_addon_claninfo_on_temp &cm_addon_claninfo_on&;cm_if cm_addon_claninfo_on_temp_on == 0 than cm_addon_claninfo_on 0;cm_if cm_addon_claninfo_on_temp_on == 0 than cm_addon_claninfo_on_temp_on 1"
cm_command "cm_addon_claninfo_on_retrun" "cm_if cm_addon_claninfo_on_temp_on == 1 than cm_addon_claninfo_on &cm_addon_claninfo_on_temp&;cm_if cm_addon_claninfo_on_temp_on == 1 than cm_addon_claninfo_on_temp_on 0"

//Saves Value of monster_spawn
cm_addcvar "monster_spawn_temp_temp" ""
cm_addcvar "monster_spawn_temp_temp_on" "0"
cm_command "monster_spawn_change" "cm_if monster_spawn_temp_temp_on == 0 than monster_spawn_temp_temp &monster_spawn_temp&;cm_if monster_spawn_temp_temp_on == 0 than monster_spawn_temp 0;cm_if monster_spawn_temp_temp_on == 0 than monster_spawn_temp_temp_on 1"
cm_command "monster_spawn_return" "cm_if monster_spawn_temp_temp_on == 1 than monster_spawn_temp &monster_spawn_temp_temp&;cm_if monster_spawn_temp_temp_on == 1 than monster_spawn_temp_temp_on 0"

//Saves Value of cm_addon_fun_giveweapon_on
cm_addcvar "cm_addon_fun_giveweapon_on_temp" ""
cm_addcvar "cm_addon_fun_giveweapon_on_temp_on" "0"
cm_command "cm_addon_fun_giveweapon_on_change" "cm_if cm_addon_fun_giveweapon_on_temp_on == 0 than cm_addon_fun_giveweapon_on_temp &cm_addon_fun_giveweapon_on&;cm_if cm_addon_fun_giveweapon_on_temp_on == 0 than cm_addon_fun_giveweapon_on 0;cm_if cm_addon_fun_giveweapon_on_temp_on == 0 than cm_addon_fun_giveweapon_on_temp_on 1"
cm_command "cm_addon_fun_giveweapon_on_return" "cm_if cm_addon_fun_giveweapon_on_temp_on == 1 than cm_addon_fun_giveweapon_on &cm_addon_fun_giveweapon_on_temp&;cm_if cm_addon_fun_giveweapon_on_temp_on == 1 than cm_addon_fun_giveweapon_on_temp_on 0"

//Saves Value of cm_addon_fun_votes_on
cm_addcvar "cm_addon_fun_votes_on_temp" ""
cm_addcvar "cm_addon_fun_votes_on_temp_on" "0"
cm_command "cm_addon_fun_votes_on_change" "cm_if cm_addon_fun_votes_on_temp_on == 0 than cm_addon_fun_votes_on_temp &cm_addon_fun_votes_on&;cm_if cm_addon_fun_votes_on_temp_on == 0 than cm_addon_fun_votes_on 0;cm_if cm_addon_fun_votes_on_temp_on == 0 than cm_addon_fun_votes_on_temp_on 1"
cm_command "cm_addon_fun_votes_on_return" "cm_if cm_addon_fun_votes_on_temp_on == 1 than cm_addon_fun_votes_on &cm_addon_fun_votes_on_temp&;cm_if cm_addon_fun_votes_on_temp_on == 1 than cm_addon_fun_votes_on_temp_on 0"

alias "run_war" "run_war_on;run_war_on2"
alias "run_war_on" "cm_tkrevenge_change;cm_teleport_change;cm_enableslap_change;cm_chatspeed_change;cm_highlander_change;cm_mapcyclecontrol_change;cm_addon_mapextend_change"
alias "run_war_on2" "cm_addon_afk_on_change;cm_addon_claninfo_on_change;monster_spawn_change;cm_addon_fun_giveweapon_on_change;cm_addon_fun_votes_on_change"

alias "run_public" "run_public_run1;run_public_run2;run_public_run3;run_public_run4" 
alias "run_public_run1" "cm_tkrevenge_return;cm_teleport_return;cm_enableslap_return;cm_chatspeed_return;cm_highlander_return;cm_addon_mapextend_return;cm_mapcyclecontrol_return"
alias "run_public_run2" "cm_addon_afk_on_return;cm_addon_claninfo_on_retrun;monster_spawn_return;cm_addon_fun_giveweapon_on_return;cm_addon_fun_votes_on_return"
alias "run_public_run3" "cm_password_return;cm_timelimit_return;cm_maxrounds_return;cm_statsme_return;exec server.cfg"
cm_command "run_public_run4" "cm_say @@g Public Settings Loaded;cm_say @@ Password: &sv_password&"
