Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using GTA;
- using GTA.Native;
- using System.Windows.Forms;
- public class StopAnimationScript : Script
- {
- public StopAnimationScript()
- {
- Tick += OnTick;
- KeyDown += OnKeyDown;
- }
- private void OnTick(object sender, EventArgs e)
- {
- }
- private void OnKeyDown(object sender, KeyEventArgs e)
- {
- if (e.KeyCode == Keys.F2)
- {
- StopAllAnimations();
- }
- }
- private void StopAllAnimations()
- {
- Ped player = Game.Player.Character;
- Function.Call(Hash.CLEAR_PED_TASKS, player.Handle);
- Function.Call(Hash.CLEAR_PED_TASKS_IMMEDIATELY, player.Handle);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement