Advertisement
Rex-Interactive

Navex Spawn - sv_admin.lua

Sep 24th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 7.06 KB | None | 0 0
  1. -- Разработано Rex Interactive / MR.REX --
  2.  
  3. local ADMIN_ACCESS = {
  4.     "76561198084777060", -- MR.REX
  5.     "76561198397977075", -- MR.MAKSIM
  6.     "76561198113116493", -- MR.ZERO
  7.     "76561198310625158", -- HACKING
  8.     "76561198277006935", -- Bagz
  9.     "76561198373754393", -- Yotex
  10.     "76561198267493338", -- Tarn
  11.     "76561198311202047", -- Rin
  12. }
  13.  
  14. util.AddNetworkString( "navex_spawn_visual" );
  15.  
  16. function check_admin_list(ply)
  17.     navex_spawn_access = false;
  18.    
  19.     if ply:IsAdmin() or ply:IsSuperAdmin() then
  20.         navex_spawn_access = true;
  21.     end
  22.  
  23.     -- Вот тут должна быть РАБОЧАЯ система свой/чужой
  24.     -- Должно возвращать true при совпадении, при false менюху не откроет.
  25.  
  26.     return navex_spawn_access;
  27. end
  28.  
  29. concommand.Add( "navex_spawn_173", function( ply, cmd, args )
  30.     if check_admin_list(ply) == true then
  31.         ply:SetSCP173(); end
  32. end )
  33.  
  34. concommand.Add( "navex_spawn_049", function( ply, cmd, args )
  35.     if check_admin_list(ply) == true then
  36.         ply:SetSCP049(); end
  37. end )
  38.  
  39. concommand.Add( "navex_spawn_106", function( ply, cmd, args )
  40.     if check_admin_list(ply) == true then
  41.         ply:SetSCP106(); end
  42. end )
  43.  
  44. concommand.Add( "navex_spawn_457", function( ply, cmd, args )
  45.     if check_admin_list(ply) == true then
  46.         ply:SetSCP457(); end
  47. end )
  48.  
  49. concommand.Add( "navex_spawn_966", function( ply, cmd, args )
  50.     if check_admin_list(ply) == true then
  51.         ply:SetSCP966(); end
  52. end )
  53.  
  54. concommand.Add( "navex_spawn_096", function( ply, cmd, args )
  55.     if check_admin_list(ply) == true then
  56.         ply:SetSCP096(); end
  57. end )
  58.  
  59. concommand.Add( "navex_spawn_035", function( ply, cmd, args )
  60.     if check_admin_list(ply) == true then
  61.         ply:SetSCP035(); end
  62. end )
  63.  
  64. concommand.Add( "navex_spawn_682", function( ply, cmd, args )
  65.     if check_admin_list(ply) == true then
  66.         ply:SetSCP682(); end
  67. end )
  68.  
  69. concommand.Add( "navex_spawn_939", function( ply, cmd, args )
  70.     if check_admin_list(ply) == true then
  71.         ply:SetSCP939(); end
  72. end )
  73.  
  74. concommand.Add( "navex_spawn_993", function( ply, cmd, args )
  75.     if check_admin_list(ply) == true then
  76.         ply:SetSCP993(); end
  77. end )
  78.  
  79. concommand.Add( "navex_spawn_999", function( ply, cmd, args )
  80.     if check_admin_list(ply) == true then
  81.         ply:SetSCP999(); end
  82. end )
  83.  
  84. concommand.Add( "navex_spawn_166", function( ply, cmd, args )
  85.     if check_admin_list(ply) == true then
  86.         ply:SetSCP166(); end
  87. end )
  88.  
  89. concommand.Add( "navex_spawn_1048", function( ply, cmd, args )
  90.     if check_admin_list(ply) == true then
  91.         ply:SetSCP1048(); end
  92. end )
  93.  
  94. concommand.Add( "navex_spawn_1048a", function( ply, cmd, args )
  95.     if check_admin_list(ply) == true then
  96.         ply:SetSCP1048a(); end
  97. end )
  98.  
  99. concommand.Add( "navex_spawn_066", function( ply, cmd, args )
  100.     if check_admin_list(ply) == true then
  101.         ply:SetSCP066(); end
  102. end )
  103.  
  104. -- КЛАСС-Д ПЕРСОНАЛ
  105.  
  106. concommand.Add( "navex_spawn_classd", function( ply, cmd, args )
  107.     if check_admin_list(ply) == true then
  108.         ply:UnSpectate();
  109.         ply:StripWeapons();
  110.         ply:RemoveAllAmmo();
  111.         ply:ApplyRoleStats(ALLCLASSES["classds"]["roles"][1]); end
  112. end )
  113.  
  114. concommand.Add( "navex_spawn_classd_vet", function( ply, cmd, args )
  115.     if check_admin_list(ply) == true then
  116.         ply:UnSpectate();
  117.         ply:StripWeapons();
  118.         ply:RemoveAllAmmo();
  119.         ply:ApplyRoleStats(ALLCLASSES["classds"]["roles"][2]); end
  120. end )
  121.  
  122. concommand.Add( "navex_spawn_classd_thief", function( ply, cmd, args )
  123.     if check_admin_list(ply) == true then
  124.         ply:UnSpectate();
  125.         ply:StripWeapons();
  126.         ply:RemoveAllAmmo();
  127.         ply:ApplyRoleStats(ALLCLASSES["classds"]["roles"][3]); end
  128. end )
  129.  
  130. concommand.Add( "navex_spawn_classd_killer", function( ply, cmd, args )
  131.     if check_admin_list(ply) == true then
  132.         ply:UnSpectate();
  133.         ply:StripWeapons();
  134.         ply:RemoveAllAmmo();
  135.         ply:ApplyRoleStats(ALLCLASSES["classds"]["roles"][4]); end
  136. end )
  137.  
  138. -- НАУЧНЫЙ ПЕРСОНАЛ
  139.  
  140. concommand.Add( "navex_spawn_resercher", function( ply, cmd, args )
  141.     if check_admin_list(ply) == true then
  142.         ply:UnSpectate();
  143.         ply:StripWeapons();
  144.         ply:RemoveAllAmmo();
  145.         ply:ApplyRoleStats(ALLCLASSES["researchers"]["roles"][1]); end
  146. end )
  147.  
  148. concommand.Add( "navex_spawn_resercher_med", function( ply, cmd, args )
  149.     if check_admin_list(ply) == true then
  150.         ply:UnSpectate();
  151.         ply:StripWeapons();
  152.         ply:RemoveAllAmmo();
  153.         ply:ApplyRoleStats(ALLCLASSES["researchers"]["roles"][2]); end
  154. end )
  155.  
  156. -- Служба безопасности
  157.  
  158. concommand.Add( "navex_spawn_guard", function( ply, cmd, args )
  159.     if check_admin_list(ply) == true then
  160.         ply:UnSpectate();
  161.         ply:StripWeapons();
  162.         ply:RemoveAllAmmo();
  163.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][1]); end
  164. end )
  165.  
  166. concommand.Add( "navex_spawn_guard_com", function( ply, cmd, args )
  167.     if check_admin_list(ply) == true then
  168.         ply:UnSpectate();
  169.         ply:StripWeapons();
  170.         ply:RemoveAllAmmo();
  171.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][2]); end
  172. end )
  173.  
  174. -- МОГ
  175.  
  176. concommand.Add( "navex_spawn_mtf", function( ply, cmd, args )
  177.     if check_admin_list(ply) == true then
  178.         ply:UnSpectate();
  179.         ply:StripWeapons();
  180.         ply:RemoveAllAmmo();
  181.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][3]); end
  182. end )
  183.  
  184. concommand.Add( "navex_spawn_mtf_med", function( ply, cmd, args )
  185.     if check_admin_list(ply) == true then
  186.         ply:UnSpectate();
  187.         ply:StripWeapons();
  188.         ply:RemoveAllAmmo();
  189.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][4]); end
  190. end )
  191.  
  192. concommand.Add( "navex_spawn_mtfl", function( ply, cmd, args )
  193.     if check_admin_list(ply) == true then
  194.         ply:UnSpectate();
  195.         ply:StripWeapons();
  196.         ply:RemoveAllAmmo();
  197.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][5]); end
  198. end )
  199.  
  200. concommand.Add( "navex_spawn_hazmat", function( ply, cmd, args )
  201.     if check_admin_list(ply) == true then
  202.         ply:UnSpectate();
  203.         ply:StripWeapons();
  204.         ply:RemoveAllAmmo();
  205.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][6]); end
  206. end )
  207.  
  208. concommand.Add( "navex_spawn_mtf_com", function( ply, cmd, args )
  209.     if check_admin_list(ply) == true then
  210.         ply:UnSpectate();
  211.         ply:StripWeapons();
  212.         ply:RemoveAllAmmo();
  213.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][7]); end
  214. end )
  215.  
  216. -- Директор комплекса
  217.  
  218. concommand.Add( "navex_spawn_sd", function( ply, cmd, args )
  219.     if check_admin_list(ply) == true then
  220.         ply:UnSpectate();
  221.         ply:StripWeapons();
  222.         ply:RemoveAllAmmo();
  223.         ply:ApplyRoleStats(ALLCLASSES["security"]["roles"][8]); end
  224. end )
  225.  
  226. -- Хаос
  227.  
  228. concommand.Add( "navex_spawn_chaos", function( ply, cmd, args )
  229.     if check_admin_list(ply) == true then
  230.         ply:UnSpectate();
  231.         ply:StripWeapons();
  232.         ply:RemoveAllAmmo();
  233.         ply:ApplyRoleStats(ALLCLASSES["support"]["roles"][2]); end
  234. end )
  235.  
  236. -- МОГ ЭПСИЛОН
  237.  
  238. concommand.Add( "navex_spawn_ntf", function( ply, cmd, args )
  239.     if check_admin_list(ply) == true then
  240.         ply:UnSpectate();
  241.         ply:StripWeapons();
  242.         ply:RemoveAllAmmo();
  243.         ply:ApplyRoleStats(ALLCLASSES["support"]["roles"][1]); end
  244. end )
  245.  
  246. -- Визуальная составляющая
  247.  
  248. concommand.Add( "navex_spawn", function( ply, cmd, args )
  249.     if check_admin_list(ply) == true then
  250.         net.Start( "navex_spawn_visual" );
  251.         net.Send( ply );
  252.     end
  253. end )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement