cops won't fight each other
-
This works with a cop vs a ped, but not two cops. As you can see the one instructed to fight the other just runs away. Any ideas?
GTA.UI.Screen.ShowSubtitle("creating two cops to fight each other"); Ped player = Game.Player.Character; string model_name = "s_m_y_cop_01"; Ped cop1 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 5f)); cop1.Weapons.Give(WeaponHash.Bat, 999, true, true); model_name = "s_m_y_cop_01"; Ped cop2 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 6f)); cop1.Task.FightAgainst(cop2);
-
I've even tried making new relationship groups
Ped player = Game.Player.Character; string model_name = "s_m_y_cop_01"; Ped cop1 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 5f)); cop1.Weapons.Give(WeaponHash.Bat, 999, true, true); model_name = "s_m_y_cop_01"; Ped cop2 = GTA.World.CreatePed(model_name, player.Position + (player.ForwardVector * 6f)); // create a new relationship group RelationshipGroup newGroup1 = World.AddRelationshipGroup("newgroup1"); cop1.RelationshipGroup = newGroup1; RelationshipGroup newGroup2 = World.AddRelationshipGroup("newgroup2"); cop1.RelationshipGroup = newGroup2; newGroup1.SetRelationshipBetweenGroups(newGroup2, Relationship.Hate); newGroup2.SetRelationshipBetweenGroups(newGroup1, Relationship.Hate); //cop2.RelationshipGroup = 0x02B8FA80; GTA.UI.Screen.ShowSubtitle(cop1.RelationshipGroup.ToString() + ", " + cop2.RelationshipGroup.ToString()); // things i've tried that do not work cop1.Task.FightAgainst(cop2); cop1.Task.FightAgainstHatedTargets(100); cop1.AlwaysKeepTask = true; // 46 is the "fight to the death" attribute Function.Call(Hash.SET_PED_COMBAT_ATTRIBUTES, cop1, 46, true); Function.Call(Hash.SET_PED_FLEE_ATTRIBUTES, cop1, 0, 0);