Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Public Function getPhoneRenderID() As Integer
- Dim rPhone As New Native.Pointer(GetType(Integer))
- Native.Function.Call("GET_MOBILE_PHONE_RENDER_ID", rPhone)
- Dim ci As Integer = Integer.Parse(String.Concat(rPhone.Value))
- Return ci
- End Function
- Dim txdLoad As Int32 = Native.Function.Call(Of Int32)("LOAD_TXD", "race_atob")
- Dim textureLoad As Int32 = Native.Function.Call(Of Int32)("GET_TEXTURE", txdLoad, "race_atob0")
- Dim tmpCenterPos As Vector3 = New Vector3(338, 546, 0)
- Dim tmpXMax As Int16 = 225
- Dim tmpYMax As Int16 = 402
- Dim zoomCoef As Double = 4.3
- Private Sub general_tick(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Tick
- Dim phoneID As Integer = getPhoneRenderID() ' you dont need to get phone id in every tick
- Native.Function.Call("SET_TEXT_RENDER_ID", phoneID)
- Dim tmpXDist As Double = tmpCenterPos.X - Player.Character.Position.X
- Dim tmpYDist As Double = Player.Character.Position.Y - tmpCenterPos.Y
- Dim tmpXPercent As Double = tmpXDist * 100 / tmpXMax / 100 + 0.5
- Dim tmpYPercent As Double = (tmpYDist * 100 / tmpYMax / 100 + 0.5)
- Native.Function.Call("DRAW_SPRITE", textureLoad, tmpXPercent, tmpYPercent, 7.15 * zoomCoef, 2.0 * zoomCoef, 180, 255, 255, 255, 175)
- Native.Function.Call("DRAW_RECT", 0.5, 0.5, 0.025, 0.01, 255, 255, 255, 255)
- msgex(phoneID & " > " & tmpXPercent & " " & tmpYPercent & " " & tmpXMax & " " & tmpYMax & " " & zoomCoef, 100)
- If Game.isKeyPressed(Keys.Add) Then tmpXMax += 5
- If Game.isKeyPressed(Keys.Subtract) Then tmpXMax -= 5
- If Game.isKeyPressed(Keys.Y) Then tmpYMax += 5
- If Game.isKeyPressed(Keys.U) Then tmpYMax -= 5
- If Game.isKeyPressed(Keys.D8) Then zoomCoef += 0.1
- If Game.isKeyPressed(Keys.D9) Then zoomCoef -= 0.1
- ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement