Make 2 peds fight each other
-
I've followed so many guides and can't for the life of me make 2 peds fight one another.
if (e.KeyCode == Keys.NumPad3) { UI.ShowSubtitle("test 3"); Ped player = Game.Player.Character; GTA.Math.Vector3 spawnLoc = player.Position + (player.ForwardVector * 5f); int RELATIONSHIP_PROTESTERS = World.AddRelationshipGroup("PROTESTERS"); int RELATIONSHIP_COP = Function.Call<int>(Hash.GET_HASH_KEY, "COP"); World.SetRelationshipBetweenGroups(Relationship.Hate, RELATIONSHIP_COP, RELATIONSHIP_PROTESTERS); World.SetRelationshipBetweenGroups(Relationship.Hate, RELATIONSHIP_PROTESTERS, RELATIONSHIP_COP); string model_name = "s_m_y_cop_01"; Ped cop1 = GTA.World.CreatePed(model_name, spawnLoc); Ped cop2 = GTA.World.CreatePed(model_name, spawnLoc); cop1.RelationshipGroup = RELATIONSHIP_PROTESTERS; cop2.RelationshipGroup = RELATIONSHIP_COP; cop1.Task.FightAgainstHatedTargets(5); cop2.Task.FightAgainstHatedTargets(5); }