SHARE
TWEET

Untitled

a guest Mar 20th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. local dist = 0
  2. local angright = 0
  3. local rotate = 0
  4.  
  5. local function DrawInspectHint( ply )
  6.     local ply = LocalPlayer()
  7.     if !ply:Alive() or ply:InVehicle() or !LocalPlayer() then return end
  8.     -- Here you can modify the hint on your screen.
  9.     draw.SimpleText("Press and hold " .. pinspect.keyHint .. " to inspect yourself.","Default",ScrW()/2,ScrH()-30,pinspect.keyHintcolour,TEXT_ALIGN_CENTER,TEXT_ALIGN_TOP)
  10. end
  11.  
  12. hook.Add("HUDPaint","DrawInspectHint",DrawInspectHint)
  13.  
  14. local function Draw3DProfile( ply )
  15.     local ply = LocalPlayer()
  16.     if !ply:Alive() or ply:InVehicle() or !LocalPlayer() then return end
  17.     local displayang = LocalPlayer():EyeAngles()
  18.     local boneIndex = ply:LookupBone("ValveBiped.Bip01_Head1")
  19.     local headpos = ply:GetBonePosition(boneIndex)+Vector(0,0,5)
  20.  
  21.     local nameoffsetx = 125
  22.     local nameoffsety = 0
  23.     local namelinkw = 75
  24.     local namelinkh = 1
  25.     local nameborderw_top = pinspectstructure.name.boxw
  26.     local nameborderh_top = 1
  27.     local nameborderw_bottom = pinspectstructure.name.boxw
  28.     local nameborderh_bottom = 1
  29.     local nameborderw_left = 1
  30.     local nameborderh_left = pinspectstructure.name.boxh
  31.     local nameborderw_right = 1
  32.     local nameborderh_right = pinspectstructure.name.boxh
  33.  
  34.     cam.Start3D2D(headpos,Angle(0,displayang.y+90,90),0.15)
  35.         --name
  36.         draw.RoundedBox(0,50,12.5,namelinkw,namelinkh,pinspectstructure.name.bordercolour)
  37.         draw.RoundedBox(0,nameoffsetx,nameoffsety,nameborderw_top,nameborderh_top,pinspectstructure.name.bordercolour)
  38.         draw.RoundedBox(0,nameoffsetx,pinspectstructure.name.boxh,nameborderw_bottom,nameborderh_bottom,pinspectstructure.name.bordercolour)
  39.         draw.RoundedBox(0,nameoffsetx,nameoffsety,nameborderw_left,nameborderh_left,pinspectstructure.name.bordercolour)
  40.         draw.SimpleText(ply:Nick(),pinspectstructure.name.font,nameoffsetx+10,nameoffsety+5,pinspectstructure.name.fontcolour,TEXT_ALIGN_LEFT,TEXT_ALIGN_TOP)
  41.     cam.End3D2D()
  42.  
  43.     local healthoffsetx = 175
  44.     local healthoffsety = 35
  45.     local healthlinkw = 75
  46.     local healthlinkh = 1
  47.     local healthborderw_top = pinspectstructure.health.boxw
  48.     local healthborderh_top = 1
  49.     local healthborderw_bottom = pinspectstructure.health.boxw
  50.     local healthborderh_bottom = 1
  51.     local healthborderw_left = 1
  52.     local healthborderh_left = pinspectstructure.health.boxh
  53.     local healthborderw_right = 1
  54.     local healthborderh_right = pinspectstructure.health.boxh
  55.  
  56.     local job
  57.     if !ply:getDarkRPVar("job") then job = "" else job = ply:getDarkRPVar("job") end
  58.     local salary
  59.     if !DarkRP.formatMoney(ply:getDarkRPVar("salary")) then salary = "" else salary = DarkRP.formatMoney(ply:getDarkRPVar("salary")) end
  60.     local joboffsetx = 175
  61.     local joboffsety = 70
  62.     local joblinkw = 75
  63.     local joblinkh = 1
  64.     local jobborderw_top = pinspectstructure.job.boxw
  65.     local jobborderh_top = 1
  66.     local jobborderw_bottom = pinspectstructure.job.boxw
  67.     local jobborderh_bottom = 1
  68.     local jobborderw_left = 1
  69.     local jobborderh_left = pinspectstructure.job.boxh
  70.     local jobborderw_right = 1
  71.     local jobborderh_right = pinspectstructure.job.boxh
  72.  
  73.     local money
  74.     if !DarkRP.formatMoney(ply:getDarkRPVar("money")) then money = "" else money = DarkRP.formatMoney(ply:getDarkRPVar("money")) end
  75.     local moneyoffsetx = 175
  76.     local moneyoffsety = 105
  77.     local moneylinkw = 75
  78.     local moneylinkh = 1
  79.     local moneyborderw_top = pinspectstructure.money.boxw
  80.     local moneyborderh_top = 1
  81.     local moneyborderw_bottom = pinspectstructure.money.boxw
  82.     local moneyborderh_bottom = 1
  83.     local moneyborderw_left = 1
  84.     local moneyborderh_left = pinspectstructure.money.boxh
  85.     local moneyborderw_right = 1
  86.     local moneyborderh_right = pinspectstructure.money.boxh
  87.  
  88.     local shoulderIndex = ply:LookupBone("ValveBiped.Bip01_Spine")
  89.     local shoulderpos = ply:GetBonePosition(shoulderIndex)+Vector(0,0,20)
  90.  
  91.     local armour
  92.     if pinspect.showArmour == false then
  93.         armour = ""
  94.     else
  95.         armour = " AP: " .. ply:Armor()
  96.     end
  97.  
  98.     cam.Start3D2D(shoulderpos,Angle(0,displayang.y+90,90),0.15)
  99.         --health
  100.         draw.RoundedBox(0,healthoffsetx-healthlinkw,healthoffsety+12.5,healthlinkw,healthlinkh,pinspectstructure.health.bordercolour)
  101.         draw.RoundedBox(0,healthoffsetx,healthoffsety,healthborderw_top,healthborderh_top,pinspectstructure.health.bordercolour)
  102.         draw.RoundedBox(0,healthoffsetx,healthoffsety+pinspectstructure.health.boxh,healthborderw_bottom,healthborderh_bottom,pinspectstructure.health.bordercolour)
  103.         draw.RoundedBox(0,healthoffsetx,healthoffsety,healthborderw_left,healthborderh_left,pinspectstructure.health.bordercolour)
  104.         draw.SimpleText("HP: " .. ply:Health() .. armour,pinspectstructure.health.font,healthoffsetx+10,healthoffsety+5,pinspectstructure.health.fontcolour,TEXT_ALIGN_LEFT,TEXT_ALIGN_TOP)
  105.         --job
  106.         draw.RoundedBox(0,joboffsetx-joblinkw,joboffsety+12.5,joblinkw,joblinkh,pinspectstructure.job.bordercolour)
  107.         draw.RoundedBox(0,joboffsetx,joboffsety,jobborderw_top,jobborderh_top,pinspectstructure.job.bordercolour)
  108.         draw.RoundedBox(0,joboffsetx,joboffsety+pinspectstructure.job.boxh,jobborderw_bottom,jobborderh_bottom,pinspectstructure.job.bordercolour)
  109.         draw.RoundedBox(0,joboffsetx,joboffsety,jobborderw_left,jobborderh_left,pinspectstructure.job.bordercolour)
  110.         draw.SimpleText(job .. " (" .. salary .. ")",pinspectstructure.job.font,joboffsetx+10,joboffsety+5,pinspectstructure.job.fontcolour,TEXT_ALIGN_LEFT,TEXT_ALIGN_TOP)
  111.         --money
  112.         draw.RoundedBox(0,moneyoffsetx-moneylinkw,moneyoffsety+12.5,moneylinkw,moneylinkh,pinspectstructure.money.bordercolour)
  113.         draw.RoundedBox(0,moneyoffsetx,moneyoffsety,moneyborderw_top,moneyborderh_top,pinspectstructure.money.bordercolour)
  114.         draw.RoundedBox(0,moneyoffsetx,moneyoffsety+pinspectstructure.money.boxh,moneyborderw_bottom,moneyborderh_bottom,pinspectstructure.money.bordercolour)
  115.         draw.RoundedBox(0,moneyoffsetx,moneyoffsety,moneyborderw_left,moneyborderh_left,pinspectstructure.money.bordercolour)
  116.         draw.SimpleText(money,pinspectstructure.money.font,moneyoffsetx+10,moneyoffsety+5,pinspectstructure.money.fontcolour,TEXT_ALIGN_LEFT,TEXT_ALIGN_TOP)
  117.     cam.End3D2D()
  118.  
  119.     local handIndex = ply:LookupBone("ValveBiped.Bip01_R_Hand")
  120.     local handpos = ply:GetBonePosition(handIndex)
  121.     local wep = ply:GetActiveWeapon()
  122.     local ammomag = ply:GetActiveWeapon():Clip1()
  123.     local ammores = ply:GetAmmoCount(wep:GetPrimaryAmmoType())
  124.  
  125.     local weaponoffsetx = -150
  126.     local weaponoffsety = 0
  127.     local weaponlinkw = 75
  128.     local weaponlinkh = 1
  129.     local weaponborderw_top = pinspectstructure.weapon.boxw
  130.     local weaponborderh_top = 1
  131.     local weaponborderw_bottom = pinspectstructure.weapon.boxw
  132.     local weaponborderh_bottom = 1
  133.     local weaponborderw_left = 1
  134.     local weaponborderh_left = pinspectstructure.weapon.boxh+1
  135.     local weaponborderw_right = 1
  136.     local weaponborderh_right = pinspectstructure.weapon.boxh
  137.  
  138.     local magoffsetx = -150
  139.     local magoffsety = 35
  140.     local maglinkw = 75
  141.     local maglinkh = 1
  142.     local magborderw_top = pinspectstructure.mag.boxw
  143.     local magborderh_top = 1
  144.     local magborderw_bottom = pinspectstructure.mag.boxw
  145.     local magborderh_bottom = 1
  146.     local magborderw_left = 1
  147.     local magborderh_left = pinspectstructure.mag.boxh+1
  148.     local magborderw_right = 1
  149.     local magborderh_right = pinspectstructure.mag.boxh
  150.  
  151.     cam.Start3D2D(handpos,Angle(0,displayang.y+90,90),0.15)
  152.         --weapon
  153.         draw.RoundedBox(0,weaponoffsetx,weaponoffsety+12.5,weaponlinkw,weaponlinkh,pinspectstructure.weapon.bordercolour)
  154.         draw.RoundedBox(0,weaponoffsetx-weaponborderw_top,weaponoffsety,weaponborderw_top,weaponborderh_top,pinspectstructure.weapon.bordercolour)
  155.         draw.RoundedBox(0,weaponoffsetx-weaponborderw_bottom,pinspectstructure.weapon.boxh,weaponborderw_bottom,weaponborderh_bottom,pinspectstructure.weapon.bordercolour)
  156.         draw.RoundedBox(0,weaponoffsetx,weaponoffsety,weaponborderw_left,weaponborderh_left,pinspectstructure.weapon.bordercolour)
  157.         draw.SimpleText(wep:GetPrintName(),pinspectstructure.weapon.font,weaponoffsetx-weaponborderw_bottom,weaponoffsety+5,pinspectstructure.weapon.fontcolour,TEXT_ALIGN_RIGHT,TEXT_ALIGN_TOP)
  158.         --ammo
  159.         draw.RoundedBox(0,magoffsetx,magoffsety+12.5,maglinkw,maglinkh,pinspectstructure.mag.bordercolour)
  160.         draw.RoundedBox(0,magoffsetx-magborderw_top,magoffsety,magborderw_top,magborderh_top,pinspectstructure.mag.bordercolour)
  161.         draw.RoundedBox(0,magoffsetx-magborderw_bottom,magoffsety+pinspectstructure.mag.boxh,magborderw_bottom,magborderh_bottom,pinspectstructure.mag.bordercolour)
  162.         draw.RoundedBox(0,magoffsetx,magoffsety,magborderw_left,magborderh_left,pinspectstructure.mag.bordercolour)
  163.         draw.SimpleText(ammomag .. " (" .. ammores .. ")",pinspectstructure.mag.font,magoffsetx-magborderw_bottom,magoffsety+5,pinspectstructure.mag.fontcolour,TEXT_ALIGN_RIGHT,TEXT_ALIGN_TOP)
  164.     cam.End3D2D()
  165. end
  166.  
  167. local timercount = 0
  168. local function FrontView( ply, pos, ang, fov )
  169.     local ply = LocalPlayer()
  170.     local view = {}
  171.     local trace = {}
  172.     if input.IsKeyDown(pinspect.profileKey) then
  173.         if timercount < pinspect.profileDelay then timercount = timercount+1 return end
  174.         hook.Add("HUDShouldDraw","a",function(name) if name == "DarkRP_HUD" then return false end end)
  175.         ply:GetActiveWeapon():SetHoldType("passive")
  176.         hook.Add("ShouldDrawLocalPlayer","DrawTPModel",function ( ply ) return true end)
  177.         hook.Add("PostPlayerDraw","pinspectprofile",Draw3DProfile)
  178.         if dist > -90 then dist = dist-1 end
  179.         if angright < 0 then angright = angright+1 end
  180.         if rotate < 180 then rotate = rotate+3 end
  181.         view.origin = pos-(ang:Forward()*dist)-(ang:Right()*angright)-(ang:Up()*15)
  182.         view.angles = ang-Angle(0,rotate,0)
  183.         view.fov = fov
  184.        
  185.         gui.EnableScreenClicker(true)
  186.         return view        
  187.     else
  188.         timercount = 0
  189.         if pinspect.hideDefaultHUD == true then
  190.             hook.Add("HUDShouldDraw","a",function(name) if name == "DarkRP_HUD" then return false end end)
  191.         else
  192.             hook.Add("HUDShouldDraw","a",function(name) if name == "DarkRP_HUD" then return true end end)
  193.         end
  194.         hook.Add("ShouldDrawLocalPlayer","DrawTPModel",function ( ply ) return false end)
  195.         hook.Remove("PostPlayerDraw","pinspectprofile",Draw3DProfile)
  196.         if dist < 0 then dist = dist+1 end
  197.         if angright > 0 then angright = angright-1 end
  198.         if rotate > 0 then rotate = rotate-3 end
  199.         view.origin = pos-(ang:Forward()*dist)-(ang:Right()*angright)
  200.         view.angles = ang-Angle(0,rotate,0)
  201.         view.fov = fov
  202.         view.drawviewer = false
  203.        
  204.         gui.EnableScreenClicker(false)
  205.         return view
  206.     end
  207. end
  208.  
  209. hook.Add("CalcView","FrontView",FrontView)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top