SHARE
TWEET

Smoking Idle Animations

Eddlm Aug 5th, 2016 965 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Iusing GTA;
  2. using GTA.Native;
  3. using System;
  4. using System.IO;
  5. using System.Windows.Forms;
  6.  
  7.  
  8.  
  9. public class IdleAnimations : Script
  10. {
  11.     string ScriptName = "Idle Animations";
  12.     string ScriptVer = "1.0";
  13.     int GameTimeRef = Game.GameTime+20000;
  14.     bool IsIdling = false;
  15.     public IdleAnimations()
  16.     {
  17.         Tick += OnTick;
  18.     }
  19.  
  20.     void OnTick(object sender, EventArgs e)
  21.     {
  22.         if (IsIdling)
  23.         {
  24.             if (Game.IsControlPressed(2, GTA.Control.VehicleAccelerate) || Game.IsControlPressed(2, GTA.Control.VehicleBrake) || Game.IsControlPressed(2, GTA.Control.VehicleMoveLeft)|| Game.IsControlPressed(2, GTA.Control.VehicleMoveRight)
  25.                 || Game.Player.Character.IsRagdoll)
  26.             {
  27.                 Game.Player.Character.Task.ClearAll();
  28.                 IsIdling = false;
  29.                 GameTimeRef = Game.GameTime;
  30.             }
  31.         }
  32.         else
  33.         {
  34.             if (Game.Player.Character.IsOnFoot)
  35.             {
  36.                 if (!Game.Player.Character.IsStopped) GameTimeRef = Game.GameTime;
  37.                 else if (Game.GameTime > GameTimeRef + 10000)
  38.                 {
  39.                     IsIdling = true;
  40.                     Function.Call(GTA.Native.Hash.TASK_START_SCENARIO_IN_PLACE, Game.Player.Character, "WORLD_HUMAN_AA_SMOKE", -1, false);
  41.                 }
  42.             }
  43.         }
  44.     }
  45. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top