RustBuster Plugin

Discussion in 'Tech Support' started by enes35001, Sep 14, 2018 at 4:13 PM.

  1. enes35001
    Offline

    enes35001 Member Member

    Joined:
    Jul 27, 2016
    Messages:
    30
    Likes Received:
    4
    Code (C#):
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.ComponentModel;
    using UnityEngine;

    namespace GAim {
        public class GAim_GUI : MonoBehaviour {
            private bool ShowAim = true;
            public Texture2D Taskelis;
            public void Start() {
                byte[] Byteimage = System.Convert.FromBase64String("iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKBAMAAAB/HNKOAAAAHlBMVEUAAAAAAAEAAAEAAAEAAAH////y8vKtra0mJifv7+/kN/yFAAAABXRSTlMA8q1Ehq9quroAAAAuSURBVAjXY2AwElRmYGBpT6twYLCYGhrZzKAeGhpaxCAGJBMhJEQEIgtRCdEFAKbfDjcgZsgTAAAAAElFTkSuQmCC");
                Taskelis = new Texture2D(10, 10, TextureFormat.RGBA32, false);
                Taskelis.LoadImage(Byteimage);
                Debug.Log("Start AIM Dot By Gintaras");

            }
            public void OnGUI() {
                int w = Screen.width, h = Screen.height;
                Rect Mikpos = new Rect(0, 0, 60, 16); {
                    if (Input.GetKeyDown(KeyCode.F2))
                    {
                        if (ShowAim) {
                            ShowAim = false;
                        } else {
                            ShowAim = true;
                        }
                    }
                }
                if (ShowAim) {
                    GUI.DrawTexture(new Rect(w / 2 - h / 400, h / 2- h / 400, h / 200, h / 200), Taskelis, ScaleMode.StretchToFill);
                }
            }
        }
    }
    what is the problem here
     
    #1
  2. ice cold
    Offline

    ice cold Plugin Developer Plugin Developer

    Joined:
    Oct 24, 2016
    Messages:
    564
    Likes Received:
    52
    How could we know if you dont provide errors
     
    #2
  3. enes35001
    Offline

    enes35001 Member Member

    Joined:
    Jul 27, 2016
    Messages:
    30
    Likes Received:
    4
    I set the F2 key but it is not working
     
    #3
  4. ice cold
    Offline

    ice cold Plugin Developer Plugin Developer

    Joined:
    Oct 24, 2016
    Messages:
    564
    Likes Received:
    52
    Well i highly doubt it that you can detect keypress under a GUI
     
    #4
  5. Jakkee
    Offline

    Jakkee Plugin Developer Plugin Developer Contributor

    Joined:
    Jul 28, 2014
    Messages:
    1,446
    Likes Received:
    135
    Key detection should be under OnUpdate();
     
    #5
  6. DreTaX
    Offline

    DreTaX Probably knows the answer... Administrator

    Joined:
    Jun 29, 2014
    Messages:
    3,850
    Likes Received:
    636
    Indeed.
     
    #6

Share This Page