Exemple #1
0
        private void setupPhone()
        {
            _iFruit = new CustomiFruit();
            iFruitContact contactDoc = new iFruitContact("Doc");

            contactDoc.Answered   += docAnswered;
            contactDoc.DialTimeout = 4000;
            contactDoc.Active      = true;
            contactDoc.Icon        = ContactIcon.Blank;
            _iFruit.Contacts.Add(contactDoc);
        }
Exemple #2
0
 private void InitPhone()
 {
     phone = 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
     };
     phone.SetWallpaper(Wallpaper.BadgerDefault);
 }
Exemple #3
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;
        }
Exemple #4
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;
        }
Exemple #5
0
    public ExampleScript()
    {
        // Custom phone creation
        _iFruit = new CustomiFruit();

        // Phone customization (totally optional)

        /*
         * _iFruit.CenterButtonColor = System.Drawing.Color.Orange;
         * _iFruit.LeftButtonColor = System.Drawing.Color.LimeGreen;
         * _iFruit.RightButtonColor = System.Drawing.Color.Purple;
         * _iFruit.CenterButtonIcon = SoftKeyIcon.Fire;
         * _iFruit.LeftButtonIcon = SoftKeyIcon.Police;
         * _iFruit.RightButtonIcon = SoftKeyIcon.Website;
         */

        // New contact (wait 4 seconds (4000ms) before picking up the phone)
        iFruitContact contactA = new iFruitContact("Test contact");

        contactA.Answered   += ContactAnswered;   // Linking the Answered event with our function
        contactA.DialTimeout = 4000;              // Delay before answering
        contactA.Active      = true;              // true = the contact is available and will answer the phone
        contactA.Icon        = ContactIcon.Blank; // Contact's icon
        _iFruit.Contacts.Add(contactA);           // Add the contact to the phone

        // New contact (wait 4 seconds before displaying "Busy...")
        iFruitContact contactB = new iFruitContact("Test contact 2");

        contactB.DialTimeout = 4000;
        contactB.Active      = false;           // false = the contact is busy
        contactB.Icon        = ContactIcon.Blocked;
        contactB.Bold        = true;            // Set the contact name in bold
        _iFruit.Contacts.Add(contactB);

        Tick += OnTick;
    }