Ped::clearRelationshipBetweenGroups: Difference between revisions

From RAGE Multiplayer Wiki
(yay)
 
No edit summary
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
Clears the relationship between two groups. This should be called twice (once for each group).<br><br>Relationship types:<br>0 = Companion<br>1 = Respect<br>2 = Like<br>3 = Neutral<br>4 = Dislike<br>5 = Hate<br>255 = Pedestrians<br>(Credits: Inco)<br><br>Example:<br>PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, l_1017, 0xA49E591C);<br>PED::CLEAR_RELATIONSHIP_BETWEEN_GROUPS(2, 0xA49E591C, l_1017);
{{ClientsideJsFunction}}
{{JSContainer|
 
==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==
<pre>
* 0 = Companion
* 1 = Respect
* 2 = Like
* 3 = Neutral
* 4 = Dislike
* 5 = Hate
* 255 = Pedestrians
</pre>
==Syntax==
==Syntax==
<syntaxhighlight lang="javascript">ped.clearRelationshipBetweenGroups(relationship, group1, group2);</syntaxhighlight>
<syntaxhighlight lang="javascript">mp.game.ped.clearRelationshipBetweenGroups(relationship, group1, group2);</syntaxhighlight>
 
=== Required Arguments ===
=== Required Arguments ===
*'''relationship:''' int
*'''relationship:''' {{RageType|int}}
*'''group1:''' Model hash or name
*'''group1:''' {{RageType|string}} (Model hash or name)
*'''group2:''' Model hash or name
*'''group2:''' {{RageType|string}} (Model hash or name)
 
===Return value===
===Return value===
*'''Undefined'''
*'''Undefined'''
==Example==
==Example==
<syntaxhighlight lang="javascript">
<syntaxhighlight lang="javascript">
todo
// 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);
</syntaxhighlight>
</syntaxhighlight>
}}
==See also==
==See also==
{{Ped_function_c}}
{{Ped_s_function_c}}
[[Category:Clientside API]]
[[Category:Clientside API]]
[[Category:TODO: Example]]
[[Category:TODO: Example]]

Latest revision as of 12:20, 2 November 2024

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