0Root1 Posted July 12, 2015 Share Posted July 12, 2015 I'm trying, to make prison guards not to attack me while I'm inside prison gates. If you take look at prisonguardhash = Function.Call<int>(Hash.GET_HASH_KEY, "COP"); then i already tried SECURITY_GUARD and PRIVATE_SECURITY and also PRISONER. Any of them isn't working. I'm glad, if anyone could help me pedgroup = World.AddRelationshipGroup("TEST"); playerped.RelationshipGroup = pedgroup; prisonguardhash = Function.Call<int>(Hash.GET_HASH_KEY, "COP"); World.SetRelationshipBetweenGroups(Relationship.Companion, /*1862763763509*/prisonguardhash, pedgroup); World.SetRelationshipBetweenGroups(Relationship.Companion, pedgroup, prisonguardhash); Link to comment Share on other sites More sharing options...
C06alt Posted July 15, 2015 Share Posted July 15, 2015 You could use a get ped command when near a guard then use GET_PED_RELATIONSHIP_GROUP_HASH(Ped ped) Then log this hash and use it to set your relationships. This way you can avoid having to know what the string is. Link to comment Share on other sites More sharing options...
0Root1 Posted July 15, 2015 Author Share Posted July 15, 2015 I tried it with that code, but it seems, that relationshipgroups aren't working inside prison, because alarm was activated and guars were still shooting me but i couldn't shoot them. if(player.IsTargetting(nearbypeds[i])) { playerped.RelationshipGroup = nearbypeds[i].RelationshipGroup; UI.ShowSubtitle("Relationship group assigned"); } Link to comment Share on other sites More sharing options...
leftas Posted July 15, 2015 Share Posted July 15, 2015 Just spawn the ped and try to get its group(iirc groups are assigned on spawn) All the best, Paul. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now