Prevent ped hostility towards other peds

I’m attempting to make a script which allows me to have a “pet” wolf. However I am running into an issue where the wolf constantly attacks other peds. I want the wolf to more or less act as if it were a domesticated dog. I figured Relationship Groups would do the trick, however I can only get the wolf to stop attacking me, and not other peds.

I know I should try setting the relationship between peds and the wolf, however I have tried that and cannot seem to get that working either. It just exhibits the same behavior. Not to mention I am not particularly sure where to view all known relationship group hashes.

Note: I need to keep functionality for the wolf to attack other peds, but only when instructed to. The reason for this is that I have made it possible to command an attack. Currently it works perfectly fine for non predator peds. However predator peds, if not already attacking a random ped due to my issue, wont go after the specified target and instead choose to deviate towards the nearest ped in the area.

Any help would be much appreciated.


Current Code:

local c = GetEntityCoords(PlayerPedId())
local model = GetHashKey("mp_a_c_wolf_01")
        
RequestModel(model)
while not HasModelLoaded(model) do Wait(10) end

local ped = CreatePed(model, c.x, c.y, c.z, GetEntityHeading(PlayerPedId()), false, false)
        
local s, rghash = AddRelationshipGroup('petwolf')
SetPedRelationshipGroupHash(ped, rghash)
SetRelationshipBetweenGroups(2, rghash, GetHashKey("PLAYER"))

Current Attack Code: Entity is the target | PetFollow() is just a function to make the wolf follow me.
This code is wrapped inside a function, and called when I press a button from a UI Prompt.

TaskGotoEntityAiming(pet, entity, 0.0, 100.0)
TaskCombatPed(pet, entity, 0, 16)
repeat Wait(100) until IsEntityDead(entity)
PetFollow()

Current Result: Video Link

Cant really get a video for the Attack Code portion due to my primary issue, its hard to set up without the wolf going crazy before I hit record.