Advertisement
Eddlm

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

Mar 10th, 2016
538
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.98 KB | None | 0 0
  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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement