Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.86 KB | None | 0 0
  1. if SERVER then
  2. util.AddNetworkString("open_boost_menu") -- Типа функции для - открытия fps menu
  3. end
  4.  
  5. stop = false
  6. r = 200
  7. pause = false
  8.  
  9. if CLIENT then
  10.  
  11. function FPSBoost()
  12.  
  13. local frame = vgui.Create("DFrame")
  14. frame:SetSize(ScrW(),ScrH())
  15. frame:Center()
  16. frame:SetVisible(true)
  17. frame:ShowCloseButton(false)
  18. frame:SetDraggable(false)
  19. frame:SetTitle("")
  20. frame.Paint = function(s , w , h)
  21.  
  22. draw.RoundedBox(0,0,0,w,h,Color(0,0,0,0))
  23.  
  24. end
  25. frame:MakePopup()
  26.  
  27. local startBut = vgui.Create("DButton", frame)
  28. startBut:SetText( "" )
  29. startBut:SetSize(ScrW(),ScrH())
  30. startBut:SetPos(0, 0)
  31. startBut.DoClick = function()
  32.  
  33. RunConsoleCommand("props_break_max_pieces", "0" )
  34. RunConsoleCommand("cl_cmdrate", "66" )
  35. RunConsoleCommand("cl_interp_ratio", "2" )
  36. RunConsoleCommand("r_threaded_particles", "1" )
  37. RunConsoleCommand("cl_updaterate", "66" )
  38. RunConsoleCommand("r_drawtracers", "0")
  39. RunConsoleCommand("r_eyegloss", "0")
  40. RunConsoleCommand("r_eyemove", "0")
  41. RunConsoleCommand("r_dynamic", "0")
  42. RunConsoleCommand("r_teeth", "0")
  43. RunConsoleCommand("cl_smooth", "0")
  44. RunConsoleCommand("r_propsmaxdist", "0")
  45. RunConsoleCommand("rate", "100000")
  46. RunConsoleCommand("cl_interp", "0.3")
  47. RunConsoleCommand("r_threaded_client_shadow_manager", "1")
  48. RunConsoleCommand("cl_detaildist", "0")
  49. RunConsoleCommand("r_decal_cullsize", "1")
  50. RunConsoleCommand("violence_ablood", "0")
  51. RunConsoleCommand("rope_smooth", "0")
  52. RunConsoleCommand("r_waterdrawreflection", "0")
  53. RunConsoleCommand("r_waterforcereflectentities", "0")
  54. RunConsoleCommand("r_decals", "0")
  55. RunConsoleCommand("studio_queue_mode", "1")
  56. RunConsoleCommand("r_ropetranslucent", "0")
  57. RunConsoleCommand("r_drawmodeldecals", "0")
  58. RunConsoleCommand("r_3dsky", "1")
  59. RunConsoleCommand("r_maxmodeldecal", "0")
  60. RunConsoleCommand("r_drawflecks", "0")
  61. RunConsoleCommand("cl_threaded_client_leaf_system", "1")
  62. RunConsoleCommand("cl_show_splashes", "0")
  63. RunConsoleCommand("r_worldlights", "0")
  64. RunConsoleCommand("r_threaded_renderables", "1")
  65. RunConsoleCommand("cl_forcepreload", "1")
  66. RunConsoleCommand("mat_queue_mode", "2")
  67. RunConsoleCommand("snd_mix_async", "1")
  68. RunConsoleCommand("cl_phys_props_enable", "0")
  69. RunConsoleCommand("muzzleflash_light", "0")
  70. RunConsoleCommand("cl_wpn_sway_interp", "0")
  71. RunConsoleCommand("in_usekeyboardsampletime", "0")
  72. RunConsoleCommand("cl_detailfade", "800")
  73. RunConsoleCommand("r_lod", "0")
  74. RunConsoleCommand("r_fastzreject", "-1")
  75. RunConsoleCommand("r_flex", "0")
  76. RunConsoleCommand("cl_ejectbrass", "0")
  77. RunConsoleCommand("r_maxdlights", "0")
  78. RunConsoleCommand("violence_agibs", "0")
  79. RunConsoleCommand("r_shadowmaxrendered", "0")
  80. RunConsoleCommand("r_shadowrendertotexture", "0")
  81. RunConsoleCommand("r_queued_ropes", "1")
  82. RunConsoleCommand("mat_shadowstate", "0")
  83. RunConsoleCommand("r_drawdetailprops", "0")
  84. RunConsoleCommand("cl_phys_props_max", "0")
  85. RunConsoleCommand("r_waterdrawrefraction", "1")
  86. RunConsoleCommand("r_shadows", "1")
  87. RunConsoleCommand("gmod_mcore_test", "1")
  88. RunConsoleCommand("violence_hgibs", "0")
  89. RunConsoleCommand("cl_threaded_bone_setup", "1")
  90. RunConsoleCommand("datacachesize", "2048")
  91. RunConsoleCommand("mem_max_heapsize_dedicated", "4096")
  92. RunConsoleCommand("sv_forcepreload", "1")
  93. RunConsoleCommand("ppm2_reload")
  94. RunConsoleCommand("ppm2_require")
  95. RunConsoleCommand("SprayMesh_EnableVideos", "1")
  96.  
  97.  
  98. frame:Remove()
  99. startBut:Remove()
  100.  
  101. end
  102. startBut.Paint = function(s , w , h)
  103.  
  104. if !stop then
  105. stop = true
  106. timer.Simple(0.01 , function()
  107. if !pause then
  108. r = r - 1
  109. if r == 60 then
  110. r = 60
  111. pause = true
  112. end
  113. end
  114. if pause then
  115. r = r + 1
  116. if r == 200 then
  117. r = 200
  118. pause = false
  119. end
  120. end
  121.  
  122. stop = false
  123. end)
  124. end
  125.  
  126. colors = Color(255,97,0,255)
  127.  
  128.  
  129. draw.RoundedBox(0,0,0,w,h,Color(0,0,0,200))
  130.  
  131. draw.Text( {
  132. text = "Нажмите в любую точку, чтобы начать играть.",
  133. pos = { ScrW()/2, ScrH()/2 },
  134. setsize = {100,100},
  135. color = colors,
  136. font = "SuperPuperFontByCitizen",
  137. xalign = TEXT_ALIGN_CENTER, -- Horizontal Alignment
  138. yalign = TEXT_ALIGN_CENTER, -- Vertical Alignment
  139.  
  140. } )
  141.  
  142.  
  143.  
  144. end
  145.  
  146.  
  147.  
  148.  
  149. end
  150.  
  151. net.Receive("open_boost_menu",FPSBoost)
  152. end
  153.  
  154. if SERVER then -- Серверная часть
  155. concommand.Add( "fpsboost", function( ply, cmd, args ) -- Команда fpsboost для консоли
  156. net.Start("open_boost_menu") -- Принятие переменной на серверной части
  157. net.Send( ply )
  158. end )
  159.  
  160. concommand.Add( "checknumber", function( ply, cmd, args ) -- Команда была создана для проверки переменной, у какого игрока, какая
  161. for k , v in pairs(player.GetAll()) do
  162. print(v:Nick().." "..v:GetPData("OUR_ADDON_FPSBOOST", 1))
  163. end
  164. end )
  165.  
  166. hook.Add( "PlayerSay", "FPSBoost", function( ply, text, public )
  167. text = string.lower( text ) -- Команда !fpsboost в чате
  168. if ( text == "!fpsboost" ) then
  169. net.Start("open_boost_menu") -- Принятие переменной на серверной части
  170. net.Send( ply )
  171. return ""
  172. end
  173. end )
  174.  
  175. net.Receive( "SendDataFPS", SendDataFPS )
  176. end
  177.  
  178.  
  179.  
  180.  
  181. local function spawn( ply )
  182. net.Start("open_boost_menu") -- Принятие переменной на серверной части
  183. net.Send( ply )
  184. end
  185. hook.Add( "PlayerInitialSpawn", "PlayerInitialSpawnsome_unique_name", spawn )
  186.  
  187. surface.CreateFont( "SuperPuperFontByCitizen", {
  188. font = "Arial", -- Use the font-name which is shown to you by your operating system Font Viewer, not the file name
  189. extended = false,
  190. size = 30,
  191. weight = 500,
  192. blursize = 0,
  193. scanlines = 0,
  194. antialias = true,
  195. underline = false,
  196. italic = false,
  197. strikeout = false,
  198. symbol = false,
  199. rotary = false,
  200. shadow = false,
  201. additive = false,
  202. outline = false,
  203. } )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement