getRelationshipBetweenPeds
GET_RELATIONSHIP_BETWEEN_PEDS0xEBA5AD3A0EAF7121The 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.
getRelationshipBetweenPeds(ped1: Ped, ped2: Ped): numbergetRelationshipBetweenPeds(ped1: Ped, ped2: Ped): integerUsage
JavaScript
const result = getRelationshipBetweenPeds(ped1, ped2);Lua
local result = getRelationshipBetweenPeds(ped1, ped2)Parameters
| Parameter | Type | JavaScript | Lua |
|---|---|---|---|
ped1 | Ped | number | integer |
ped2 | Ped | number | integer |
Returns
int JavaScript number, Lua integerNotes
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