public void ClearRelationshipBetweenGroups(RelationshipGroup targetGroup, Relationship relationship, bool bidirectionally = false)
        {
            Function.Call(Native.Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, relationship, Hash, targetGroup.NativeValue);

            if (bidirectionally)
            {
                Function.Call(Native.Hash.CLEAR_RELATIONSHIP_BETWEEN_GROUPS, relationship, targetGroup.NativeValue, Hash);
            }
        }
        public static Relationships FromId(RelationshipGroup id)
        {
            Relationships retval = null;

            if (_instanceCache == null)
            {
                _instanceCache = new Dictionary <RelationshipGroup, Relationships>();
            }
            else if (_instanceCache.TryGetValue(id, out retval))
            {
                return(retval);
            }

            retval = new Relationships(id);
            _instanceCache.Add(id, retval);

            return(retval);
        }
 public void RemoveRelationTo(RelationshipGroup target, RelationshipType relation)
 {
     Internal.Function.Call(0x0747, (int)relation, (int)Id, (int)target);
 }
 private Relationships(RelationshipGroup id)
 {
     Id = id;
 }
예제 #5
0
 public void SetRelationTo(RelationshipGroup target, RelationshipType relation)
 {
     Internal.Function.Call(0x0746, (int)relation, (int)_pedType, (int)target);
 }
예제 #6
0
 private Relationships(RelationshipGroup id)
 {
     _pedType = id;
 }
 public Relationship GetRelationshipBetweenGroups(RelationshipGroup targetGroup)
 {
     return(Function.Call <Relationship>(Native.Hash.GET_RELATIONSHIP_BETWEEN_GROUPS, Hash, targetGroup.NativeValue));
 }