block load
{ 
  es_xset est_glock -
  es_xset est_usp -
  es_xset est_elite -
  es_xset est_fiveseven -
  es_xset est_p228 -
  es_xset est_deagle - 
  es_xset est_p90 -
  es_xset est_aug -
  es_xset est_weapon_tmp -
  es_xset est_mac10 -
  es_xset est_mp5navy -
  es_xset est_ump45 -
  es_xset est_m3 -
  es_xset est_xm1014 -
  es_xset est_m249 -
  es_xset est_famas -
  es_xset est_galil -
  es_xset est_scout -
  es_xset est_sg552 -
  es_xset est_ak47 -
  es_xset est_m4a1 -
  es_xset est_awp -
  es_xset est_hegrenade -
  es_xset est_smokegrenade -
  es_xset est_flashBang -
  es_xset est_c4 -
  es_xset est_scouts -
  es_xset est_knives -
  es_xset est_bots 0
  es_xset est_bot_difficulty 0
  es_xset est_color 0
  es_xset est_red 0
  es_xset est_green 0
  es_xset est_blue 0
  es_xset est_script 0
  es_xset est_script1 0
  es_xset est_script2 0
  es_xset est_script3 0
  es_xset est_script4 0
  es_xset est_script5 0
  es_xset est_script6 0
  es_xset est_script7 0
  es_keycreate restrict
  es_keysetvalue restrict glock -
  es_keysetvalue restrict usp -
  es_keysetvalue restrict elite -
  es_keysetvalue restrict p228 -
  es_keysetvalue restrict fiveseven -
  es_keysetvalue restrict deagle -
  es_keysetvalue restrict p90 -
  es_keysetvalue restrict aug -
  es_keysetvalue restrict tmp -
  es_keysetvalue restrict mac10 -
  es_keysetvalue restrict mp5navy -
  es_keysetvalue restrict ump45 -
  es_keysetvalue restrict xm1014 -
  es_keysetvalue restrict m3 -
  es_keysetvalue restrict m249 -
  es_keysetvalue restrict sg552 -
  es_keysetvalue restrict famas -
  es_keysetvalue restrict galil -
  es_keysetvalue restrict scout -
  es_keysetvalue restrict ak47 -
  es_keysetvalue restrict m4a1 -
  es_keysetvalue restrict awp -
  es_keysetvalue restrict hegrenade -
  es_keysetvalue restrict smokegrenade -
  es_keysetvalue restrict flashBang -
  es_keysetvalue restrict c4 -
  es_keysetvalue restrict scouts -
  es_keysetvalue restrict knives -
  popup create restrict_weapons
  popup create restrict_pistols
  popup create restrict_smg
  popup create restrict_m3
  popup create restrict_rifles
  popup create restrict_items
  popup create scouts
  popup addline restrict_weapons " -Restrict Weapons-"
  popup addline restrict_weapons "->1.Pistols" 
  popup addline restrict_weapons "->2.Smg"
  popup addline restrict_weapons "->3.Machine/Shotguns"
  popup addline restrict_weapons "->4.Rifles" 
  popup addline restrict_weapons "->5.Items" 
  popup addline restrict_weapons "->6.Scenario" 
  popup addline restrict_weapons "->8.Back"
  popup addline restrict_weapons "->0.Exit"   
  popup select restrict_weapons 1 est_adminmenu/server_settings/restrict_weapons
  popup select restrict_weapons 2 est_adminmenu/server_settings/restrict_smg
  popup select restrict_weapons 3 est_adminmenu/server_settings/restrict_sub
  popup select restrict_weapons 4 est_adminmenu/server_settings/restrict_riflesl
  popup select restrict_weapons 5 est_adminmenu/server_settings/restrict_itemsn
  popup select restrict_weapons 6 est_adminmenu/server_settings/restrict_scouts
  popup submenu restrict_weapons 8 server_settings
  popup create modmanager
  popup addline modmanager "-Script Management-"
  popup addline modmanager "->1.Load a Script"
  popup addline modmanager "->2.ReLoad a Script"
  popup addline modmanager "->3.UnLoad a Script"
  popup addline modmanager "->8.Back"
  popup addline modmanager "->0.Exit"
  popup submenu modmanager 1 modload
  popup submenu modmanager 2 modunload
  popup submenu modmanager 3 modreload
  popup submenu modmanager 8 server_settings
  popup create modload
  es_keygetvalue est_script1 est_adminconfig scripts script1
  es_keygetvalue est_script2 est_adminconfig scripts script2
  es_keygetvalue est_script3 est_adminconfig scripts script3
  es_keygetvalue est_script4 est_adminconfig scripts script4
  es_keygetvalue est_script5 est_adminconfig scripts script5
  es_keygetvalue est_script6 est_adminconfig scripts script6
  es_keygetvalue est_script7 est_adminconfig scripts script7
  popup addline modload "-Load a Script-"
  if (server_var(est_script1) != 0) then popup addlinef modload "->1.%1" est_script1
  if (server_var(est_script2) != 0) then popup addlinef modload "->2.%1" est_script2
  if (server_var(est_script3) != 0) then popup addlinef modload "->3.%1" est_script3
  if (server_var(est_script4) != 0) then popup addlinef modload "->4.%1" est_script4
  if (server_var(est_script5) != 0) then popup addlinef modload "->5.%1" est_script5
  if (server_var(est_script6) != 0) then popup addlinef modload "->6.%1" est_script6
  if (server_var(est_script7) != 0) then popup addlinef modload "->7.%1" est_script7
  if (server_var(est_script1) != 0) then popup addline modload "->8.Back"
  if (server_var(est_script1) != 0) then popup addline modload "->0.Exit"
  if (server_var(est_script1) != 0) then es popup menuvalue modload est_script 1 server_var(est_script1)
  if (server_var(est_script2) != 0) then es popup menuvalue modload est_script 2 server_var(est_script2)
  if (server_var(est_script3) != 0) then es popup menuvalue modload est_script 3 server_var(est_script3)
  if (server_var(est_script4) != 0) then es popup menuvalue modload est_script 4 server_var(est_script4)
  if (server_var(est_script5) != 0) then es popup menuvalue modload est_script 5 server_var(est_script5)
  if (server_var(est_script6) != 0) then es popup menuvalue modload est_script 6 server_var(est_script6)
  if (server_var(est_script7) != 0) then es popup menuvalue modload est_script 7 server_var(est_script7)
  popup menuselect modload est_adminmenu/server_settings/modload
  popup create modunload
  popup addline modunload "-ReLoad a Script-"
  if (server_var(est_script1) != 0) then popup addlinef modunload "->1.%1" est_script1
  if (server_var(est_script2) != 0) then popup addlinef modunload "->2.%1" est_script2
  if (server_var(est_script3) != 0) then popup addlinef modunload "->3.%1" est_script3
  if (server_var(est_script4) != 0) then popup addlinef modunload "->4.%1" est_script4
  if (server_var(est_script5) != 0) then popup addlinef modunload "->5.%1" est_script5
  if (server_var(est_script6) != 0) then popup addlinef modunload "->6.%1" est_script6
  if (server_var(est_script7) != 0) then popup addlinef modunload "->7.%1" est_script7
  if (server_var(est_script1) != 0) then popup addline modunload "->8.Back"
  if (server_var(est_script1) != 0) then popup addline modunload "->0.Exit"
  popup menuselect modunload est_adminmenu/server_settings/modreload
  popup create modreload
  popup addline modreload "-UnLoad a Script-"
  if (server_var(est_script1) != 0) then popup addlinef modreload "->1.%1" est_script1
  if (server_var(est_script2) != 0) then popup addlinef modreload "->2.%1" est_script2
  if (server_var(est_script3) != 0) then popup addlinef modreload "->3.%1" est_script3
  if (server_var(est_script4) != 0) then popup addlinef modreload "->4.%1" est_script4
  if (server_var(est_script5) != 0) then popup addlinef modreload "->5.%1" est_script5
  if (server_var(est_script6) != 0) then popup addlinef modreload "->6.%1" est_script6
  if (server_var(est_script7) != 0) then popup addlinef modreload "->7.%1" est_script7
  if (server_var(est_script1) != 0) then popup addline modreload "->8.Back"
  if (server_var(est_script1) != 0) then popup addline modreload "->0.Exit"  
  popup menuselect modreload est_adminmenu/server_settings/modunload
}

block modload
{
  if (server_var(_popup_choice) <= 7) do
  {
    es es_xload server_var(est_script)
    es colormsg server_var(_popup_userid) #grey [Loaded]: #green server_var(est_script)
    es popup send modload server_var(_popup_userid)
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send modmanager server_var(_popup_userid)
  }
}

block modreload
{
  if (server_var(_popup_choice) <= 7) do
  {
    es es_xreload server_var(est_script)
    es colormsg server_var(_popup_userid) #grey [Loaded]: #green server_var(est_script)
    es popup send modload server_var(_popup_userid)
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send modmanager server_var(_popup_userid)
  }
}

block modunload
{
  if (server_var(_popup_choice) <= 7) do
  {
    es es_xunload server_var(est_script)
    es colormsg server_var(_popup_userid) #grey [UnLoaded]: #green server_var(est_script)
    es popup send modload server_var(_popup_userid)
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send modmanager server_var(_popup_userid)
  }
}

block restrict_weapons
{
    popup create restrict_pistols
    popup addline restrict_pistols " -Restrict Pistols-"
    popup addlinef restrict_pistols "->1.Glock %1" est_glock
    popup addlinef restrict_pistols "->2.Usp %1" est_usp
    popup addlinef restrict_pistols "->3.Elites %1" est_elite
    popup addlinef restrict_pistols "->4.P228 %1" est_p228
    popup addlinef restrict_pistols "->5.Five Seven %1" est_fiveseven
    popup addlinef restrict_pistols "->6.Deagle %1" est_deagle
    popup addline restrict_pistols "->8.Back" 
    popup addline restrict_pistols "->0.Exit" 
    popup addline restrict_pistols "---------------------" 
    popup addline restrict_pistols "-Press Twice to Confirm-" 
    popup menuselect restrict_pistols est_adminmenu/server_settings/restrict_pistols
    es popup send restrict_pistols server_var(_popup_userid)
}

block restrict_pistols
{
  if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_glock restrict glock
    if (server_var(est_glock) = -) then es_keysetvalue restrict glock [Restricted]
    if (server_var(est_glock) = [Restricted]) then es_keysetvalue restrict glock -
    if (server_var(est_glock) = [Restricted]) then es est_restrict #a weapon_glock
    if (server_var(est_glock) = -) then es est_unrestrict #a weapon_glock
    es colormsg #all #grey Glock #green server_var(est_glock)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
  if (server_var(_popup_choice) == 2) do
  {
    es_keygetvalue est_usp restrict usp
    if (server_var(est_usp) = -) then es_keysetvalue restrict usp [Restricted]
    if (server_var(est_usp) = [Restricted]) then es_keysetvalue restrict usp -
    if (server_var(est_usp) = [Restricted]) then es est_restrict #a weapon_usp
    if (server_var(est_usp) = -) then es est_unrestrict #a weapon_usp
    es colormsg #all #grey Usp #green server_var(est_usp)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
  if (server_var(_popup_choice) == 3) do
  {
    es_keygetvalue est_elite restrict elite
    if (server_var(est_elite) = -) then es_keysetvalue restrict elite [Restricted]
    if (server_var(est_elite) = [Restricted]) then es_keysetvalue restrict elite -
    if (server_var(est_elite) = [Restricted]) then es est_restrict #a weapon_elite
    if (server_var(est_elite) = -) then es est_unrestrict #a weapon_elite
    es colormsg #all #grey elite #green server_var(est_elite)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
  if (server_var(_popup_choice) == 4) do
  {
    es_keygetvalue est_p228 restrict p228
    if (server_var(est_p228) = -) then es_keysetvalue restrict p228 [Restricted]
    if (server_var(est_p228) = [Restricted]) then es_keysetvalue restrict p228 -
    if (server_var(est_p228) = [Restricted]) then es est_restrict #a weapon_p228
    if (server_var(est_p228) = -) then es est_unrestrict #a weapon_p228
    es colormsg #all #grey p228 #green server_var(est_p228)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
    if (server_var(_popup_choice) == 5) do
  {
    es_keygetvalue est_fiveseven restrict fiveseven
    if (server_var(est_fiveseven) = -) then es_keysetvalue restrict fiveseven [Restricted]
    if (server_var(est_fiveseven) = [Restricted]) then es_keysetvalue restrict fiveseven -
    if (server_var(est_fiveseven) = [Restricted]) then es est_restrict #a weapon_fiveseven
    if (server_var(est_fiveseven) = -) then es est_unrestrict #a weapon_fiveseven
    es colormsg #all #grey fiveseven #green server_var(est_fiveseven)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
  if (server_var(_popup_choice) == 6) do
  {
    es_keygetvalue est_deagle restrict deagle
    if (server_var(est_deagle) = -) then es_keysetvalue restrict deagle [Restricted]
    if (server_var(est_deagle) = [Restricted]) then es_keysetvalue restrict deagle -
    if (server_var(est_deagle) = [Restricted]) then es est_restrict #a weapon_deagle
    if (server_var(est_deagle) = -) then es est_unrestrict #a weapon_deagle
    es colormsg #all #grey deagle #green server_var(est_deagle)
    es_xdoblock est_adminmenu/server_settings/restrict_weapons
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}


block restrict_smg
{
    popup create restrict_msg
    popup addline restrict_msg " -Restrict Sub Machine Guns-"
    popup addlinef restrict_msg "->1.P90 %1" est_p90
    popup addlinef restrict_msg "->2.Aug %1" est_aug
    popup addlinef restrict_msg "->3.Tmp %1" est_weapon_tmp
    popup addlinef restrict_msg "->4.Mac10 %1" est_mac10
    popup addlinef restrict_msg "->5.Mp5navy %1" est_mp5navy
    popup addlinef restrict_msg "->6.Ump45 %1" est_ump45
    popup addline restrict_msg "->8.Back" 
    popup addline restrict_msg "->0.Exit" 
    popup addline restrict_msg "---------------------" 
    popup addline restrict_msg "-Press Twice to Confirm-" 
    popup menuselect restrict_msg est_adminmenu/server_settings/restrict_msg
    es popup send restrict_msg server_var(_popup_userid)
}

block restrict_msg
{
  if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_p90 restrict p90
    if (server_var(est_p90) = -) then es_keysetvalue restrict p90 [Restricted]
    if (server_var(est_p90) = [Restricted]) then es_keysetvalue restrict p90 -
    if (server_var(est_p90) = [Restricted]) then es est_restrict #a weapon_p90
    if (server_var(est_p90) = -) then es est_unrestrict #a weapon_p90
    es colormsg #all #grey P90 #green server_var(est_p90)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
  if (server_var(_popup_choice) == 2) do
  {
    es_keygetvalue est_aug restrict aug
    if (server_var(est_aug) = -) then es_keysetvalue restrict aug [Restricted]
    if (server_var(est_aug) = [Restricted]) then es_keysetvalue restrict aug -
    if (server_var(est_aug) = [Restricted]) then es est_restrict #a weapon_aug
    if (server_var(est_aug) = -) then es est_unrestrict #a weapon_aug
    es colormsg #all #grey aug #green server_var(est_aug)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
  if (server_var(_popup_choice) == 3) do
  {
    es_keygetvalue est_weapon_tmp restrict tmp
    if (server_var(est_weapon_tmp) = -) then es_keysetvalue restrict tmp [Restricted]
    if (server_var(est_weapon_tmp) = [Restricted]) then es_keysetvalue restrict tmp -
    if (server_var(est_weapon_tmp) = [Restricted]) then es est_restrict #a weapon_tmp
    if (server_var(est_weapon_tmp) = -) then es est_unrestrict #a weapon_tmp
    es colormsg #all #grey tmp #green server_var(est_weapon_tmp)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
  if (server_var(_popup_choice) == 4) do
  {
    es_keygetvalue est_mac10 restrict mac10
    if (server_var(est_mac10) = -) then es_keysetvalue restrict mac10 [Restricted]
    if (server_var(est_mac10) = [Restricted]) then es_keysetvalue restrict mac10 -
    if (server_var(est_mac10) = [Restricted]) then es est_restrict #a weapon_mac10
    if (server_var(est_mac10) = -) then es est_unrestrict #a weapon_mac10
    es colormsg #all #grey mac10 #green server_var(est_mac10)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
    if (server_var(_popup_choice) == 5) do
  {
    es_keygetvalue est_mp5navy restrict mp5navy 
    if (server_var(est_mp5navy) = -) then es_keysetvalue restrict mp5navy [Restricted]
    if (server_var(est_mp5navy) = [Restricted]) then es_keysetvalue restrict mp5navy -
    if (server_var(est_mp5navy) = [Restricted]) then es est_restrict #a weapon_mp5navy
    if (server_var(est_mp5navy) = -) then es est_unrestrict #a weapon_mp5navy
    es colormsg #all #grey mp5navy #green server_var(est_mp5navy)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
  if (server_var(_popup_choice) == 6) do
  {
    es_keygetvalue est_ump45 restrict ump45
    if (server_var(est_ump45) = -) then es_keysetvalue restrict ump45 [Restricted]
    if (server_var(est_ump45) = [Restricted]) then es_keysetvalue restrict ump45 -
    if (server_var(est_ump45) = [Restricted]) then es est_restrict #a weapon_ump45
    if (server_var(est_ump45) = -) then es est_unrestrict #a weapon_ump45
    es colormsg #all #grey ump45 #green server_var(est_ump45)
    es_xdoblock est_adminmenu/server_settings/restrict_smg
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}

block restrict_sub
{
    popup create restrict_ms
    popup addline restrict_ms " -Restrict Machine/Shot Guns-"
    popup addlinef restrict_ms "->1.M3 %1" est_m3
    popup addlinef restrict_ms "->2.Xm1014 %1" est_xm1014
    popup addlinef restrict_ms "->3.M249 %1" est_m249
    popup addline restrict_ms "->8.Back" 
    popup addline restrict_ms "->0.Exit"
    popup addline restrict_ms "---------------------" 
    popup addline restrict_ms "-Press Twice to Confirm-" 
    popup menuselect restrict_ms est_adminmenu/server_settings/restrict_ms
    es popup send restrict_ms server_var(_popup_userid)
}

block restrict_ms
{
  if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_m3 restrict m3
    if (server_var(est_m3) = -) then es_keysetvalue restrict m3 [Restricted]
    if (server_var(est_m3) = [Restricted]) then es_keysetvalue restrict m3 -
    if (server_var(est_m3) = [Restricted]) then es est_restrict #a weapon_m3
    if (server_var(est_m3) = -) then es est_unrestrict #a weapon_m3
    es colormsg #all #grey m3 #green server_var(est_m3)
    es_xdoblock est_adminmenu/server_settings/restrict_sub
  }
  if (server_var(_popup_choice) == 2) do
  {
    es_keygetvalue est_xm1014 restrict xm1014
    if (server_var(est_xm1014) = -) then es_keysetvalue restrict xm1014 [Restricted]
    if (server_var(est_xm1014) = [Restricted]) then es_keysetvalue restrict xm1014 -
    if (server_var(est_xm1014) = [Restricted]) then es est_restrict #a weapon_xm1014
    if (server_var(est_xm1014) = -) then es est_unrestrict #a weapon_xm1014
    es colormsg #all #grey xm1014 #green server_var(est_xm1014)
    es_xdoblock est_adminmenu/server_settings/restrict_sub
  }
  if (server_var(_popup_choice) == 3) do
  {
    es_keygetvalue est_m249 restrict m249
    if (server_var(est_m249) = -) then es_keysetvalue restrict m249 [Restricted]
    if (server_var(est_m249) = [Restricted]) then es_keysetvalue restrict m249 -
    if (server_var(est_m249) = [Restricted]) then es est_restrict #a weapon_m249
    if (server_var(est_m249) = -) then es est_unrestrict #a weapon_m249
    es colormsg #all #grey m249 #green server_var(est_m249)
    es_xdoblock est_adminmenu/server_settings/restrict_sub
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}

block restrict_riflesl
{
    popup create restrict_rifles
    popup addline restrict_rifles " -Restrict Sub Machine Guns-"
    popup addlinef restrict_rifles "->1.Famas %1" est_famas
    popup addlinef restrict_rifles "->2.Galil %1" est_galil
    popup addlinef restrict_rifles "->3.Scout %1" est_scout
    popup addlinef restrict_rifles "->4.m4a1 %1" est_m4a1
    popup addlinef restrict_rifles "->5.Sg552 %1" est_sg552
    popup addlinef restrict_rifles "->6.ak47 %1" est_ak47
    popup addlinef restrict_rifles "->7.awp %1" est_awp
    popup addline restrict_rifles "->8.Back" 
    popup addline restrict_rifles "->0.Exit" 
    popup addline restrict_rifles "---------------------" 
    popup addline restrict_rifles "-Press Twice to Confirm-"
    popup menuselect restrict_rifles est_adminmenu/server_settings/restrict_rifles
    es popup send restrict_rifles server_var(_popup_userid)
}

block restrict_rifles
{
  if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_famas restrict famas
    if (server_var(est_famas) = -) then es_keysetvalue restrict famas [Restricted]
    if (server_var(est_famas) = [Restricted]) then es_keysetvalue restrict famas -
    if (server_var(est_famas) = [Restricted]) then es est_restrict #a weapon_famas
    if (server_var(est_famas) = -) then es est_unrestrict #a weapon_famas
    es colormsg #all #grey famas #green server_var(est_famas)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 2) do
  {
    es_keygetvalue est_galil restrict galil
    if (server_var(est_galil) = -) then es_keysetvalue restrict galil [Restricted]
    if (server_var(est_galil) = [Restricted]) then es_keysetvalue restrict galil -
    if (server_var(est_galil) = [Restricted]) then es est_restrict #a weapon_galil
    if (server_var(est_galil) = -) then es est_unrestrict #a weapon_galil
    es colormsg #all #grey galil #green server_var(est_galil)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 3) do
  {
    es_keygetvalue est_scout restrict scout
    if (server_var(est_scout) = -) then es_keysetvalue restrict scout [Restricted]
    if (server_var(est_scout) = [Restricted]) then es_keysetvalue restrict scout -
    if (server_var(est_scout) = [Restricted]) then es est_restrict #a weapon_scout
    if (server_var(est_scout) = -) then es est_unrestrict #a weapon_scout
    es colormsg #all #grey scout #green server_var(est_scout)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 4) do
  {
    es_keygetvalue est_m4a1 restrict m4a1
    if (server_var(est_m4a1) = -) then es_keysetvalue restrict m4a1 [Restricted]
    if (server_var(est_m4a1) = [Restricted]) then es_keysetvalue restrict m4a1 -
    if (server_var(est_m4a1) = [Restricted]) then es est_restrict #a weapon_m4a1
    if (server_var(est_m4a1) = -) then es est_unrestrict #a weapon_m4a1
    es colormsg #all #grey m4a1 #green server_var(est_m4a1)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
    if (server_var(_popup_choice) == 5) do
  {
    es_keygetvalue est_sg552 restrict sg552 
    if (server_var(est_sg552) = -) then es_keysetvalue restrict sg552 [Restricted]
    if (server_var(est_sg552) = [Restricted]) then es_keysetvalue restrict sg552 -
    if (server_var(est_sg552) = [Restricted]) then es est_restrict #a weapon_sg552
    if (server_var(est_sg552) = -) then es est_unrestrict #a weapon_sg552
    es colormsg #all #grey sg552 #green server_var(est_sg552)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 6) do
  {
    es_keygetvalue est_ak47 restrict ak47
    if (server_var(est_ak47) = -) then es_keysetvalue restrict ak47 [Restricted]
    if (server_var(est_ak47) = [Restricted]) then es_keysetvalue restrict ak47 -
    if (server_var(est_ak47) = [Restricted]) then es est_restrict #a weapon_ak47
    if (server_var(est_ak47) = -) then es est_unrestrict #a weapon_ak47
    es colormsg #all #grey ak47 #green server_var(est_ak47)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 7) do
  {
    es_keygetvalue est_awp restrict awp
    if (server_var(est_awp) = -) then es_keysetvalue restrict awp [Restricted]
    if (server_var(est_awp) = [Restricted]) then es_keysetvalue restrict awp -
    if (server_var(est_awp) = [Restricted]) then es est_restrict #a weapon_awp
    if (server_var(est_awp) = -) then es est_unrestrict #a weapon_awp
    es colormsg #all #grey awp #green server_var(est_awp)
    es_xdoblock est_adminmenu/server_settings/restrict_riflesl
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}

block restrict_itemsn
{
    popup create restrict_items
    popup addline restrict_items " -Restrict Sub Machine Guns-"
    popup addlinef restrict_items "->1.He Granade %1" est_hegrenade
    popup addlinef restrict_items "->2.Smoke Grenade %1" est_smokegrenade
    popup addlinef restrict_items "->3.Flash Bang %1" est_flashbang
    popup addlinef restrict_items "->4.C4 %1" est_c4
    popup addline restrict_items "->8.Back" 
    popup addline restrict_items "->0.Exit" 
    popup addline restrict_items "---------------------" 
    popup addline restrict_items "-Press Twice to Confirm-"
    popup menuselect restrict_items est_adminmenu/server_settings/restrict_items
    es popup send restrict_items server_var(_popup_userid)
}

block restrict_items
{
 if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_hegrenade restrict hegrenade
    if (server_var(est_hegrenade) = -) then es_keysetvalue restrict hegrenade [Restricted]
    if (server_var(est_hegrenade) = [Restricted]) then es_keysetvalue restrict hegrenade -
    if (server_var(est_hegrenade) = [Restricted]) then es est_restrict #a weapon_hegrenade
    if (server_var(est_hegrenade) = -) then es est_unrestrict #a weapon_hegrenade
    es colormsg #all #grey hegrenade #green server_var(est_hegrenade)
    es_xdoblock est_adminmenu/server_settings/restrict_itemsn
  }
  if (server_var(_popup_choice) == 2) do
  {
    es_keygetvalue est_smokegrenade restrict smokegrenade
    if (server_var(est_smokegrenade) = -) then es_keysetvalue restrict smokegrenade [Restricted]
    if (server_var(est_smokegrenade) = [Restricted]) then es_keysetvalue restrict smokegrenade -
    if (server_var(est_smokegrenade) = [Restricted]) then es est_restrict #a weapon_smokegrenade
    if (server_var(est_smokegrenade) = -) then es est_unrestrict #a weapon_smokegrenade
    es colormsg #all #grey smokegrenade #green server_var(est_smokegrenade)
    es_xdoblock est_adminmenu/server_settings/restrict_itemsn
  }
  if (server_var(_popup_choice) == 3) do
  {
    es_keygetvalue est_flashbang restrict flashbang
    if (server_var(est_flashbang) = -) then es_keysetvalue restrict flashbang [Restricted]
    if (server_var(est_flashbang) = [Restricted]) then es_keysetvalue restrict flashbang -
    if (server_var(est_flashbang) = [Restricted]) then es est_restrict #a weapon_flashbang
    if (server_var(est_flashbang) = -) then es est_unrestrict #a weapon_flashbang
    es colormsg #all #grey flashbang #green server_var(est_flashbang)
    es_xdoblock est_adminmenu/server_settings/restrict_itemsn
  }
  if (server_var(_popup_choice) == 4) do
  {
    es_keygetvalue est_c4 restrict c4
    if (server_var(est_c4) = -) then es_keysetvalue restrict c4 [Restricted]
    if (server_var(est_c4) = [Restricted]) then es_keysetvalue restrict c4 -
    if (server_var(est_c4) = [Restricted]) then es est_restrict #a weapon_c4
    if (server_var(est_c4) = -) then es est_unrestrict #a weapon_c4
    es colormsg #all #grey c4 #green server_var(est_c4)
    es_xdoblock est_adminmenu/server_settings/restrict_itemsn
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}

block restrict_scouts
{
    popup create scouts
    popup addline scouts "    -Scenario-"
    popup addline scouts "-------------------" 
    popup addlinef scouts "->1.Scouts-Knives %1" est_scouts
    popup addline scouts "->8.Back" 
    popup addline scouts "->0.Exit" 
    popup menuselect scouts est_adminmenu/server_settings/restrict_scoutsknifes
    es popup send scouts server_var(_popup_userid)
}

block restrict_scoutsknifes
{
  if (server_var(_popup_choice) == 1) do
  {
    es_keygetvalue est_scouts restrict scouts
    if (server_var(est_scouts) = -) then es_keysetvalue restrict scouts [Scouts-Knives]
    if (server_var(est_scouts) = [Scouts-Knives]) then es_keysetvalue restrict scouts -
    if (server_var(est_scouts) = [Scouts-Knives]) then es_xdoblock est_adminmenu/server_settings/restrictall
    if (server_var(est_scouts) = -) then es_xdoblock est_adminmenu/server_settings/unrestrictall
    es colormsg #all #grey scouts #green server_var(est_scouts)
    es_xdoblock est_adminmenu/server_settings/restrict_scouts
  }
  if (server_var(_popup_choice) == 8) do
  {
    es popup send restrict_weapons server_var(_popup_userid)
  }
}

block restrictall
{
  es est_removeweapon #a 1
  es est_removeweapon #a 2
  es est_removeweapon #a 4
  es est_restrict #a weapon_p90
  es est_restrict #a weapon_ak47
  es est_restrict #a weapon_galil
  es est_restrict #a weapon_sg552
  es est_restrict #a weapon_awp
  es est_restrict #a weapon_g3sg1
  es est_restrict #a weapon_famas
  es est_restrict #a weapon_m4a1
  es est_restrict #a weapon_aug
  es est_restrict #a weapon_sg550
  es est_restrict #a weapon_tmp
  es est_restrict #a weapon_mac10
  es est_restrict #a weapon_mp5navy
  es est_restrict #a weapon_ump45
  es est_restrict #a weapon_m3
  es est_restrict #a weapon_m249
  es est_restrict #a weapon_xm1014
  es est_restrict #a weapon_glock
  es est_restrict #a weapon_usp
  es est_restrict #a weapon_elite
  es est_restrict #a weapon_p228
  es est_restrict #a weapon_fiveseven
  es est_restrict #a weapon_deagle
  es est_restrict #a weapon_hegrenade
  es est_restrict #a weapon_c4
  es est_give #a weapon_scout
}

block unrestrictall
{
  es est_unrestrict #a weapon_p90
  es est_unrestrict #a weapon_ak47
  es est_unrestrict #a weapon_galil
  es est_unrestrict #a weapon_sg552
  es est_unrestrict #a weapon_awp
  es est_unrestrict #a weapon_g3sg1
  es est_unrestrict #a weapon_famas
  es est_unrestrict #a weapon_m4a1
  es est_unrestrict #a weapon_aug
  es est_unrestrict #a weapon_sg550
  es est_unrestrict #a weapon_tmp
  es est_unrestrict #a weapon_mac10
  es est_unrestrict #a weapon_mp5navy
  es est_unrestrict #a weapon_ump45
  es est_unrestrict #a weapon_m3
  es est_unrestrict #a weapon_m249
  es est_unrestrict #a weapon_xm1014
  es est_unrestrict #a weapon_glock
  es est_unrestrict #a weapon_usp
  es est_unrestrict #a weapon_elite
  es est_unrestrict #a weapon_p228
  es est_unrestrict #a weapon_fiveseven
  es est_unrestrict #a weapon_deagle
  es est_unrestrict #a weapon_hegrenade
  es est_unrestrict #a weapon_c4
}


event player_spawn
{
  if (server_var(est_scouts) = [Scouts-Knives]) do
  {
    es est_give event_var(userid) weapon_scout
    es colormsg event_var(userid) #green [Scouts-Knives]
  }
}
