Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using GTA;
- using GTA.Native;
- using System;
- using System.IO;
- using System.Windows.Forms;
- public class ArmyFix : Script
- {
- public ArmyFix()
- {
- Tick += OnTick;
- Interval = 1000;
- }
- void OnTick(object sender, EventArgs e)
- {
- foreach(Ped army in World.GetAllPeds())
- {
- if (Function.Call<int>(Hash.GET_PED_TYPE, army) == 29)
- {
- if (army.Weapons.Current.Hash != WeaponHash.Unarmed && army.Weapons.Current.Tint != WeaponTint.Army) army.Weapons.Current.Tint = WeaponTint.Army;
- if (!army.IsPlayer && army.Weapons.Current.Hash == WeaponHash.AssaultRifle)
- {
- army.Weapons.RemoveAll();
- army.Weapons.Give(WeaponHash.CarbineRifle, -1, true, true);
- if (army.Model == PedHash.Marine01SMY) Function.Call(Hash.SET_PED_COMPONENT_VARIATION, army, 3, 1, 0, 1);
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement