Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub keyDown(ByVal sender As Object, ByVal e As KeyEventArgs) Handles MyBase.KeyDown
- If e.KeyCode = Keys.None Then
- Exit Sub
- End If
- If e.KeyCode = Keys.T Then
- Native.Function.Call(Native.Hash.REQUEST_ANIM_DICT, "combat@chg_stance")
- Dim tmpTimeOut As Date = Now
- While Not Native.Function.Call(Of Boolean)(Native.Hash.HAS_ANIM_DICT_LOADED, "combat@chg_stance") AndAlso (Now.Subtract(tmpTimeOut).TotalMilliseconds < 500)
- Wait(5)
- End While
- If Native.Function.Call(Of Boolean)(Native.Hash.HAS_ANIM_DICT_LOADED, "combat@chg_stance") Then
- Native.Function.Call(Native.Hash.TASK_PLAY_ANIM, Game.Player.Character, "combat@chg_stance", "aimb_loop", 8.0, 8.0 * -1, -1, 0, 0, False, False, False)
- Wait(50)
- tmpTimeOut = Now
- While Now.Subtract(tmpTimeOut).TotalMilliseconds < 3000
- UI.ShowSubtitle("Anim play time: " & Native.Function.Call(Of Double)(Native.Hash.GET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, "combat@chg_stance", "aimb_loop"))
- Wait(5)
- End While
- UI.ShowSubtitle("Reset anim playback time to 0.1 and reduce play speed to 0.25", 5000)
- Native.Function.Call(Native.Hash.SET_ENTITY_ANIM_CURRENT_TIME, Game.Player.Character, "combat@chg_stance", "aimb_loop", 0.1)
- Native.Function.Call(Native.Hash.SET_ENTITY_ANIM_SPEED, Game.Player.Character, "combat@chg_stance", "aimb_loop", 0.25)
- Wait(5000)
- UI.ShowSubtitle("End anim playback")
- Native.Function.Call(Native.Hash.STOP_ANIM_TASK, Game.Player.Character, "combat@chg_stance", "aimb_loop", 1.0)
- Else
- UI.ShowSubtitle("Error requesting dict")
- End If
- End If
- end sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement