# Installations

## Step 1 ➡ Dependencies&#x20;

This is one of the most important parts, since without the dependencies, the resource will never work or not start, here we will list the dependencies with their respective links for you to download and add them to your server.

{% embed url="<https://github.com/overextended/oxmysql>" %}

## Step 2 ➡ Resources in server.cfg

{% hint style="warning" %}
if you are using ESX ➡ NEVER, but NEVER, you must place the resources above `es_extended`, if you do this they will never work and will throw errors
{% endhint %}

The correct order of the resources is as follows, always keeping <mark style="color:orange;">es\_extended</mark> and its cores above, but the other normal resources below

```
ensure sfctab
```

## Step 3 ➡ Database

Run query/SQL query and paste below code

{% code fullWidth="false" %}

```sql
CREATE TABLE `crimetab` (
  `id` int(11) NOT NULL,
  `name` varchar(64) DEFAULT NULL,
  `owner` varchar(64) DEFAULT NULL,
  `date_creation` varchar(64) NOT NULL,
  `maxlimit` int(11) NOT NULL DEFAULT 6,
  `points` int(11) NOT NULL DEFAULT 0,
  `mission_active` int(11) NOT NULL DEFAULT 0,
  `mission_started` int(11) NOT NULL DEFAULT 0,
  `mission_ending` int(11) NOT NULL DEFAULT 0,
  `mission_success` int(11) NOT NULL DEFAULT 0,
  `stats` text NOT NULL DEFAULT ('{}'),
  `updates` text NOT NULL DEFAULT ('{}')
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `crimetab_missions` (
  `id` int(11) NOT NULL,
  `name` varchar(512) NOT NULL,
  `description` text NOT NULL,
  `cost` int(11) NOT NULL,
  `currency` varchar(16) NOT NULL,
  `action` varchar(32) NOT NULL,
  `lasttime` varchar(64) NOT NULL DEFAULT '0',
  `active` int(11) NOT NULL DEFAULT 0,
  `waiting` int(11) NOT NULL DEFAULT 600
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `crimetab_players` (
  `id` int(11) NOT NULL,
  `playerid` varchar(64) NOT NULL,
  `crimeid` int(11) NOT NULL,
  `position` int(11) NOT NULL,
  `date_creation` varchar(64) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE `crimetab_updates` (
  `id` int(11) NOT NULL,
  `name` varchar(512) NOT NULL,
  `description` text NOT NULL,
  `cost` int(11) NOT NULL,
  `currency` varchar(16) NOT NULL,
  `action` varchar(32) NOT NULL,
  `need` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `crimetab` ADD PRIMARY KEY (`id`);
ALTER TABLE `crimetab_missions` ADD PRIMARY KEY (`id`);
ALTER TABLE `crimetab_players` ADD PRIMARY KEY (`id`);
ALTER TABLE `crimetab_updates` ADD PRIMARY KEY (`id`);
ALTER TABLE `crimetab` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `crimetab_missions` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `crimetab_players` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
ALTER TABLE `crimetab_updates` MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;
```

{% endcode %}

Example data:

```sql
INSERT INTO `crimetab_missions` (`id`, `name`, `description`, `cost`, `currency`, `action`, `lasttime`, `active`, `waiting`) VALUES (1, 'Preparation for Fleeca Bank #1', 'Prepare accordingly for the attack.', 5, 'OCASH', 'fleeca1', '1689009097', 1, 600);
INSERT INTO `crimetab_updates` (`id`, `name`, `description`, `cost`, `currency`, `action`, `need`) VALUES (1, 'Increasing the limit #1', 'Increases the member limit by 4 additional slots.', 20, 'OCASH', 'peoplelimit', 0), (2, 'Increasing the limit #2', 'Increases the member limit by 6 additional slots.', 30, 'OCASH', 'peoplelimit2', 1);
```

## Step 4 ➡ Click on [Config](/resources/sfctab/config.md)&#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.scriptsfivem.com/resources/sfctab/installations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
