Advertisement
Guest User

Untitled

a guest
Mar 20th, 2017
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 2.22 KB | None | 0 0
  1.     function TeamCheck(pl)                          //Checks player team & opens last visited page by player.
  2.         if pl:Team() == 1 then
  3.             if pl.hMenuPage2==1 then
  4.                 hook.Run("phm_h2",pl)
  5.             else
  6.                 if pl.hMenuPage3==1 then
  7.                     hook.Run("phm_h3",pl)
  8.                 else
  9.                     if pl.hMenuPage4==1 then
  10.                         hook.Run("phm_h4",pl)
  11.                     else
  12.                         if pl.hMenuPage5==1 then
  13.                             hook.Run("phm_h5",pl)
  14.                         else
  15.                             if pl.hMenuPage6==1 then
  16.                                 hook.Run("phm_h6",pl);
  17.                             else
  18.                                 if pl.hMenuPage7==1 then
  19.                                     hook.Run("phm_h6",pl);
  20.                                 else
  21.                                     if pl.hMenuPage7==1 then
  22.                                         hook.Run("phm_h7",pl)
  23.                                     else
  24.                                         if pl.hMenuPage8==1 then
  25.                                             hook.Run("phm_h8",pl);
  26.                                         else
  27.                                             if pl.hMenuPage9==1 then
  28.                                                 hook.Run("phm_h9",pl);
  29.                                             else
  30.                                                 if pl.hMenuPage10==1 then
  31.                                                     hook.Run("phm_h10",pl);
  32.                                                 else
  33.                                                     hook.Run("phm_h1",pl)
  34.                                                 end
  35.                                             end
  36.                                         end
  37.                                     end
  38.                                 end
  39.                             end
  40.                         end
  41.                     end
  42.                 end
  43.             end
  44.             pl.MenuOpen=1;
  45.         else
  46.             if pl:Team() == 2 then
  47.                 if pl.MenuPage2==1 then
  48.                     hook.Run("phm_p2",pl)
  49.                 else
  50.                     if pl.MenuPage3==1 then
  51.                         hook.Run("phm_p3",pl)
  52.                     else
  53.                         if pl.MenuPage4==1 then
  54.                             hook.Run("phm_p4",pl)
  55.                         else
  56.                             if pl.MenuPage5==1 then
  57.                                 hook.Run("phm_p5",pl)
  58.                             else
  59.                                 if pl.MenuPage6==1 then
  60.                                     hook.Run("phm_p6",pl);
  61.                                 else
  62.                                     if pl.MenuPage7==1 then
  63.                                         hook.Run("phm_p7",pl);
  64.                                     else
  65.                                         if pl.MenuPage8==1 then
  66.                                             hook.Run("phm_p8",pl);
  67.                                         else
  68.                                             if pl.MenuPage9==1 then
  69.                                                 hook.Run("phm_p9",pl);
  70.                                             else
  71.                                                 if pl.MenuPage10==1 then
  72.                                                     hook.Run("phm_p10",pl);
  73.                                                 else
  74.                                                     if pl.MenuPage11==1 then
  75.                                                         hook.Run("phm_p5",pl)
  76.                                                     else
  77.                                                         hook.Run("phm_p1",pl)
  78.                                                     end
  79.                                                 end
  80.                                             end
  81.                                         end
  82.                                     end
  83.                                 end
  84.                             end
  85.                         end
  86.                     end
  87.                 end
  88.                 pl.MenuOpen=1;
  89.             else
  90.                 chat.AddText(Color(214,0,0),"[Taunt Menu]", Color(0,225,126)," You must be in one of the teams to use the menu.")
  91.             end
  92.         end
  93.     end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement