# Terminal Hacker

[**Buy Here**](https://codesign.pro/product/4206364)

[**FiveM Forums Post**](https://forum.cfx.re/t/paid-terminal-hacker-minigame-by-codesign/2071255)

[**YouTube Showcase Video**](https://youtu.be/jY3yl4cVT9Q)

#### Translate

* [Click here to translate this page.](https://docs-codesign-pro.translate.goog/paid-scripts/terminal-hacker-minigame?_x_tr_sl=en&_x_tr_tl=es&_x_tr_hl=en-GB&_x_tr_pto=nui)
* [How do I change language?](https://gyazo.com/38606313ac9a7c290dc2c72b6793bde6)

## INSTALLATION GUIDE

### Step 0 - First Steps

{% hint style="warning" %}
**1.** Download your resource from [FiveM’s Keymaster](https://keymaster.fivem.net/asset-grants). &#x20;

**2.** Unzip the `cd_terminalhacker.zip` folder and place this folder in your server's resource folder.

**3.** Add the resource to your server start config (server.cfg): `ensure cd_terminalhacker`.
{% endhint %}

### Step 1 - Configure Resource

{% hint style="warning" %}
You **MUST** read all configurable options inside the **`[cd_terminalhacker/configs/config.lua]`** file and configure them to suit your server's needs. Please read the [”commented out help text”](https://i.imgur.com/QCja8UZ.png) at the end of each line so you can understand what each config option does.

**The most important section is the options under the** [**Important** ](https://i.imgur.com/IVm7E8l.png)**section at the top of the `config.lua`. Everything else is optional.**
{% endhint %}

### Step 2 - Integrate Into Your Robbery Resources

This works like any other hacking mini-game for FiveM, just more interactive. You would place the export (as seen below) in a robbery script, for example, and if the player completes the hack, you can either reward the player or allow them to progress to the next stage. The scoreboard allows players to compete for the bragging rights of the best hacker.

*The code below can only be placed inside a client.lua file, not a server.lua file.*

```lua
local example = exports['cd_terminalhacker']:StartTerminalHacking()
if example.success then
    print('im a winner')
    print(example.time) --Returns the amount of time taken to complete (in seconds).
    print(example.score) --Returns the score. (You gain a higher score from downloading more optional files).
else
    print('i suck so bad')
end
```

##

## INFORMATION

### Chat Commands

These chat commands can be renamed and/or disabled in the [Keys and Commands](https://i.imgur.com/bTvuXLZ.png) section of the `[configs/config.lua]`.

The exact usage for each command will be displayed in the chat suggestions when using the commands in-game.

| **Command**           | **Description**                                                           |
| --------------------- | ------------------------------------------------------------------------- |
| **`/terminalhacker`** | (Test Command) This is a test command which opens the terminal hacker UI. |

### **About The Game**

The hacking game's point is finding the proper .exe file somewhere in a remote PC's directory. Some .exe files are corrupted and will set you back. (You need to figure out which is which). Along your search path, you are supposed to download additional files from the file system and gain a score. Score and time taken to determine the leader board placement, and the server owner can set their actions based on time and score.

##

## COMMON ISSUES

Please check out our [**Troubleshooting Guide**](https://docs.codesign.pro/coding-information/self-debugging#troubleshooting) before contacting our support.

🔔 <mark style="color:red;">**Folder Name**</mark> Make sure the folder name is `cd_terminalhacker`.

🔔 <mark style="color:red;">**Encrypted Files**</mark> Do not edit the encrypted files in any way.

## ERROR CODES

If you see an error code not listed below, please open a script support ticket in the [Codesign Discord](https://discord.gg/codesign).

{% tabs %}
{% tab title="Server" %}
N/A
{% endtab %}

{% tab title="Client" %}
N/A
{% endtab %}
{% endtabs %}

## CHANGELOG

> **Files Changed**
>
> Not every update requires you to replace the whole folder. We do this because we understand it's a pain to redo the configs for every update.

* **All Files -** This means you should delete your old `cd_terminalhacker` folder, download and add in the latest version, reconfigure the configs folder and restart your server.
* **All Files Except config.lua -** This means you should do all of the above (in the All Files section) but additionally **make a backup of the `config.lua`** file and replace the new config.lua file with the one you made a backup of.
* **Specific Files -** This means you can copy and paste the **SPECIFIC** new files over the old ones and restart the server.

> **Update Type**
>
> On rare occasions, you are forced to update to the latest version. Mostly due to authentication updates where the old versions will no longer work.

* **Mandatory -** This means you MUST update to this new version, or the old versions will no longer work.
* **Optional -** This means it's completely your choice whether you wish to update to the latest version. But we do not offer support for old versions for obvious reasons; they are old.

{% hint style="warning" %}
**Skipping Updates**

If you are attempting to update to the latest version but have skipped previous updates you should update all files just to be safe. For example., let's say you are currently on v4.0.1, you did not update when v4.0.2 was released, and now v4.0.3 is released and you want to update; you should always use the “All Files” update method.
{% endhint %}

{% tabs %}
{% tab title="v3.0.0" %}

### 26/12/2020 - 21/06/2021

v3.0.0 - v3.0.4

**Files Changed:**&#x20;

* [x] All Files
* [ ] All Files Except config.lua
* [ ] Specific Files

**Update Type:**

* [x] Mandatory
* [ ] Optional

**Changelog:**

{% hint style="warning" %}
**Fix**

* Fixed random server error on server start.
* Fixed a login bug fix.
* Temporary fix for the canary issue until the new Tebex FiveM license system is ready to launch, when this is released we will be fully switching over to the new system.
* Fix for terminalhacker not properly resetting after exiting.
  {% endhint %}
  {% endtab %}

{% tab title="v4.0.0" %}

### 02/11/2021

**Files Changed:**&#x20;

* [x] All Files
* [ ] All Files Except config.lua
* [ ] Specific Files

**Update Type:**

* [x] Mandatory
* [ ] Optional

**Changelog:**

{% hint style="danger" %}
**Authentication**

* **We are now using the official Authentication System provided by FiveM. The old auth system will be taken offline 1 week from now (give or take a few days if needed).**
  {% endhint %}
  {% endtab %}

{% tab title="v4.0.1" %}

### 08/11/2021

**Files Changed:**&#x20;

* [ ] All Files
* [ ] All Files Except config.lua
* [x] Specific Files

```
fxmanifest.lua - (IMPORTANT)
server/main/server.lua - (IMPORTANT)
client/main/client.lua - (IMPORTANT)
html (FULL FOLDER) - (IMPORTANT)
```

**Update Type:**

* [x] Mandatory
* [ ] Optional

**Changelog:**

{% hint style="danger" %}
**Authentication**

* **Small authentication update to ensure stability**.
  {% endhint %}
  {% endtab %}
  {% endtabs %}
