Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function ENT:Draw()
- self:DrawModel()
- local pos = self:GetPos()
- local fwd = self:GetForward()
- local up = self:GetUp()
- local ri = self:GetRight()
- local ang = self:GetAngles()
- local uptm = self:GetNWFloat("uptime") --Value between 0 and 1 (I think), rotor speed
- local upm = self:GetNWFloat("up") --same range, rotor blade angle
- ang:RotateAroundAxis(ri, 90)
- ang:RotateAroundAxis(fwd, 90)
- local spos=self.SeatsT[self.SeatsT.Pilot].Pos --the local position of the pilot seat
- cam.Start3D2D(pos+fwd*(16+spos.y)+ri*-(5-spos.x)+up*(39+spos.z), ang, 0.02)
- surface.SetDrawColor(MainColor)
- surface.DrawRect(235, 249, 10, 2)
- surface.DrawRect(255, 249, 10, 2)
- surface.DrawRect(249, 235, 2, 10)
- surface.DrawRect(249, 255, 2, 10)
- surface.DrawRect(-3, 0, 3, 500)
- surface.DrawRect(500, 0, 3, 500)
- surface.DrawRect(7, 0, 3, 500)
- surface.DrawRect(490, 0, 3, 500)
- surface.DrawRect(1, 500-uptm*500, 5, uptm*500) --rotor speed bar
- surface.DrawLine(30, 5*ang.r-200+2.77*ang.p, 220, 5*ang.r-200+2.77*(ang.p*0.12)) --artificial horizon, left line
- surface.DrawLine(30, 5*ang.r-200+2.77*ang.p+1, 220, 5*ang.r-200+2.77*(ang.p*0.12)+1)
- surface.DrawLine(280, 5*ang.r-200-2.77*(ang.p*0.12), 470, 5*ang.r-200-2.77*ang.p) --artificial horizon, right line
- surface.DrawLine(280, 5*ang.r-200-2.77*(ang.p*0.12)+1, 470, 5*ang.r-200-2.77*ang.p+1)
- surface.SetMaterial(ArrowMaterial)
- surface.DrawTexturedRect(-20,250-upm*250-10,20,20) --green arrow
- cam.End3D2D()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement