Ped::clearRelationshipBetweenGroups

From RAGE Multiplayer Wiki
Revision as of 12:20, 2 November 2024 by Shr0x (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Client-Side
Function

 JavaScript



JavaScript Syntax


Function

This function clears the relationship between two groups. It’s recommended to call this function twice, once for each group pairing, to ensure the relationship is fully cleared.

Relationship Types

* 0 = Companion
* 1 = Respect
* 2 = Like
* 3 = Neutral
* 4 = Dislike
* 5 = Hate
* 255 = Pedestrians

Syntax

mp.game.ped.clearRelationshipBetweenGroups(relationship, group1, group2);

Required Arguments

  • relationship: int
  • group1: string (Model hash or name)
  • group2: string (Model hash or name)

Return value

  • Undefined

Example

// Clear the 'Dislike' relationship between two groups
let group1 = mp.game.joaat("GROUP_A");
let group2 = mp.game.joaat("GROUP_B");

mp.game.ped.clearRelationshipBetweenGroups(4, group1, group2);
mp.game.ped.clearRelationshipBetweenGroups(4, group2, group1);



See also