SHARE
TWEET

ArmyFix (correct weapon, shirt & weapon tint for army dudes)

Eddlm Mar 10th, 2016 189 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. using GTA;
  2. using GTA.Native;
  3. using System;
  4. using System.IO;
  5. using System.Windows.Forms;
  6.  
  7.  
  8.  
  9. public class ArmyFix : Script
  10. {
  11.  
  12.     public ArmyFix()
  13.     {
  14.         Tick += OnTick;
  15.         Interval = 1000;
  16.     }
  17.  
  18.     void OnTick(object sender, EventArgs e)
  19.     {
  20.         foreach(Ped army in World.GetAllPeds())
  21.         {
  22.             if (Function.Call<int>(Hash.GET_PED_TYPE, army) == 29)
  23.             {
  24.                 if (army.Weapons.Current.Hash != WeaponHash.Unarmed && army.Weapons.Current.Tint != WeaponTint.Army) army.Weapons.Current.Tint = WeaponTint.Army;
  25.                 if (!army.IsPlayer && army.Weapons.Current.Hash == WeaponHash.AssaultRifle)
  26.                 {
  27.                     army.Weapons.RemoveAll();
  28.                     army.Weapons.Give(WeaponHash.CarbineRifle, -1, true, true);
  29.                     if (army.Model == PedHash.Marine01SMY) Function.Call(Hash.SET_PED_COMPONENT_VARIATION, army, 3, 1, 0, 1);
  30.                 }
  31.             }
  32.         }
  33.     }  
  34. }
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
 
Top