Overview
Determine whether two players are allies with each other.Syntax
var returnValue = allianceExistsBetween(playerA, playerB);
Parameters
Parameter | Type | Mandatory | Description |
---|---|---|---|
playerA | Number | The ID of the first player | |
playerB | Number | The ID of the second player |
Return value
Value | Type | Description |
---|---|---|
true | Boolean | Indicates that the two players are allied with each other |
false | Boolean | The two players are enemies of each other |
Example
Should I attack the other player?
if (!allianceExistsBetween(me,theOtherPlayer)) attackTheOtherPlayer();
See Also