> For the complete documentation index, see [llms.txt](https://mscripts.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mscripts.gitbook.io/docs/qbcore/illegal/qb-territories/installation.md).

# Installation

## Run the territories.sql file on your SQL:

```sql
CREATE TABLE IF NOT EXISTS `territories` (
  `id` int NOT NULL AUTO_INCREMENT,
  `gangName` varchar(50) DEFAULT NULL,
  `location` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8mb3;

INSERT INTO `territories` (`id`, `gangName`, `location`) VALUES
  (1, 'ballas', '{"x":2756.63,"y":1515.41,"z":24.50}'),
  (24, NULL, '{"x":3524.531982421875,"y":3714.883544921875,"z":36.6263427734375}'),
  (25, NULL, '{"x":-1892.914306640625,"y":2033.82861328125,"z":140.7244873046875}'),
  (26, NULL, '{"x":-2313.112060546875,"y":272.6637268066406,"z":169.5882568359375}')
;
```
