Results 1 to 4 of 4
  1. #1
    deivisxm's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    1

    Don't know how to start

    Hi all. I hope I am writing in the right section. I want to learn how to program hacks and I was thinking to start with unturned because it's a game I play a lot. So I want to try out the basics of injection hack first. I have this code
    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using UnityEngine;
    using Steamworks;
    using SDG.Unturned;
    
    public class Class1 : MonoBehaviour
    {
        bool gui;
        private bool toggleBool = true;
        private bool hack;
        private int selection;
        private int maxSelect;
    
        void Start()
        {
        }
        void update() { 
          if (Input.GetKeyDown(KeyCode.End))
            {
                Player.player.BroadcastMessage("TEST");
            }
            if (hack)
            {
                if(Input.GetKeyDown(KeyCode.DownArrow))
                {
                    if (selection != maxSelect)
                    {
                        selection += 1;
                    }
                    else
                    {
                        if (selection == maxSelect)
                        {
                            selection = 1;
                        }
                    }
                }
                
                if (Input.GetKeyDown(KeyCode.UpArrow))
                {
                    if (selection != 1)
                    {
                        selection -= 1;
                    }
                    else
                    {
                        if (selection == 1)
                        {
                            selection = maxSelect;
                        }
                    }
                }
                
                if (Input.GetKeyDown(KeyCode.RightControl))
                {
                    if (selection == 1)
                    {
                        selection1();
                    }
                    else
                    {
                        if (selection == 2)
                        {
                            selection2();
                        }
                        else
                        {
                            if (selection == 3)
                            {
                                selection3();
                            }
                            else
                            {
                                if (selection == 4)
                                {
                                    selection4();
                                }
                                else
                                {
    
                                }
                            }
                        }
                    }
                }
            }
    
        }
        // FUNCTIONS
        void selection1()
    {
    
    }
    
    void selection2()
    {
    
    }
    
    void selection3()
    {
    
    }
    
    void selection4()
    {
    
    }
    
    void OnGUI()
    {
        //Nice GUI
        GUI.color = Color.magenta;
        GUI.Label(new Rect(200, 0, 200, 40), "Hack Name v1.0");
        GUI.color = Color.white;
        if (hack)
        {
            GUI.Box(new Rect(0, 290, 120, 300), "- Functions -");
            if (selection == 1)
            {
                GUI.color = Color.red;
            }
            else
            {
                GUI.color = Color.white;
            }
            GUI.Label(new Rect(10, 320, 100, 30), "Selection1");
            if (selection == 2)
            {
                GUI.color = Color.red;
            }
            else
            {
                GUI.color = Color.white;
            }
            GUI.Label(new Rect(10, 350, 100, 30), "Selection2");
            if (selection == 3)
            {
                GUI.color = Color.red;
            }
            else
            {
                GUI.color = Color.white;
            }
            GUI.Label(new Rect(10, 380, 100, 30), "Selection3");
    
            if (selection == 4)
            {
                GUI.color = Color.red;
            }
            else
            {
                GUI.color = Color.white;
            }
            GUI.Label(new Rect(10, 410, 100, 30), "Selection4");
    
        }
    }
    }
    (Yes, I copied it from these forums)
    I try'ed to inject it with Extreme Injector v3.3 by master 131 but when it was injected nothing happened. What did I do wrong?

  2. #2
    Leins's Avatar
    Join Date
    Jan 2015
    Gender
    male
    Posts
    17
    Reputation
    10
    Thanks
    0
    My Mood
    Cool
    Post this in C programming forum https://www.mpgh.net/forum/forumdisplay.php?f=31

  3. #3
    Raikzun's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    59
    Reputation
    10
    Thanks
    1,177
    My Mood
    Psychedelic
    Maybe it doesnt do anything, because you dont have any functions..
    xD

  4. #4
    deivisxm's Avatar
    Join Date
    Nov 2012
    Gender
    male
    Posts
    13
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Raikzun View Post
    Maybe it doesnt do anything, because you dont have any functions..
    xD
    I would add actual functions if I would see the gui working, unfortunately it doesn't show up.

Similar Threads

  1. lamefags don't know how to shortpost
    By Austin in forum General
    Replies: 26
    Last Post: 04-29-2011, 04:26 PM
  2. HELP! i don't know how to put pics. and virus scans!
    By kikoloidz24 in forum K.O.S. Secret Operation Hacks
    Replies: 2
    Last Post: 04-05-2011, 09:53 AM
  3. I Don't Know How to Do This.
    By Death's Shadow in forum Combat Arms Mod Discussion
    Replies: 7
    Last Post: 03-22-2010, 10:37 PM
  4. So Im finally done and don't know where to start...
    By why06 in forum C++/C Programming
    Replies: 3
    Last Post: 03-22-2010, 04:20 PM
  5. [Release] Light Vest To Reacon Vest [ I don't know how to change texture]
    By DannyVaj in forum Combat Arms Mods & Rez Modding
    Replies: 15
    Last Post: 03-13-2010, 09:09 PM