Most Recent

JOIN NOW

How to Earn Money By just sharing Link ?
It is so easy ..

By The way , Welcome to HackHackers

First of all Join SHORTE.ST :

#ref-menu

  Click the “join” tab in the upper-right side. You will see a simple form with 3 fields that you need to fill - email address, confirm email and password. Accept terms&conditions and click the “register” button - that’s the orange one. And that’s it! Now check your inbox for an activation email and confirm your email address.

VERIFY YOUR EMAIL 

SHORTING A LINK 

#ref-menu

When on home page or on any other subpage you will see our mighty link shortener. - yes that’s the long , green box. Simply paste or type your loooong link and click “shorten”. Now you can copy your short link or shorten another link. All your links are available in “statistics”

Image result for shorte
Share your shortened links! When logged in, go to the “statistics” page. On the right of each short link - you will find 3 buttons for a quick share. Click one of them - Facebook for example, write a short comment, share it and watch the money flowing in!

#ref-menu

WITHDRAWAL

As their active user you will want to withdraw the money you’ve earned. REMEMBER - in order to withdraw your money your profile must be fully completed. If not - you can do this anytime, even from the withdraw page. Fill all the fields. Save your details and wait for the transfer. REMEMBER - we pay on the 10th of every month. Minimum withdrawal is $5 for PayPal, $20 for Payoneer and $5 for WebMoney.


#ref-menu

Hardip Parmar
Batch File – Numeric password cracker for “Rar” File
Picture of Batch File - Numeric password cracker for “Rar” File

Hello, Here is another batch file which can crack password of Rar File. You can easily use it to crack any rar file password.
Like our Facebook Page : https://www.facebook.com/HackHackersofficial/
Follow ME on Facebook : https://www.facebook.com/HardipParmarofficial
Join our Group : https://www.facebook.com/groups/HackHackersofficial/
Let’s Start.

Step 1: Open Notepad

Picture of Open Notepad
Open your Notepad [Start >> Run >> Type ”Notepad” >> Enter]

Step 2: Create Batch File

Picture of Create Batch File
Copy The Following code in notepad.
REM ============================================================
REM errorcode401.blogspot.in
@echo off
title Rar Password Cracker
mode con: cols=47 lines=20
copy “C:\Program Files\WinRAR\Unrar.exe
SET PSWD=0
SET DEST=%TEMP%\%RANDOM%
MD %DEST%
:RAR
cls
echo ———————————————-
echo                   GET DETAIL
echo ———————————————-
echo.
SET/P “NAME=Enter File Name  : ”
IF “%NAME%”==”” goto NERROR
goto GPATH
:NERROR
echo ———————————————-
echo                      ERROR
echo ———————————————-
echo Sorry you can’t leave it blank.
pause
goto RAR
:GPATH
SET/P “PATH=Enter Full Path : ”
IF “%PATH%”==”” goto PERROR
goto NEXT
:PERROR
echo ———————————————-
echo                      ERROR
echo ———————————————-
echo Sorry you can’t leave it blank.
pause
goto RAR
:NEXT
IF EXIST “%PATH%\%NAME%” GOTO START
goto PATH
:PATH
cls
echo ———————————————-
echo                     ERROR
echo ———————————————-
echo Opppss File does not Exist..
pause
goto RAR
:START
SET /A PSWD=%PSWD%+1
echo 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 0 1
echo  1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 1 1 0 0 0
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 0 0 1 1 1
echo  0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 0 0 0 0 0
echo 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0
echo  1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 1 0
echo 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 0 1 1 0
echo  1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 1 1 1 0
echo 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0
echo  1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0
echo 0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 0 1
echo  1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 1 0 1 0 0
echo 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 0 0 1 1 0
echo  1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 1 0 1 0 0 1
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 1 0 0
echo  0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 1 0 1 1
echo 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 0 1 1 0
echo  1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 1 0 1 0 0
echo 0 1 0 1 1 1 0 0 1 0 0 1 1 0 0 1 0 1 1 1 0 1 1
echo  1 0 1 0 0 1 0 1 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 1 1
echo  0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0
echo 1 1 1 1 1 0 1 1 0 0 0 1 1 0 1 0 1 0 1 1 0 0 0
echo  0 0 0 0 1 1 1 1 1 0 1 0 1 0 1 0 0 0 0 1 1 0 1
echo 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 0 0 0 0 1 0 1 1
UNRAR E -INUL -P%PSWD% “%PATH%\%NAME%” “%DEST%”
IF /I %ERRORLEVEL% EQU 0 GOTO FINISH
GOTO START
:FINISH
RD %DEST% /Q /S
Del “Unrar.exe
cls
echo ———————————————-
echo                     CRACKED
echo ———————————————-
echo.
echo PASSWORD FOUND!
echo FILE  = %NAME%
echo CRACKED PASSWORD = %PSWD%
pause>NUL
exit
REM ============================================================

Step 3: Save it

Picture of Save it
Save it with .bat extension[ e.g “RarPSWDCracker.bat”]

Step 4: Run

Picture of Run
Now Run it and Enter your File name and path then Hit Enter.

Step 5: Wait

Picture of Wait
Wait for some time until It crack the Password.

Step 6: cracked

Picture of cracked
That’s Done..!!
your password has been successfully cracked. now you can open your Rar file using this password.
[Note : It can only crack Numeric Password]

Hardip Parmar
Top 5 Best Hacking Tools Which Used By Pro Hackers
Hacking Is Not so easy.Hackers Do a lot of work and research.Most of the hackers use some tools for their work.So, Today I’m Going you to give some Cool and Working Hacking Tools Which used by professional hackers.


The List Of Hacking Tools Is Below.
#1 Armitage
Top 5 Best Hacking Tools Which Used By Pro Hackers
Armitage is best GUI form of Metasploit Framework. Metasploit is one of the best tools for running and handling exploit on Linux.Many Professional Ethical-Hackers and Pentesters also use this tool for testing security on Network.Armitage is the best tool for breaking the security of the network. Armitage is preinstalled in Kali OS Latest Version.

Download Armitage

If you want some tutorials about Armitage.Then Click On this link

Armitage Tutorials

#2 HashCat

Top 5 Best Hacking Tools Which Used By Pro Hackers
Hashcat is the self-proclaimed world’s fastest CPU-based password recovery tool. It is one best tools cracking thepassword.This hacking tool can do all type of attack and decrypt your hash.Basically, the hash can use for a brute-force attack, dictionary attack, hybrid attack andrule-based attack.Hashcat is preinstalled in Kali OS

#3 Wireshark

Wireshark is free and open source packet analyzer for Linux and Windows.This tool can capture all type of packets in the connected network.Wireshark can sniff all type of data in the network.Preinstalled in Kali.

Download Wireshark

#4 Social Engineer Toolkit
SET is a collection of some best exploits for hacking.This is best exploit tools of phishing, spoofing and doing lots ofstuff.This is preinstalled in Kali OS.

#5 Wifite


Wifite is a tool for hacking WiFi password.This WiFi hacking tool can hack almost all type of encryption like WPA, WEP and WPA-2.

Hardip Parmar
How to Hack Gmail account 3 Best ways
Hello friends...!! Welcome to HackHackers..!!

In this article we are going to learn 3 Best Ways to Hack Gmail account . It took me almost 5-6 hours to do this Experiments and finally i am here with 3 best working trick .!!

Hacking a Gmail address can come in handy if you lose your account password. It's also a good way to test your own account's security. There are several ways you can try to break in. Most methods rely on you obtaining someone's password through other means. Hacking someone else's Gmail account is illegal. 

LIMITATIONS : Gmail is an incredibly secure service. The only way you'll be able to "hack" into someone's account is by stealing their password. If your target has two-factor authentication, you'll need their mobile device as well. There is no other way around two-factor authentication.

LEGALITY : It is absolutely illegal in most areas to access someone's email account without authorization. This article is for educational purposes only.

ALSO READ : HOW TO CRACK CPANEL (CONTROL PANEL) OF WEBSITE ?


METHOD 1 : USING A KEY LOGGER 

A keylogger is a program that logs the keystrokes on the computer it is installed on. There are a variety of keylogger programs available for free or for purchase online, with varying degrees of stealthiness. Be sure to research all of your options carefully. Popular programs include:
  • Actual Keylogger
  • Spyrix Free Keylogger
  • BlackBox Express
  • KidLogger
  • NetBull
I prefer NetBull . So we will continue with NetBull.


Download Net BUll

Now you have to Install it on your Victim's computer . 

This will require administrator access to the target's computer. On many computers, the password will be "admin" or will just be blank.
  • The process for installing the keylogger varies depending on the program you are using.
  • Installing a keylogger without the other person knowing is illegal.
NetNull sample
Now it's time to start a keylogger service .

Start the service so that it begins recording keystrokes. The process for this will vary depending on the program you are using. You may have to configure the program to record keys if it has multiple functions.

Monitor

Let the keylogger run while the target uses the computer. The keylogger will likely capture a lot of information. You can filter based on the window that the user is typing in.

Logs

VIEW THE LOGS : 

Some keyloggers will send the logs to your email. Others will require you to export them from the computer that the program is running on. Browse through the logs until you find what you suspect to be the target's Gmail password. You may be able to filter by the Gmail login page.

  • If the keylogger doesn't send you the logs via email, you'll need to access the program on the computer you installed it on to view them.

METHOD 2 : USING BROWSER'S PASSWORD MANAGER

Browser

Open the web browser that your target uses on their computer.I am using google chrome


You must have access to that person's computer. Try this when they're out of the room or you know that you have a few minutes alone.
  • Open a link from an email or a Help menu to launch the default browser.
password manager

OPEN THE PASSWORD MANAGER :


The process for accessing the password manager is different depending on the browser you are using.
  • Internet Explorer - Click the Gear button or the Tools menu and select "Internet Options." Click the "Content" tab and then click the "Settings" button in the AutoComplete section. Select "Manage Passwords" from the new window.
  • Chrome - Click the Chrome Menu button (☰) and select "Settings." Click the "Show advanced settings" link and then scroll to the "Passwords and forms" section. Click "Manage passwords."
  • Firefox - Click the Firefox Menu button (☰) and select "Options." Click the "Security" tab and then click "Saved Passwords."
  • Safari - Click the Safari menu and select "Preferences." Click the "Passwords" tab.
search password

Find the password for your target's Google account.

Use the search bar in the password manager to search for "google". This is the quickest way to narrow down the list of passwords. Look for the "accounts.google.com" entry for the target's Gmail address.

Show password

DISPLAY THE PASSWORD

Select the password and then click the "Show" or "Show Password" button. You may have to enter the administrator password for the computer before the passwords are displayed.

Password

Done

 Write down the password and then close the password manager.

Make note of the password as well as the exact Gmail address. Close the password manager when you are done to cover your tracks.
login


Try the password from another computer.

If the target has not enabled two-factor authentication, then you should be able to access the account. The target will likely be notified that a login has occurred from an unknown browser.
  • If the target has two-factor authentication activated, then you will need the code that is sent to their mobile device. There is no way around this if it is activated.

METHOD 3 : USING PACKET SNIFFER

sign in

UNDERSTAND THE PROCESS :

Whenever someone logs into Gmail (or any other login service), a file called a "cookie" is sent to their computer. This cookie allows the user to stay logged in, even if they leave Gmail. A packet sniffer can find cookies being transferred over a wireless network. When you find a Gmail cookie, you can open it on your computer and potentially access your target's inbox. You'll need to be connected to the same wireless network as your target.
  • This method will not work if your target has encryption enabled (https://). This is enabled by default in Gmail, so it's usefulness is limited.
  • Using a packet sniffer on a public network to intercept traffic is illegal.
Download wireshark


DOWNLOAD AND INSTALL WIRESHARK :

Wireshark is a free network monitoring utility that you can download from wireshark.org. It is available for Windows, Mac, and Linux. Installing Wireshark is a straightforward process. Follow the prompts like you would with most programs.[2]
  • During installation, make sure to install the TShark component. This is essential for grabbing cookies over the wireless network. You will also need to install "WinPcap."
cookie cadger

Download Cookie Cadger

This is a Java program that will will find and intercept cookies being sent across the wireless network. Cookie Cadger doesn't need to be installed. It works the same in every operating system.
  • You will need to have Java 7 installed in order to use Cookie Cadger. You can download Java from java.com/download
network

Connect to the same wireless network your target is connected to

You will need to be connected to the same wireless network as your target. This means you'll need to be close.
wireshark

Launch Wireshark

Wireshark will need to be running in order for Cookie Cadger to work.

cookie cadger

Run Cookie Cadger and select your wireless adapter.

Select the adapter connected to the wireless network from the drop-down menu. You should see the main frame populate with unsecured cookies from other people using the network.

run

Use the domain filter to find Google cookies

The second column will display a list of domains that Cookie Cadger is finding cookies for. Look for Google domains, particularly mail.google.com.
  • Remember, this only works if the target is not using https. If their connection is secure, you will not be able to find the cookie.
reply request
Click "Replay This Request" when you've found a Gmail cookie

This will load the cookie into your own web browser. The right cookie will take you directly to the target's inbox.
  • You will no longer be able to access their Gmail when the person logs out.
that's it friends..!! If you have any single doubts in above 3 methods please comment below i will solve your doubts..!!! Thanks for reading ..!!


Quiz Loading...

Hardip Parmar
How to crack Cpanel (Control Panel ) of website ?
Hello friends ..!! Welcome to HackHackers..!!

In this post , we are going to crack c panel of any website that is vulnerable . SO just follow below steps .

To crack Cpanel, you must have :

1 - SHELLed Site
2 - Cpanel Cracker                               Download : Here
3 - List of Username and Password         Google It :P


Or, if you're using our shell, there already a cpanel cracker

start

Okay, let's get it started :)


Procedure

1- Upload cp.php into your shell. 

2- Scroll down, click on User and you will get something like this,

user

 You will get all the username of Cpanel

2- Copy the Username and Password from your dictionary and paste in the User and Pass column

user pass

3- Click start and wait them cracked. :D

4- You will get the result in the next page.

success

5. You can login at into the Cpanel at www.example.com:2082 :)

How's it ??? share your response  and doubts in comments  ..!!!

Hardip Parmar
How to Make a Tanks 3D Game with 3D audio ?
Hello friends..!!!

I am back to fulfill your another dream ..!! Think  ? You are right its About Game designer .!!

In this Post We are going to Learn How You can make a 3D Game With 3D audio. Recently I had Made this game in my college Project and fortunately All of my friends and teacher love this game . So i think its time to share all codes and game design with you guys..!! so keep calm , and  Let's make a 3D Game ..!!

First of all All You have to do is installing UNITY 3D . Don't worry , It's Easy . Follow This Link to download Unity 3D . Make sure You Mark All items in Setup of Unity 3D.

Now when You finish installation follow bellow steps ..!! it will tale 2-3 hours to download and install so please wait until it is successfully installed.

This what we are going to make ..!!

Game
Step 1 : After Installing Unity 3D . Follow This Link to download assets of Tank Game . This will take some time to download your assets . After you finished downloading it's time to look the video tutorial of it. I am Going to provide all Ready made code so you can skip the boring coding part and you are ready to make this 3D game within 1 hour .

Video Tutorial 1 (PHASE 1)  :

Phase 1 teaches you how to set up the base scene using the provided assets.



Video Tutorial 2 (PHASE 2) :


Tank Movement Script :

using UnityEngine;

public class TankMovement : MonoBehaviour
{
    public int m_PlayerNumber = 1;              // Used to identify which tank belongs to which player.  This is set by this tank's manager.
    public float m_Speed = 12f;                 // How fast the tank moves forward and back.
    public float m_TurnSpeed = 180f;            // How fast the tank turns in degrees per second.
    public AudioSource m_MovementAudio;         // Reference to the audio source used to play engine sounds. NB: different to the shooting audio source.
    public AudioClip m_EngineIdling;            // Audio to play when the tank isn't moving.
    public AudioClip m_EngineDriving;           // Audio to play when the tank is moving.
    public float m_PitchRange = 0.2f;           // The amount by which the pitch of the engine noises can vary.


    private string m_MovementAxisName;          // The name of the input axis for moving forward and back.
    private string m_TurnAxisName;              // The name of the input axis for turning.
    private Rigidbody m_Rigidbody;              // Reference used to move the tank.
    private float m_MovementInputValue;         // The current value of the movement input.
    private float m_TurnInputValue;             // The current value of the turn input.
    private float m_OriginalPitch;              // The pitch of the audio source at the start of the scene.


    private void Awake ()
    {
        m_Rigidbody = GetComponent<Rigidbody> ();
    }


    private void OnEnable ()
    {
        // When the tank is turned on, make sure it's not kinematic.
        m_Rigidbody.isKinematic = false;

        // Also reset the input values.
        m_MovementInputValue = 0f;
        m_TurnInputValue = 0f;
    }


    private void OnDisable ()
    {
        // When the tank is turned off, set it to kinematic so it stops moving.
        m_Rigidbody.isKinematic = true;
    }


    private void Start ()
    {
        // The axes names are based on player number.
        m_MovementAxisName = "Vertical" + m_PlayerNumber;
        m_TurnAxisName = "Horizontal" + m_PlayerNumber;

        // Store the original pitch of the audio source.
        m_OriginalPitch = m_MovementAudio.pitch;
    }


    private void Update ()
    {
        // Store the value of both input axes.
        m_MovementInputValue = Input.GetAxis (m_MovementAxisName);
        m_TurnInputValue = Input.GetAxis (m_TurnAxisName);

        EngineAudio ();
    }


    private void EngineAudio ()
    {
        // If there is no input (the tank is stationary)...
        if (Mathf.Abs (m_MovementInputValue) < 0.1f && Mathf.Abs (m_TurnInputValue) < 0.1f)
        {
            // ... and if the audio source is currently playing the driving clip...
            if (m_MovementAudio.clip == m_EngineDriving)
            {
                // ... change the clip to idling and play it.
                m_MovementAudio.clip = m_EngineIdling;
                m_MovementAudio.pitch = Random.Range (m_OriginalPitch - m_PitchRange, m_OriginalPitch + m_PitchRange);
                m_MovementAudio.Play ();
            }
        }
        else
        {
            // Otherwise if the tank is moving and if the idling clip is currently playing...
            if (m_MovementAudio.clip == m_EngineIdling)
            {
                // ... change the clip to driving and play.
                m_MovementAudio.clip = m_EngineDriving;
                m_MovementAudio.pitch = Random.Range(m_OriginalPitch - m_PitchRange, m_OriginalPitch + m_PitchRange);
                m_MovementAudio.Play();
            }
        }
    }


    private void FixedUpdate ()
    {
        // Adjust the rigidbodies position and orientation in FixedUpdate.
        Move ();
        Turn ();
    }


    private void Move ()
    {
        // Create a vector in the direction the tank is facing with a magnitude based on the input, speed and the time between frames.
        Vector3 movement = transform.forward * m_MovementInputValue * m_Speed * Time.deltaTime;

        // Apply this movement to the rigidbody's position.
        m_Rigidbody.MovePosition(m_Rigidbody.position + movement);
    }


    private void Turn ()
    {
        // Determine the number of degrees to be turned based on the input, speed and time between frames.
        float turn = m_TurnInputValue * m_TurnSpeed * Time.deltaTime;

        // Make this into a rotation in the y axis.
        Quaternion turnRotation = Quaternion.Euler (0f, turn, 0f);

        // Apply this rotation to the rigidbody's rotation.
        m_Rigidbody.MoveRotation (m_Rigidbody.rotation * turnRotation);
    }
}


Video Tutorial 3 ( PHASE 3 ) :



Camera Control Script :
   
using UnityEngine;

public class CameraControl : MonoBehaviour
{
    public float m_DampTime = 0.2f;                 // Approximate time for the camera to refocus.
    public float m_ScreenEdgeBuffer = 4f;           // Space between the top/bottom most target and the screen edge.
    public float m_MinSize = 6.5f;                  // The smallest orthographic size the camera can be.
    [HideInInspector] public Transform[] m_Targets; // All the targets the camera needs to encompass.


    private Camera m_Camera;                        // Used for referencing the camera.
    private float m_ZoomSpeed;                      // Reference speed for the smooth damping of the orthographic size.
    private Vector3 m_MoveVelocity;                 // Reference velocity for the smooth damping of the position.
    private Vector3 m_DesiredPosition;              // The position the camera is moving towards.


    private void Awake ()
    {
        m_Camera = GetComponentInChildren<Camera> ();
    }


    private void FixedUpdate ()
    {
        // Move the camera towards a desired position.
        Move ();

        // Change the size of the camera based.
        Zoom ();
    }


    private void Move ()
    {
        // Find the average position of the targets.
        FindAveragePosition ();

        // Smoothly transition to that position.
        transform.position = Vector3.SmoothDamp(transform.position, m_DesiredPosition, ref m_MoveVelocity, m_DampTime);
    }


    private void FindAveragePosition ()
    {
        Vector3 averagePos = new Vector3 ();
        int numTargets = 0;

        // Go through all the targets and add their positions together.
        for (int i = 0; i < m_Targets.Length; i++)
        {
            // If the target isn't active, go on to the next one.
            if (!m_Targets[i].gameObject.activeSelf)
                continue;

            // Add to the average and increment the number of targets in the average.
            averagePos += m_Targets[i].position;
            numTargets++;
        }

        // If there are targets divide the sum of the positions by the number of them to find the average.
        if (numTargets > 0)
            averagePos /= numTargets;

        // Keep the same y value.
        averagePos.y = transform.position.y;

        // The desired position is the average position;
        m_DesiredPosition = averagePos;
    }


    private void Zoom ()
    {
        // Find the required size based on the desired position and smoothly transition to that size.
        float requiredSize = FindRequiredSize();
        m_Camera.orthographicSize = Mathf.SmoothDamp (m_Camera.orthographicSize, requiredSize, ref m_ZoomSpeed, m_DampTime);
    }


    private float FindRequiredSize ()
    {
        // Find the position the camera rig is moving towards in its local space.
        Vector3 desiredLocalPos = transform.InverseTransformPoint(m_DesiredPosition);

        // Start the camera's size calculation at zero.
        float size = 0f;

        // Go through all the targets...
        for (int i = 0; i < m_Targets.Length; i++)
        {
            // ... and if they aren't active continue on to the next target.
            if (!m_Targets[i].gameObject.activeSelf)
                continue;

            // Otherwise, find the position of the target in the camera's local space.
            Vector3 targetLocalPos = transform.InverseTransformPoint(m_Targets[i].position);

            // Find the position of the target from the desired position of the camera's local space.
            Vector3 desiredPosToTarget = targetLocalPos - desiredLocalPos;

            // Choose the largest out of the current size and the distance of the tank 'up' or 'down' from the camera.
            size = Mathf.Max(size, Mathf.Abs(desiredPosToTarget.y));

            // Choose the largest out of the current size and the calculated size based on the tank being to the left or right of the camera.
            size = Mathf.Max(size, Mathf.Abs(desiredPosToTarget.x) / m_Camera.aspect);
        }

        // Add the edge buffer to the size.
        size += m_ScreenEdgeBuffer;

        // Make sure the camera's size isn't below the minimum.
        size = Mathf.Max (size, m_MinSize);

        return size;
    }


    public void SetStartPositionAndSize ()
    {
        // Find the desired position.
        FindAveragePosition ();

        // Set the camera's position to the desired position without damping.
        transform.position = m_DesiredPosition;

        // Find and set the required size of the camera.
        m_Camera.orthographicSize = FindRequiredSize ();
    }
}

Video Tutorial 4 (PHASE 4) :

 

Tank Health Script :

using UnityEngine;
using UnityEngine.UI;

public class TankHealth : MonoBehaviour
{
    public float m_StartingHealth = 100f;               // The amount of health each tank starts with.
    public Slider m_Slider;                             // The slider to represent how much health the tank currently has.
    public Image m_FillImage;                           // The image component of the slider.
    public Color m_FullHealthColor = Color.green;       // The color the health bar will be when on full health.
    public Color m_ZeroHealthColor = Color.red;         // The color the health bar will be when on no health.
    public GameObject m_ExplosionPrefab;                // A prefab that will be instantiated in Awake, then used whenever the tank dies.
    
    
    private AudioSource m_ExplosionAudio;               // The audio source to play when the tank explodes.
    private ParticleSystem m_ExplosionParticles;        // The particle system the will play when the tank is destroyed.
    private float m_CurrentHealth;                      // How much health the tank currently has.
    private bool m_Dead;                                // Has the tank been reduced beyond zero health yet?


    private void Awake ()
    {
        // Instantiate the explosion prefab and get a reference to the particle system on it.
        m_ExplosionParticles = Instantiate (m_ExplosionPrefab).GetComponent<ParticleSystem> ();

        // Get a reference to the audio source on the instantiated prefab.
        m_ExplosionAudio = m_ExplosionParticles.GetComponent<AudioSource> ();

        // Disable the prefab so it can be activated when it's required.
        m_ExplosionParticles.gameObject.SetActive (false);
    }


    private void OnEnable()
    {
        // When the tank is enabled, reset the tank's health and whether or not it's dead.
        m_CurrentHealth = m_StartingHealth;
        m_Dead = false;

        // Update the health slider's value and color.
        SetHealthUI();
    }


    public void TakeDamage (float amount)
    {
        // Reduce current health by the amount of damage done.
        m_CurrentHealth -= amount;

        // Change the UI elements appropriately.
        SetHealthUI ();

        // If the current health is at or below zero and it has not yet been registered, call OnDeath.
        if (m_CurrentHealth <= 0f && !m_Dead)
        {
            OnDeath ();
        }
    }


    private void SetHealthUI ()
    {
        // Set the slider's value appropriately.
        m_Slider.value = m_CurrentHealth;

        // Interpolate the color of the bar between the choosen colours based on the current percentage of the starting health.
        m_FillImage.color = Color.Lerp (m_ZeroHealthColor, m_FullHealthColor, m_CurrentHealth / m_StartingHealth);
    }


    private void OnDeath ()
    {
        // Set the flag so that this function is only called once.
        m_Dead = true;

        // Move the instantiated explosion prefab to the tank's position and turn it on.
        m_ExplosionParticles.transform.position = transform.position;
        m_ExplosionParticles.gameObject.SetActive (true);

        // Play the particle system of the tank exploding.
        m_ExplosionParticles.Play ();

        // Play the tank explosion sound effect.
        m_ExplosionAudio.Play();

        // Turn the tank off.
        gameObject.SetActive (false);
    }
}

UI Direction Control :


using UnityEngine;

public class UIDirectionControl : MonoBehaviour
{
    // This class is used to make sure world space UI
    // elements such as the health bar face the correct direction.

    public bool m_UseRelativeRotation = true;       // Use relative rotation should be used for this gameobject?


    private Quaternion m_RelativeRotation;          // The local rotatation at the start of the scene.


    private void Start ()
    {
        m_RelativeRotation = transform.parent.localRotation;
    }


    private void Update ()
    {
        if (m_UseRelativeRotation)
            transform.rotation = m_RelativeRotation;
    }
}

Video Tutorial 5 (PHASE 5) :



Shell Explosion Script :

using UnityEngine;

public class ShellExplosion : MonoBehaviour
{
    public LayerMask m_TankMask;                        // Used to filter what the explosion affects, this should be set to "Players".
    public ParticleSystem m_ExplosionParticles;         // Reference to the particles that will play on explosion.
    public AudioSource m_ExplosionAudio;                // Reference to the audio that will play on explosion.
    public float m_MaxDamage = 100f;                    // The amount of damage done if the explosion is centred on a tank.
    public float m_ExplosionForce = 1000f;              // The amount of force added to a tank at the centre of the explosion.
    public float m_MaxLifeTime = 2f;                    // The time in seconds before the shell is removed.
    public float m_ExplosionRadius = 5f;                // The maximum distance away from the explosion tanks can be and are still affected.


    private void Start ()
    {
        // If it isn't destroyed by then, destroy the shell after it's lifetime.
        Destroy (gameObject, m_MaxLifeTime);
    }


    private void OnTriggerEnter (Collider other)
    {
        // Collect all the colliders in a sphere from the shell's current position to a radius of the explosion radius.
        Collider[] colliders = Physics.OverlapSphere (transform.position, m_ExplosionRadius, m_TankMask);

        // Go through all the colliders...
        for (int i = 0; i < colliders.Length; i++)
        {
            // ... and find their rigidbody.
            Rigidbody targetRigidbody = colliders[i].GetComponent<Rigidbody> ();

            // If they don't have a rigidbody, go on to the next collider.
            if (!targetRigidbody)
                continue;

            // Add an explosion force.
            targetRigidbody.AddExplosionForce (m_ExplosionForce, transform.position, m_ExplosionRadius);

            // Find the TankHealth script associated with the rigidbody.
            TankHealth targetHealth = targetRigidbody.GetComponent<TankHealth> ();

            // If there is no TankHealth script attached to the gameobject, go on to the next collider.
            if (!targetHealth)
                continue;

            // Calculate the amount of damage the target should take based on it's distance from the shell.
            float damage = CalculateDamage (targetRigidbody.position);

            // Deal this damage to the tank.
            targetHealth.TakeDamage (damage);
        }

        // Unparent the particles from the shell.
        m_ExplosionParticles.transform.parent = null;

        // Play the particle system.
        m_ExplosionParticles.Play();

        // Play the explosion sound effect.
        m_ExplosionAudio.Play();

        // Once the particles have finished, destroy the gameobject they are on.
        Destroy (m_ExplosionParticles.gameObject, m_ExplosionParticles.duration);

        // Destroy the shell.
        Destroy (gameObject);
    }


    private float CalculateDamage (Vector3 targetPosition)
    {
        // Create a vector from the shell to the target.
        Vector3 explosionToTarget = targetPosition - transform.position;

        // Calculate the distance from the shell to the target.
        float explosionDistance = explosionToTarget.magnitude;

        // Calculate the proportion of the maximum distance (the explosionRadius) the target is away.
        float relativeDistance = (m_ExplosionRadius - explosionDistance) / m_ExplosionRadius;

        // Calculate damage as this proportion of the maximum possible damage.
        float damage = relativeDistance * m_MaxDamage;

        // Make sure that the minimum damage is always 0.
        damage = Mathf.Max (0f, damage);

        return damage;
    }
}

Video Tutorial 6 (PHASE 6):




Tank Shooting Script :

using UnityEngine;
using UnityEngine.UI;

public class TankShooting : MonoBehaviour
{
    public int m_PlayerNumber = 1;              // Used to identify the different players.
    public Rigidbody m_Shell;                   // Prefab of the shell.
    public Transform m_FireTransform;           // A child of the tank where the shells are spawned.
    public Slider m_AimSlider;                  // A child of the tank that displays the current launch force.
    public AudioSource m_ShootingAudio;         // Reference to the audio source used to play the shooting audio. NB: different to the movement audio source.
    public AudioClip m_ChargingClip;            // Audio that plays when each shot is charging up.
    public AudioClip m_FireClip;                // Audio that plays when each shot is fired.
    public float m_MinLaunchForce = 15f;        // The force given to the shell if the fire button is not held.
    public float m_MaxLaunchForce = 30f;        // The force given to the shell if the fire button is held for the max charge time.
    public float m_MaxChargeTime = 0.75f;       // How long the shell can charge for before it is fired at max force.


    private string m_FireButton;                // The input axis that is used for launching shells.
    private float m_CurrentLaunchForce;         // The force that will be given to the shell when the fire button is released.
    private float m_ChargeSpeed;                // How fast the launch force increases, based on the max charge time.
    private bool m_Fired;                       // Whether or not the shell has been launched with this button press.


    private void OnEnable()
    {
        // When the tank is turned on, reset the launch force and the UI
        m_CurrentLaunchForce = m_MinLaunchForce;
        m_AimSlider.value = m_MinLaunchForce;
    }


    private void Start ()
    {
        // The fire axis is based on the player number.
        m_FireButton = "Fire" + m_PlayerNumber;

        // The rate that the launch force charges up is the range of possible forces by the max charge time.
        m_ChargeSpeed = (m_MaxLaunchForce - m_MinLaunchForce) / m_MaxChargeTime;
    }


    private void Update ()
    {
        // The slider should have a default value of the minimum launch force.
        m_AimSlider.value = m_MinLaunchForce;

        // If the max force has been exceeded and the shell hasn't yet been launched...
        if (m_CurrentLaunchForce >= m_MaxLaunchForce && !m_Fired)
        {
            // ... use the max force and launch the shell.
            m_CurrentLaunchForce = m_MaxLaunchForce;
            Fire ();
        }
        // Otherwise, if the fire button has just started being pressed...
        else if (Input.GetButtonDown (m_FireButton))
        {
            // ... reset the fired flag and reset the launch force.
            m_Fired = false;
            m_CurrentLaunchForce = m_MinLaunchForce;

            // Change the clip to the charging clip and start it playing.
            m_ShootingAudio.clip = m_ChargingClip;
            m_ShootingAudio.Play ();
        }
        // Otherwise, if the fire button is being held and the shell hasn't been launched yet...
        else if (Input.GetButton (m_FireButton) && !m_Fired)
        {
            // Increment the launch force and update the slider.
            m_CurrentLaunchForce += m_ChargeSpeed * Time.deltaTime;

            m_AimSlider.value = m_CurrentLaunchForce;
        }
        // Otherwise, if the fire button is released and the shell hasn't been launched yet...
        else if (Input.GetButtonUp (m_FireButton) && !m_Fired)
        {
            // ... launch the shell.
            Fire ();
        }
    }


    private void Fire ()
    {
        // Set the fired flag so only Fire is only called once.
        m_Fired = true;

        // Create an instance of the shell and store a reference to it's rigidbody.
        Rigidbody shellInstance =
            Instantiate (m_Shell, m_FireTransform.position, m_FireTransform.rotation) as Rigidbody;

        // Set the shell's velocity to the launch force in the fire position's forward direction.
        shellInstance.velocity = m_CurrentLaunchForce * m_FireTransform.forward; ;

        // Change the clip to the firing clip and play it.
        m_ShootingAudio.clip = m_FireClip;
        m_ShootingAudio.Play ();

        // Reset the launch force.  This is a precaution in case of missing button events.
        m_CurrentLaunchForce = m_MinLaunchForce;
    }
}


Video Tutorial 7 (PHASE 7):


Tank Manager Full Script :

using System;
using UnityEngine;

[Serializable]
public class TankManager
{
    // This class is to manage various settings on a tank.
    // It works with the GameManager class to control how the tanks behave
    // and whether or not players have control of their tank in the 
    // different phases of the game.

    public Color m_PlayerColor;                             // This is the color this tank will be tinted.
    public Transform m_SpawnPoint;                          // The position and direction the tank will have when it spawns.
    [HideInInspector] public int m_PlayerNumber;            // This specifies which player this the manager for.
    [HideInInspector] public string m_ColoredPlayerText;    // A string that represents the player with their number colored to match their tank.
    [HideInInspector] public GameObject m_Instance;         // A reference to the instance of the tank when it is created.
    [HideInInspector] public int m_Wins;                    // The number of wins this player has so far.
    

    private TankMovement m_Movement;                        // Reference to tank's movement script, used to disable and enable control.
    private TankShooting m_Shooting;                        // Reference to tank's shooting script, used to disable and enable control.
    private GameObject m_CanvasGameObject;                  // Used to disable the world space UI during the Starting and Ending phases of each round.


    public void Setup ()
    {
        // Get references to the components.
        m_Movement = m_Instance.GetComponent<TankMovement> ();
        m_Shooting = m_Instance.GetComponent<TankShooting> ();
        m_CanvasGameObject = m_Instance.GetComponentInChildren<Canvas> ().gameObject;

        // Set the player numbers to be consistent across the scripts.
        m_Movement.m_PlayerNumber = m_PlayerNumber;
        m_Shooting.m_PlayerNumber = m_PlayerNumber;

        // Create a string using the correct color that says 'PLAYER 1' etc based on the tank's color and the player's number.
        m_ColoredPlayerText = "<color=#" + ColorUtility.ToHtmlStringRGB(m_PlayerColor) + ">PLAYER " + m_PlayerNumber + "</color>";

        // Get all of the renderers of the tank.
        MeshRenderer[] renderers = m_Instance.GetComponentsInChildren<MeshRenderer> ();

        // Go through all the renderers...
        for (int i = 0; i < renderers.Length; i++)
        {
            // ... set their material color to the color specific to this tank.
            renderers[i].material.color = m_PlayerColor;
        }
    }


    // Used during the phases of the game where the player shouldn't be able to control their tank.
    public void DisableControl ()
    {
        m_Movement.enabled = false;
        m_Shooting.enabled = false;

        m_CanvasGameObject.SetActive (false);
    }


    // Used during the phases of the game where the player should be able to control their tank.
    public void EnableControl ()
    {
        m_Movement.enabled = true;
        m_Shooting.enabled = true;

        m_CanvasGameObject.SetActive (true);
    }


    // Used at the start of each round to put the tank into it's default state.
    public void Reset ()
    {
        m_Instance.transform.position = m_SpawnPoint.position;
        m_Instance.transform.rotation = m_SpawnPoint.rotation;

        m_Instance.SetActive (false);
        m_Instance.SetActive (true);
    }
}

Game Manager Full Script :

using System;
using UnityEngine;

[Serializable]
public class TankManager
{
    // This class is to manage various settings on a tank.
    // It works with the GameManager class to control how the tanks behave
    // and whether or not players have control of their tank in the 
    // different phases of the game.

    public Color m_PlayerColor;                             // This is the color this tank will be tinted.
    public Transform m_SpawnPoint;                          // The position and direction the tank will have when it spawns.
    [HideInInspector] public int m_PlayerNumber;            // This specifies which player this the manager for.
    [HideInInspector] public string m_ColoredPlayerText;    // A string that represents the player with their number colored to match their tank.
    [HideInInspector] public GameObject m_Instance;         // A reference to the instance of the tank when it is created.
    [HideInInspector] public int m_Wins;                    // The number of wins this player has so far.
    

    private TankMovement m_Movement;                        // Reference to tank's movement script, used to disable and enable control.
    private TankShooting m_Shooting;                        // Reference to tank's shooting script, used to disable and enable control.
    private GameObject m_CanvasGameObject;                  // Used to disable the world space UI during the Starting and Ending phases of each round.


    public void Setup ()
    {
        // Get references to the components.
        m_Movement = m_Instance.GetComponent<TankMovement> ();
        m_Shooting = m_Instance.GetComponent<TankShooting> ();
        m_CanvasGameObject = m_Instance.GetComponentInChildren<Canvas> ().gameObject;

        // Set the player numbers to be consistent across the scripts.
        m_Movement.m_PlayerNumber = m_PlayerNumber;
        m_Shooting.m_PlayerNumber = m_PlayerNumber;

        // Create a string using the correct color that says 'PLAYER 1' etc based on the tank's color and the player's number.
        m_ColoredPlayerText = "<color=#" + ColorUtility.ToHtmlStringRGB(m_PlayerColor) + ">PLAYER " + m_PlayerNumber + "</color>";

        // Get all of the renderers of the tank.
        MeshRenderer[] renderers = m_Instance.GetComponentsInChildren<MeshRenderer> ();

        // Go through all the renderers...
        for (int i = 0; i < renderers.Length; i++)
        {
            // ... set their material color to the color specific to this tank.
            renderers[i].material.color = m_PlayerColor;
        }
    }


    // Used during the phases of the game where the player shouldn't be able to control their tank.
    public void DisableControl ()
    {
        m_Movement.enabled = false;
        m_Shooting.enabled = false;

        m_CanvasGameObject.SetActive (false);
    }


    // Used during the phases of the game where the player should be able to control their tank.
    public void EnableControl ()
    {
        m_Movement.enabled = true;
        m_Shooting.enabled = true;

        m_CanvasGameObject.SetActive (true);
    }


    // Used at the start of each round to put the tank into it's default state.
    public void Reset ()
    {
        m_Instance.transform.position = m_SpawnPoint.position;
        m_Instance.transform.rotation = m_SpawnPoint.rotation;

        m_Instance.SetActive (false);
        m_Instance.SetActive (true);
    }
}


Video Tutorial 8 (PHASE 8):





Easy ? isn't it..!!

Hardip Parmar