ScriptsAboutBlogToolsKnowledge BaseReviewsFAQBasketDocsSupport
client

SetRelationshipBetweenGroups

FiveM client native documentation with a Lua example.

Summary

Sets how two ped relationship groups treat each other (friendly, hate, etc.). Used to make NPC guards, gangs, or hostile peds behave correctly.

Returns

void

Parameters

relationshipnumberRelationship level (0=companion ... 5=hate).
group1HashFirst group hash.
group2HashSecond group hash.

Example

SetRelationshipBetweenGroups(5, groupA, groupB) -- hate

Common pitfalls

  • Create groups with AddRelationshipGroup first.
  • Set both directions if you want mutual behavior.

Related natives

Related guides

FiveM scripts done right

Optimized, dual-framework scripts for QBCore and ESX from Viper Development — escrow protected, delivered instantly to your Cfx portal.

Browse Scripts →