Advertisement
Guest User

Untitled

a guest
Jul 20th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.36 KB | None | 0 0
  1. local SkyrizeWeaponsHUD = {
  2. [1] = {
  3. ["weapon_physcannon"] = true,
  4. ["weapon_physgun"] = true,
  5. ["weapon_fists"] = true,
  6. ["weapon_sillyzombieclaw_v2"] = true,
  7. ["weapon_sillyzombieclaw"] = true,
  8. ["m9k_knife"] = true,
  9. ["weapon_katana"] = true,
  10. ["049_uranium"] = true,
  11. ["106_uranium"] = true,
  12. ["682_uranium"] = true,
  13. ["096_uranium"] = true,
  14. ["173_uranium"] = true,
  15. ["035_uranium"] = true,
  16. ["738_uranium"] = true,
  17. ["053_uranium"] = true,
  18. ["017_uranium"] = true,
  19. ["ia_uranium"] = true,
  20. ["066_uranium"] = true,
  21. ["079_uranium"] = true,
  22. ["1128_uranium"] = true,
  23. ["087_uranium"] = true,
  24. ["fas2_machete"] = true,
  25.  
  26. },
  27. [2] = {
  28. ["mains"] = true,
  29. },
  30. [3] = {
  31. ["nightvision"] = true,
  32. ["gmod_tool"] = true,
  33. ["weapon_camo"] = true,
  34. ["weapon_keycard_level1"] = true,
  35. ["weapon_keycard_level2"] = true,
  36. ["weapon_keycard_level3"] = true,
  37. ["weapon_keycard_level4"] = true,
  38. ["weapon_keycard_level5"] = true,
  39. },
  40. [4] = {
  41. ["salute"] = true,
  42. ["fas2_glock20"] = true,
  43. ["fas2_deagle"] = true,
  44. ["fas2_m1911"] = true,
  45. ["fas2_ots33"] = true,
  46. ["fas2_p226"] = true,
  47. ["fas2_ragingbull"] = true,
  48. ["weapon_medkit"] = true,
  49. ["fas2_ifak"] = true,
  50. ["instance_uranium"] = true,
  51. ["broom"] = true,
  52. },
  53. [5] = {
  54. ["weapon_keypadchecker"] = true,
  55. ["door_ram"] = true,
  56. ["weaponchecker"] = true,
  57. ["fas2_ak12"] = true,
  58. ["fas2_ak47"] = true,
  59. ["fas2_ak74"] = true,
  60. ["fas2_an94"] = true,
  61. ["fas2_famas"] = true,
  62. ["fas2_g36c"] = true,
  63. ["fas2_g3"] = true,
  64. ["fas2_galil"] = true,
  65. ["fas2_uzi"] = true,
  66. ["fas2_mac11"] = true,
  67. ["fas2_m14"] = true,
  68. ["fas2_ks23"] = true,
  69. ["fas2_m21"] = true,
  70. ["fas2_m24"] = true,
  71. ["fas2_m3s90"] = true,
  72. ["fas2_m4a1"] = true,
  73. ["fas2_m82"] = true,
  74. ["fas2_mp5a5"] = true,
  75. ["fas2_mp5k"] = true,
  76. ["fas2_mp5sd6"] = true,
  77. ["fas2_pp19"] = true,
  78. ["fas2_rem870"] = true,
  79. ["fas2_rpk"] = true,
  80. ["fas2_rk95"] = true,
  81. ["fas2_sg550"] = true,
  82. ["fas2_sg552"] = true,
  83. ["fas2_sks"] = true,
  84. ["fas2_sr25"] = true,
  85. ["stunstick"] = true,
  86. },
  87.  
  88. }
  89. local SkyrizeHUDWeapon_Names = {
  90. ["weapon_physcannon"] = "Gravity Gun",
  91. ["swep_radiodevice"] = "Radio",
  92. ["uranium_detecteur_metaux"] = "Fouille",
  93. ["uranium_tazer"] = "Tazer",
  94. ["broom"] = "Balais",
  95. ["fas2_machete"] = "Machete",
  96. ["1128_uranium"] = "Arme 1128",
  97. ["049_uranium"] = "Arme 049",
  98. ["087_uranium"] = "Arme 087",
  99. ["053_uranium"] = "Arme 053",
  100. ["017_uranium"] = "Arme 017",
  101. ["106_uranium"] = "Arme 106",
  102. ["682_uranium"] = "Arme 682",
  103. ["096_uranium"] = "Arme 096",
  104. ["173_uranium"] = "Arme 173",
  105. ["066_uranium"] = "Arme 066",
  106. ["035_uranium"] = "Arme 035",
  107. ["738_uranium"] = "Arme 738",
  108. ["ia_uranium"] = "Arme IA",
  109. ["079_uranium"] = "Arme 079",
  110. ["weapon_camo"] = "Camouflage",
  111. ["m9k_knife"] = "Couteau",
  112. ["instance_uranium"] = "S-Instance",
  113. ["weapon_katana"] = "Katana",
  114. ["gmod_camera"] = "Camera",
  115. ["gmod_tool"] = "Outils",
  116. ["fas2_glock20"] = "GLOCK",
  117. ["fas2_deagle"] = "DEAGLE",
  118. ["fas2_m1911"] = "M1911",
  119. ["fas2_ots33"] = "OTS33",
  120. ["fas2_p226"] = "P226",
  121. ["stunstick"] = "Matraque",
  122. ["fas2_ak12"] = "AK12",
  123. ["fas2_ak47"] = "AK47",
  124. ["fas2_ak74"] = "AK74",
  125. ["fas2_an94"] = "AN94",
  126. ["fas2_famas"] = "FAMAS",
  127. ["fas2_g36c"] = "G36",
  128. ["fas2_g3"] = "G3A3",
  129. ["fas2_galil"] = "GALIL",
  130. ["fas2_uzi"] = "UZI",
  131. ["fas2_mac11"] = "MAC11",
  132. ["fas2_m14"] = "M14",
  133. ["fas2_ks23"] = "KCS23",
  134. ["fas2_m21"] = "M21",
  135. ["fas2_m24"] = "M24",
  136. ["fas2_m3s90"] = "M3S90",
  137. ["fas2_m4a1"] = "M4A1",
  138. ["fas2_m82"] = "M82",
  139. ["fas2_mp5a5"] = "MP5A5",
  140. ["fas2_mp5k"] = "MP5K",
  141. ["fas2_mp5sd6"] = "MP5SD6",
  142. ["fas2_pp19"] = "PP-BIZON",
  143. ["fas2_rem870"] = "REMINGTON",
  144. ["fas2_rpk"] = "RPK",
  145. ["fas2_rk95"] = "RK95",
  146. ["fas2_sg550"] = "SG550",
  147. ["fas2_sg552"] = "SG552",
  148. ["fas2_sks"] = "SKS",
  149. ["fas2_sr25"] = "SR25",
  150. ["fas2_m67"] = "GRENADE",
  151. ["fas2_ragingbull"] = "Raging Bull",
  152. ["weapon_physgun"] = "Physics Gun",
  153. ["mains"] = "MAINS",
  154. ["pocket"] = "Poche",
  155. ["weapon_medkit"] = "Trousse",
  156. ["fas2_ifak"] = "Kit",
  157. ["weapon_fists"] = "Poings",
  158. ["weapon_keypadchecker"] = "Keypad Checker",
  159. ["door_ram"] = "DoorRam",
  160. ["weaponchecker"] = "Fouille",
  161. ["weapon_keycard_level1"] = "Carte n°1",
  162. ["weapon_keycard_level2"] = "Carte n°2",
  163. ["weapon_keycard_level3"] = "Carte n°3",
  164. ["weapon_keycard_level4"] = "Carte n°4",
  165. ["weapon_keycard_level5"] = "Carte n°5",
  166. ["salute"] = "GAV",
  167. ["weapon_sillyzombieclaw_v2"] = "Griffe",
  168. ["weapon_sillyzombieclaw"] = "Griffe",
  169. ["nightvision"] = "Vision Nuit",
  170. }
  171.  
  172. local nexttime = 0
  173. local selected = 0
  174.  
  175. local function SkyrizeCheckInTable(wep)
  176. local aaa = {}
  177. for k,v in SortedPairs(SkyrizeWeaponsHUD) do
  178. for a,b in SortedPairs(v) do
  179. if a == wep then
  180. return false
  181. end
  182. end
  183. end
  184.  
  185. return true
  186. end
  187.  
  188. local function SkyrizeEquipSelected(selc)
  189. local WepTbl = {}
  190. for k,v in SortedPairs(LocalPlayer():GetWeapons()) do
  191. for a,b in SortedPairs(SkyrizeWeaponsHUD) do
  192. if b[v:GetClass()] then
  193. if !WepTbl[a] then WepTbl[a] = {} end;
  194. table.insert(WepTbl[a], v:GetClass())
  195. else
  196. if SkyrizeCheckInTable(v:GetClass()) then
  197. if !WepTbl[6] then WepTbl[6] = {} end;
  198. if not table.HasValue(WepTbl[6], v:GetClass()) then
  199. table.insert(WepTbl[6], v:GetClass())
  200. end
  201. end
  202. end
  203. end
  204. end
  205. local id_tbl = {}
  206. local uid = 1
  207. for k,v in SortedPairs(WepTbl) do
  208. for a,b in SortedPairs(v) do
  209. id_tbl[b] = uid
  210. uid = uid +1
  211. end
  212. end
  213. for k,v in SortedPairs(id_tbl) do
  214. if v == selc then
  215. RunConsoleCommand("use",k)
  216. surface.PlaySound("ambient/water/rain_drip1.wav")
  217. return
  218. end
  219. end
  220.  
  221. end
  222.  
  223.  
  224. hook.Add("HUDPaint", "SkyrizeHUDWeapon", function(len, ply)
  225. if LocalPlayer().ShowWeaponMenu then
  226. local WepTbl = {}
  227. for k,v in SortedPairs(LocalPlayer():GetWeapons()) do
  228. for a,b in SortedPairs(SkyrizeWeaponsHUD) do
  229.  
  230. if b[v:GetClass()] then
  231. if !WepTbl[a] then WepTbl[a] = {} end;
  232. table.insert(WepTbl[a], v:GetClass())
  233. else
  234. if SkyrizeCheckInTable(v:GetClass()) then
  235. if !WepTbl[6] then WepTbl[6] = {} end;
  236. if not table.HasValue(WepTbl[6], v:GetClass()) then
  237. table.insert(WepTbl[6], v:GetClass())
  238. end
  239. end
  240. end
  241. end
  242. end
  243.  
  244. local id_tbl = {}
  245. local uid = 1
  246. for k,v in SortedPairs(WepTbl) do
  247. for a,b in SortedPairs(v) do
  248. id_tbl[b] = uid
  249. uid = uid +1
  250. end
  251. end
  252.  
  253. for i=1, 6 do
  254. draw.RoundedBox(0,2, 125+40+40*(i-1), 23,35, Color(48,48,48))
  255. draw.SimpleText(i, "Trebuchet24", 15-5/2+1, 125+40*i+20, Color(0,147,255),1,1)
  256. if WepTbl[i] then
  257. local b = 0
  258. for k,v in SortedPairs(WepTbl[i]) do
  259. if selected == id_tbl[v] then
  260. draw.RoundedBox(0,25+130*b, 125+40*i, 125,35, Color(0,147,255))
  261. else
  262. draw.RoundedBox(0,25+130*b, 125+40*i, 125,35, Color(142,142,142))
  263. end
  264. if SkyrizeHUDWeapon_Names[v] then
  265. draw.SimpleText(string.upper(SkyrizeHUDWeapon_Names[v]), "Trebuchet24", 5+40/2+130*b+125/2, 125+40*i+20, Color(255,255,255),1,1)
  266. else
  267. draw.SimpleText(string.upper(v), "Trebuchet24", 5+40/2+130*b+125/2, 125+40*i+20, Color(255,255,255),1,1)
  268. end
  269. b = b +1
  270. end
  271. end
  272. end
  273. if nexttime <= CurTime() then
  274. LocalPlayer().ShowWeaponMenu = nil
  275. nexttime = CurTime() +3
  276. end
  277.  
  278. end
  279. end)
  280.  
  281. hook.Add("PlayerBindPress", "bind", function(ply, bind, pressed)
  282. if not IsValid(ply) then return end
  283. if bind == "invnext" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
  284. if (!ply:InVehicle()) then
  285. ply.ShowWeaponMenu = true
  286. if selected < table.Count(ply:GetWeapons()) then
  287. selected = selected +1
  288. else
  289. selected = 1
  290. end
  291. end
  292. return true
  293. elseif bind == "invprev" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
  294. if (!ply:InVehicle()) then
  295. ply.ShowWeaponMenu = true
  296. if selected > 1 then
  297. selected = selected -1
  298. else
  299. selected = table.Count(ply:GetWeapons())
  300. end
  301. end
  302. return true
  303. elseif bind == "+attack" then
  304. if ply.ShowWeaponMenu then
  305. SkyrizeEquipSelected(selected)
  306. return true
  307. end
  308. elseif string.find(bind, "slot") then
  309. return true
  310. end
  311.  
  312. end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement