Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class MyMod : Script
- {
- bool checkOnGround = false;
- Vector3 originalRotation;
- public MyMod()
- {
- KeyUp += MyMod_KeyUp;
- Tick += MyMod_Tick;
- }
- private void MyMod_KeyUp(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.T)
- {
- //your other code
- originalRotation = Game.Player.Character.Rotation;
- checkOnGround = true;
- }
- }
- private void MyMod_Tick(object sender, System.EventArgs e)
- {
- if (checkOnGround && Game.Player.Character.HeightAboveGround < 0.1f) //touching ground
- {
- //do stuff with originalRotation variable
- checkOnGround = false;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement