示例#1
0
        public static bool IsIn(Player player, int interiorId)
        {
            if (EntityDecoration.ExistOn(player.Character, PlayerProperties.InteriorId))
            {
                return(EntityDecoration.Get <int>(player.Character, PlayerProperties.InteriorId) == interiorId);
            }

            return(false);
        }
示例#2
0
        public static bool IsInAny(Player player)
        {
            if (!EntityDecoration.ExistOn(player.Character, PlayerProperties.InteriorId))
            {
                return(false);
            }

            int interiorId = GetInteriorId(player);

            return(IsValid(interiorId));
        }
示例#3
0
        public static BitSet GetFlags(Player player)
        {
            Ped character = player.Character;

            if (EntityDecoration.ExistOn(character, PlayerProperties.Flags))
            {
                return(EntityDecoration.Get <int>(character, PlayerProperties.Flags));
            }

            return(DefaultFlags);
        }
示例#4
0
        public static void SetFlag(Player player, PlayerFlag flag, bool toggle)
        {
            BitSet flags = GetFlags(player);

            if (toggle)
            {
                flags.Set((int)flag);
            }
            else
            {
                flags.Unset((int)flag);
            }

            EntityDecoration.Set(player.Character, PlayerProperties.Flags, flags);
        }
示例#5
0
        //CustomiFruit ifruit;

        public FRGenerics()
        {
            EntityDecoration.RegisterProperty(PlayerProperties.InteriorId, DecorationType.Int);
            EntityDecoration.RegisterProperty(PlayerProperties.InteriorOwner, DecorationType.Int);
            EntityDecoration.RegisterProperty(PlayerProperties.Flags, DecorationType.Int);

            EventHandlers["onClientMapStart"] += new Action <dynamic>((res) =>
            {
                Function.Call(Hash._LOAD_MP_DLC_MAPS);
                Function.Call(Hash._ENABLE_MP_DLC_MAPS, true);

                Function.Call(Hash.REQUEST_IPL, "DT1_03_Gr_Closed");
                Function.Call(Hash.REQUEST_IPL, "TrevorsTrailer");
                Function.Call(Hash.REQUEST_IPL, "v_tunnel_hole");
                Function.Call(Hash.REQUEST_IPL, "FIBlobbyfake");
                Function.Call(Hash.REQUEST_IPL, "TrevorsMP");
                Function.Call(Hash.REQUEST_IPL, "farm");
                Function.Call(Hash.REQUEST_IPL, "farmint");
                Function.Call(Hash.REQUEST_IPL, "farm_props");
                Function.Call(Hash.REQUEST_IPL, "farmint_cap");
                Function.Call(Hash.REQUEST_IPL, "CS1_02_cf_offmission");
            });

            //Tick += OnTick;

            //ifruit = new CustomiFruit() {
            //  CenterButtonColor = KnownColorTable.GimmeTheColor(KnownColor.Orange),
            //  LeftButtonColor = KnownColorTable.GimmeTheColor(KnownColor.LimeGreen),
            //  RightButtonColor = KnownColorTable.GimmeTheColor(KnownColor.Purple),
            //  CenterButtonIcon = SoftKeyIcon.Fire,
            //  LeftButtonIcon = SoftKeyIcon.Police,
            //  RightButtonIcon = SoftKeyIcon.Website
            //};

            //ifruit.SetWallpaper(Wallpaper.BadgerDefault);

            //var contact = new iFruitContact("Spawn Adder", 19);
            //contact.Answered += Contact_Answered;
            //contact.DialTimeout = 8000;
            //contact.Active = true;

            ////set custom icons by instantiating the ContactIcon class
            //contact.Icon = new ContactIcon("char_sasquatch");

            //ifruit.Contacts.Add(contact);

            //contact = new iFruitContact("Teleport to Waypoint", 20);
            //contact.Answered += (s) => Scripts.TeleportToWaypoint();
            //contact.DialTimeout = 0;
            //contact.Icon = ContactIcon.Target;

            //ifruit.Contacts.Add(contact);

            //Function.Call(Hash.CREATE_MOBILE_PHONE);

            //var pos = Game.PlayerPed.GetOffsetPosition(new Vector3(1f, 0, 0));

            //Function.Call(Hash.SET_MOBILE_PHONE_POSITION, pos.X, pos.Y, pos.Z);


            //Function.Call(Hash.REQUEST_STREAMED_TEXTURE_DICT, "custom_images");

            //frng = new Fringe();
            //frng.Players = Players;
            Tick += OnTick21;

            //IsCreated = false;
            //Tick += OnTickRT;
        }
示例#6
0
 public static void SetInterOwnerToMyself(Player player)
 {
     EntityDecoration.Set(player.Character, PlayerProperties.InteriorOwner, -1);
 }
示例#7
0
 public static void SetInteriorOwner(Player player, Player owner)
 {
     EntityDecoration.Set(player.Character, PlayerProperties.InteriorOwner, owner.Handle);
 }
示例#8
0
 public static void SetInteriorId(Player player, int interiorId)
 {
     EntityDecoration.Set(player.Character, PlayerProperties.InteriorId, interiorId);
 }
示例#9
0
 public static int GetInteriorOwner(Player player)
 {
     return(EntityDecoration.Get <int>(player.Character, PlayerProperties.InteriorOwner));
 }