Exemplo n.º 1
0
        public ExampleScript()
        {
            ifruit = new CustomiFruit()
            {
                CenterButtonColor = System.Drawing.Color.Orange,
                LeftButtonColor = System.Drawing.Color.LimeGreen,
                RightButtonColor = System.Drawing.Color.Purple,
                CenterButtonIcon = SoftKeyIcon.Fire,
                LeftButtonIcon = SoftKeyIcon.Police,
                RightButtonIcon = SoftKeyIcon.Website
            };

            ifruit.SetWallpaper(new Wallpaper("char_facebook"));
            //or..
            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);

            Tick += OnTick;
        }
Exemplo n.º 2
0
        public ExampleScript()
        {
            ifruit = new CustomiFruit() {
                SelectButtonColor = System.Drawing.Color.Orange,
                ReturnButtonColor = System.Drawing.Color.LimeGreen,
                KeypadButtonColor = System.Drawing.Color.Purple
            };

            var contact = new iFruitContact("Spawn Adder", 10);
            contact.Selected += (sender, args) => Scripts.SpawnVehicle("ADDER", Game.Player.Character.Position);
            ifruit.Contacts.Add(contact);
            contact = new iFruitContact("Teleport to Waypoint", 11);
            contact.Selected += (sender, args) => Scripts.TeleportToWaypoint();
            ifruit.Contacts.Add(contact);
            this.Tick += OnTick;
        }