PedClient

getRelationshipBetweenPeds

GET_RELATIONSHIP_BETWEEN_PEDS0xEBA5AD3A0EAF7121

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

SignatureJavaScript
getRelationshipBetweenPeds(ped1: Ped, ped2: Ped): number
SignatureLua
getRelationshipBetweenPeds(ped1: Ped, ped2: Ped): integer

Usage

JavaScript
const result = getRelationshipBetweenPeds(ped1, ped2);
Lua
local result = getRelationshipBetweenPeds(ped1, ped2)

Parameters

ParameterTypeJavaScriptLua
ped1Pednumberinteger
ped2Pednumberinteger

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 peds. This should be called twice (once for each ped).

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

Example:

getRelationshipBetweenPeds(2, l_1017, 0xA49E591C);
getRelationshipBetweenPeds(2, 0xA49E591C, l_1017);

Reference

Namespace
Ped PED
In the game
int GET_RELATIONSHIP_BETWEEN_PEDS(Ped ped1, Ped ped2)
Hash
0xEBA5AD3A0EAF7121

Open in the interactive natives reference