Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local SkyrizeWeaponsHUD = {
- [1] = {
- ["weapon_physcannon"] = true,
- ["weapon_physgun"] = true,
- ["weapon_fists"] = true,
- ["weapon_sillyzombieclaw_v2"] = true,
- ["weapon_sillyzombieclaw"] = true,
- ["m9k_knife"] = true,
- ["weapon_katana"] = true,
- ["049_uranium"] = true,
- ["106_uranium"] = true,
- ["682_uranium"] = true,
- ["096_uranium"] = true,
- ["173_uranium"] = true,
- ["035_uranium"] = true,
- ["738_uranium"] = true,
- ["053_uranium"] = true,
- ["017_uranium"] = true,
- ["ia_uranium"] = true,
- ["066_uranium"] = true,
- ["079_uranium"] = true,
- ["1128_uranium"] = true,
- ["087_uranium"] = true,
- ["fas2_machete"] = true,
- },
- [2] = {
- ["mains"] = true,
- },
- [3] = {
- ["nightvision"] = true,
- ["gmod_tool"] = true,
- ["weapon_camo"] = true,
- ["weapon_keycard_level1"] = true,
- ["weapon_keycard_level2"] = true,
- ["weapon_keycard_level3"] = true,
- ["weapon_keycard_level4"] = true,
- ["weapon_keycard_level5"] = true,
- },
- [4] = {
- ["salute"] = true,
- ["fas2_glock20"] = true,
- ["fas2_deagle"] = true,
- ["fas2_m1911"] = true,
- ["fas2_ots33"] = true,
- ["fas2_p226"] = true,
- ["fas2_ragingbull"] = true,
- ["weapon_medkit"] = true,
- ["fas2_ifak"] = true,
- ["instance_uranium"] = true,
- ["broom"] = true,
- },
- [5] = {
- ["weapon_keypadchecker"] = true,
- ["door_ram"] = true,
- ["weaponchecker"] = true,
- ["fas2_ak12"] = true,
- ["fas2_ak47"] = true,
- ["fas2_ak74"] = true,
- ["fas2_an94"] = true,
- ["fas2_famas"] = true,
- ["fas2_g36c"] = true,
- ["fas2_g3"] = true,
- ["fas2_galil"] = true,
- ["fas2_uzi"] = true,
- ["fas2_mac11"] = true,
- ["fas2_m14"] = true,
- ["fas2_ks23"] = true,
- ["fas2_m21"] = true,
- ["fas2_m24"] = true,
- ["fas2_m3s90"] = true,
- ["fas2_m4a1"] = true,
- ["fas2_m82"] = true,
- ["fas2_mp5a5"] = true,
- ["fas2_mp5k"] = true,
- ["fas2_mp5sd6"] = true,
- ["fas2_pp19"] = true,
- ["fas2_rem870"] = true,
- ["fas2_rpk"] = true,
- ["fas2_rk95"] = true,
- ["fas2_sg550"] = true,
- ["fas2_sg552"] = true,
- ["fas2_sks"] = true,
- ["fas2_sr25"] = true,
- ["stunstick"] = true,
- },
- }
- local SkyrizeHUDWeapon_Names = {
- ["weapon_physcannon"] = "Gravity Gun",
- ["swep_radiodevice"] = "Radio",
- ["uranium_detecteur_metaux"] = "Fouille",
- ["uranium_tazer"] = "Tazer",
- ["broom"] = "Balais",
- ["fas2_machete"] = "Machete",
- ["1128_uranium"] = "Arme 1128",
- ["049_uranium"] = "Arme 049",
- ["087_uranium"] = "Arme 087",
- ["053_uranium"] = "Arme 053",
- ["017_uranium"] = "Arme 017",
- ["106_uranium"] = "Arme 106",
- ["682_uranium"] = "Arme 682",
- ["096_uranium"] = "Arme 096",
- ["173_uranium"] = "Arme 173",
- ["066_uranium"] = "Arme 066",
- ["035_uranium"] = "Arme 035",
- ["738_uranium"] = "Arme 738",
- ["ia_uranium"] = "Arme IA",
- ["079_uranium"] = "Arme 079",
- ["weapon_camo"] = "Camouflage",
- ["m9k_knife"] = "Couteau",
- ["instance_uranium"] = "S-Instance",
- ["weapon_katana"] = "Katana",
- ["gmod_camera"] = "Camera",
- ["gmod_tool"] = "Outils",
- ["fas2_glock20"] = "GLOCK",
- ["fas2_deagle"] = "DEAGLE",
- ["fas2_m1911"] = "M1911",
- ["fas2_ots33"] = "OTS33",
- ["fas2_p226"] = "P226",
- ["stunstick"] = "Matraque",
- ["fas2_ak12"] = "AK12",
- ["fas2_ak47"] = "AK47",
- ["fas2_ak74"] = "AK74",
- ["fas2_an94"] = "AN94",
- ["fas2_famas"] = "FAMAS",
- ["fas2_g36c"] = "G36",
- ["fas2_g3"] = "G3A3",
- ["fas2_galil"] = "GALIL",
- ["fas2_uzi"] = "UZI",
- ["fas2_mac11"] = "MAC11",
- ["fas2_m14"] = "M14",
- ["fas2_ks23"] = "KCS23",
- ["fas2_m21"] = "M21",
- ["fas2_m24"] = "M24",
- ["fas2_m3s90"] = "M3S90",
- ["fas2_m4a1"] = "M4A1",
- ["fas2_m82"] = "M82",
- ["fas2_mp5a5"] = "MP5A5",
- ["fas2_mp5k"] = "MP5K",
- ["fas2_mp5sd6"] = "MP5SD6",
- ["fas2_pp19"] = "PP-BIZON",
- ["fas2_rem870"] = "REMINGTON",
- ["fas2_rpk"] = "RPK",
- ["fas2_rk95"] = "RK95",
- ["fas2_sg550"] = "SG550",
- ["fas2_sg552"] = "SG552",
- ["fas2_sks"] = "SKS",
- ["fas2_sr25"] = "SR25",
- ["fas2_m67"] = "GRENADE",
- ["fas2_ragingbull"] = "Raging Bull",
- ["weapon_physgun"] = "Physics Gun",
- ["mains"] = "MAINS",
- ["pocket"] = "Poche",
- ["weapon_medkit"] = "Trousse",
- ["fas2_ifak"] = "Kit",
- ["weapon_fists"] = "Poings",
- ["weapon_keypadchecker"] = "Keypad Checker",
- ["door_ram"] = "DoorRam",
- ["weaponchecker"] = "Fouille",
- ["weapon_keycard_level1"] = "Carte n°1",
- ["weapon_keycard_level2"] = "Carte n°2",
- ["weapon_keycard_level3"] = "Carte n°3",
- ["weapon_keycard_level4"] = "Carte n°4",
- ["weapon_keycard_level5"] = "Carte n°5",
- ["salute"] = "GAV",
- ["weapon_sillyzombieclaw_v2"] = "Griffe",
- ["weapon_sillyzombieclaw"] = "Griffe",
- ["nightvision"] = "Vision Nuit",
- }
- local nexttime = 0
- local selected = 0
- local function SkyrizeCheckInTable(wep)
- local aaa = {}
- for k,v in SortedPairs(SkyrizeWeaponsHUD) do
- for a,b in SortedPairs(v) do
- if a == wep then
- return false
- end
- end
- end
- return true
- end
- local function SkyrizeEquipSelected(selc)
- local WepTbl = {}
- for k,v in SortedPairs(LocalPlayer():GetWeapons()) do
- for a,b in SortedPairs(SkyrizeWeaponsHUD) do
- if b[v:GetClass()] then
- if !WepTbl[a] then WepTbl[a] = {} end;
- table.insert(WepTbl[a], v:GetClass())
- else
- if SkyrizeCheckInTable(v:GetClass()) then
- if !WepTbl[6] then WepTbl[6] = {} end;
- if not table.HasValue(WepTbl[6], v:GetClass()) then
- table.insert(WepTbl[6], v:GetClass())
- end
- end
- end
- end
- end
- local id_tbl = {}
- local uid = 1
- for k,v in SortedPairs(WepTbl) do
- for a,b in SortedPairs(v) do
- id_tbl[b] = uid
- uid = uid +1
- end
- end
- for k,v in SortedPairs(id_tbl) do
- if v == selc then
- RunConsoleCommand("use",k)
- surface.PlaySound("ambient/water/rain_drip1.wav")
- return
- end
- end
- end
- hook.Add("HUDPaint", "SkyrizeHUDWeapon", function(len, ply)
- if LocalPlayer().ShowWeaponMenu then
- local WepTbl = {}
- for k,v in SortedPairs(LocalPlayer():GetWeapons()) do
- for a,b in SortedPairs(SkyrizeWeaponsHUD) do
- if b[v:GetClass()] then
- if !WepTbl[a] then WepTbl[a] = {} end;
- table.insert(WepTbl[a], v:GetClass())
- else
- if SkyrizeCheckInTable(v:GetClass()) then
- if !WepTbl[6] then WepTbl[6] = {} end;
- if not table.HasValue(WepTbl[6], v:GetClass()) then
- table.insert(WepTbl[6], v:GetClass())
- end
- end
- end
- end
- end
- local id_tbl = {}
- local uid = 1
- for k,v in SortedPairs(WepTbl) do
- for a,b in SortedPairs(v) do
- id_tbl[b] = uid
- uid = uid +1
- end
- end
- for i=1, 6 do
- draw.RoundedBox(0,2, 125+40+40*(i-1), 23,35, Color(48,48,48))
- draw.SimpleText(i, "Trebuchet24", 15-5/2+1, 125+40*i+20, Color(0,147,255),1,1)
- if WepTbl[i] then
- local b = 0
- for k,v in SortedPairs(WepTbl[i]) do
- if selected == id_tbl[v] then
- draw.RoundedBox(0,25+130*b, 125+40*i, 125,35, Color(0,147,255))
- else
- draw.RoundedBox(0,25+130*b, 125+40*i, 125,35, Color(142,142,142))
- end
- if SkyrizeHUDWeapon_Names[v] then
- 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)
- else
- draw.SimpleText(string.upper(v), "Trebuchet24", 5+40/2+130*b+125/2, 125+40*i+20, Color(255,255,255),1,1)
- end
- b = b +1
- end
- end
- end
- if nexttime <= CurTime() then
- LocalPlayer().ShowWeaponMenu = nil
- nexttime = CurTime() +3
- end
- end
- end)
- hook.Add("PlayerBindPress", "bind", function(ply, bind, pressed)
- if not IsValid(ply) then return end
- if bind == "invnext" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
- if (!ply:InVehicle()) then
- ply.ShowWeaponMenu = true
- if selected < table.Count(ply:GetWeapons()) then
- selected = selected +1
- else
- selected = 1
- end
- end
- return true
- elseif bind == "invprev" and pressed and !input.IsMouseDown(MOUSE_LEFT) then
- if (!ply:InVehicle()) then
- ply.ShowWeaponMenu = true
- if selected > 1 then
- selected = selected -1
- else
- selected = table.Count(ply:GetWeapons())
- end
- end
- return true
- elseif bind == "+attack" then
- if ply.ShowWeaponMenu then
- SkyrizeEquipSelected(selected)
- return true
- end
- elseif string.find(bind, "slot") then
- return true
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement