PedClient

getRelationshipBetweenGroups

GET_RELATIONSHIP_BETWEEN_GROUPS0x9E6B70061662AE5C

The GTA V native GET_RELATIONSHIP_BETWEEN_GROUPS of the PED namespace, as LS:MP client scripts call it: the global function getRelationshipBetweenGroups, in JavaScript and in Lua.

SignatureJavaScript
getRelationshipBetweenGroups(group1: Hash, group2: Hash): number
SignatureLua
getRelationshipBetweenGroups(group1: Hash, group2: Hash): integer

Usage

JavaScript
const result = getRelationshipBetweenGroups(group1, group2);
Lua
local result = getRelationshipBetweenGroups(group1, group2)

Parameters

ParameterTypeJavaScriptLua
group1Hashnumberinteger
group2Hashnumberinteger

Returns

int JavaScript number, Lua integer

Notes

From the community native database. Names are LS:MP’s; samples may be written for C++ or another framework.

Gets the relationship between two groups. This should be called twice (once for each group).

Relationship types:
0 = Companion
1 = Respect
2 = Like
3 = Neutral
4 = Dislike
5 = Hate
255 = Pedestrians

Example:

getRelationshipBetweenGroups(l_1017, 0xA49E591C);
getRelationshipBetweenGroups(0xA49E591C, l_1017);

Reference

Namespace
Ped PED
In the game
int GET_RELATIONSHIP_BETWEEN_GROUPS(Hash group1, Hash group2)
Hash
0x9E6B70061662AE5C

Open in the interactive natives reference