fivem-ts

a library to speed up the development of Fivem scripts and frameworks


Project maintained by Purpose-Dev Hosted on GitHub Pages — Theme by mattgraham

fivem-ts - Documentation v0.7.5Docs


fivem-ts - Documentation v0.7.5 / Client / RelationshipGroup

Class: RelationshipGroup

Class to create and manage a relationship group. Useful to manage behavior between Peds.

Constructors

new RelationshipGroup()

new RelationshipGroup(name, groupHash?): RelationshipGroup

Create a relationship group. Optionally pass a group hash.

Parameters

name: string

Name of the relationship group.

groupHash?: number

Optional custom group hash (default: 0).

Returns

RelationshipGroup

Defined in

client/RelationshipGroup.ts:18

Accessors

Hash

get Hash(): number

Gets the hash of the relationship group.

Returns

number

The hash of this object.

Defined in

client/RelationshipGroup.ts:28

Methods

clearRelationshipBetweenGroups()

clearRelationshipBetweenGroups(targetGroup, relationship, biDirectionally): void

Clear the relationship between this relationship group and another.

Parameters

targetGroup: RelationshipGroup

The other relationship group.

relationship: Relationship

The desired relationship to clear.

biDirectionally: boolean = false

Whether the target group should also clear the relationship.

Returns

void

Defined in

client/RelationshipGroup.ts:68


getRelationshipBetweenGroups()

getRelationshipBetweenGroups(targetGroup): Relationship

Get the relationship between two relationship groups.

Parameters

targetGroup: RelationshipGroup

The other relationship group.

Returns

Relationship

The relationship

Defined in

client/RelationshipGroup.ts:38


remove()

remove(): void

Remove this relationship group from the game. This will not delete this object.

Returns

void

Defined in

client/RelationshipGroup.ts:83


setRelationshipBetweenGroups()

setRelationshipBetweenGroups(targetGroup, relationship, biDirectionally): void

Set the relationship group between this relationship group and another one.

Parameters

targetGroup: RelationshipGroup

The other relationship group.

relationship: Relationship

The desired relationship.

biDirectionally: boolean = false

If target group should have same relationship towards this.

Returns

void

Defined in

client/RelationshipGroup.ts:49