Relationship status,need little bit help with it

I’m trying to get my own gang script to work like if u join the gang the gang will respect u if u take a gang skin.

right now I have only this

local relationshipTypes = {
“AMBIENT_GANG_BALLAS”,
}

Citizen.CreateThread(function()
while true do
Wait(50)
for _, group in ipairs(relationshipTypes) do
SetRelationshipBetweenGroups(1, GetHashKey(‘PLAYER’), GetHashKey(group))
SetRelationshipBetweenGroups(1, GetHashKey(group), GetHashKey(‘PLAYER’))
end
end
end)

What should I add in that the gang will respect me if I take the ballas skin??? any ideas?

So I made this post a lot of time ago and still need of a help here,umm can someone tell me what am I doing wrong here?I just wan’t to add my self as part of group when I select a ballas gang member skin,so they would not shoot me.

local relationship_hashes = {
“AMBIENT_GANG_BALLAS”
}

Citizen.CreateThread(function()
AddRelationshipGroup(“gang”)
for _,v in pairs(relationship_hashes) do
SetRelationshipBetweenGroups(1, GetHashKey(“gang”), GetHashKey(v))
SetRelationshipBetweenGroups(1, GetHashKey(v), GetHashKey(“gang”))
SetPedAsGroupMember(GetHashKey (“G_M_Y_BallaEast_01”), GetHashKey (“AMBIENT_GANG_BALLAS”))
end
end)

I had trouble with something like this myself.

“Set” to companion maybe but they still seemed to get agitated eventually…

The only thing I found that worked is to call ClearRelationshipBetweenGroups every frame

they won’t shoot at you anymore but … it gets a bit wonky … sometimes they look like they really want to and then glitch out

here