esx_gangs not working

Everytime i try to run the gangs.sql it gives me an error saying image

Anyone know how to help me fix this?

-- Host:                         127.0.0.1
-- Server version:               10.4.13-MariaDB - mariadb.org binary distribution
-- Server OS:                    Win64
-- HeidiSQL Version:             11.0.0.5919
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


-- Dumping database structure for essentialmode
CREATE DATABASE IF NOT EXISTS `ChampionRP` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `ChampionRP`;

-- Dumping structure for table essentialmode.gangs
CREATE TABLE IF NOT EXISTS `gangs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `label` varchar(255) DEFAULT NULL,
  `inventory` longtext DEFAULT NULL,
  `leadership_rank` int(11) NOT NULL DEFAULT 3,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;

-- Dumping data for table essentialmode.gangs: 11 rows
/*!40000 ALTER TABLE `gangs` DISABLE KEYS */;
REPLACE INTO `gangs` (`id`, `name`, `label`, `inventory`, `leadership_rank`) VALUES
	(8, 'woo', 'woo', '{"dcash":0,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 3),
	(9, 'g', '100G', '{"dcash":0,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 3),
	(1, 'ysk', 'Y$K', '{"dcash":3800000,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 4),
	(17, 'drift', 'Drift', '{"cash":0,"dcash":1600000,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 1),
	(18, 'ms13', 'MS-13', '{"dcash":7900000,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 4),
	(14, 'cartel', 'Cartel', '{"dcash":1100000,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 4),
	(13, 'wicks', 'WICKS', '{"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 4),
	(15, 'nsu', 'NSU', '{"dcash":0,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 6),
	(16, 'boyz', 'Boyz In The Hood', '{"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 2),
	(19, 'dt', 'DT', '{"dcash":15308000,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 3),
	(10, 'sinister', 'Sinister', '{"cash":0,"dcash":0,"items":{"medikit":0,"meth_pooch":0,"bandage":0,"rolex":0,"diamond":0,"opium_pooch":0,"opium":0,"coke":0,"coke_pooch":0,"jewels":0,"meth":0},"cash":0}', 3);
/*!40000 ALTER TABLE `gangs` ENABLE KEYS */;

-- Dumping structure for table essentialmode.gang_ranks
CREATE TABLE IF NOT EXISTS `gang_ranks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `label` varchar(255) DEFAULT NULL,
  `gang_name` varchar(255) DEFAULT NULL,
  `ranking` int(11) DEFAULT NULL,
  `vehicles` longtext DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=92 DEFAULT CHARSET=latin1;

-- Dumping data for table essentialmode.gang_ranks: 60 rows
/*!40000 ALTER TABLE `gang_ranks` DISABLE KEYS */;
REPLACE INTO `gang_ranks` (`id`, `name`, `label`, `gang_name`, `ranking`, `vehicles`) VALUES
	(12, 'captain', 'Top Shooter', 'ysk', 2, NULL),
	(11, 'member', 'Shooter', 'ysk', 1, NULL),
	(10, 'recruit', 'Prospect', 'ysk', 0, NULL),
	(81, 'first', 'Demons', 'dt', 0, NULL),
	(79, 'sixth', 'Leader', 'ms13', 5, NULL),
	(78, 'fifth', 'DrugLord', 'ms13', 4, NULL),
	(77, 'forth', 'Shot Caller', 'ms13', 3, NULL),
	(13, 'coleader', 'OG', 'ysk', 3, NULL),
	(14, 'secondleader', 'Shot Callers', 'ysk', 4, NULL),
	(15, 'leader', 'Boss', 'ysk', 5, NULL),
	(49, 'og', 'OG', 'wicks', 3, NULL),
	(48, 'shooter', 'TopShooter', 'wicks', 2, NULL),
	(47, 'member', 'Member', 'wicks', 1, NULL),
	(46, 'recruit', 'Recruit', 'wicks', 0, NULL),
	(21, 'recruit', 'recruit', 'woo', 0, NULL),
	(22, 'member', 'member', 'woo', 1, NULL),
	(23, 'captain', 'Top Shooter', 'woo', 2, NULL),
	(24, 'coleader', 'CoLeader', 'woo', 3, NULL),
	(25, 'recruit', 'Member', 'g', 0, NULL),
	(26, 'member', 'Shooter', 'g', 1, NULL),
	(27, 'hitman', 'Hitman', 'g', 2, NULL),
	(28, 'og', 'OG', 'g', 3, NULL),
	(29, 'recruiter', 'Recruiter', 'g', 4, NULL),
	(30, 'leader', 'Leader', 'g', 5, NULL),
	(76, 'third', 'Thug', 'ms13', 2, NULL),
	(75, 'second', 'Hood Rat', 'ms13', 1, NULL),
	(74, 'member', 'Member', 'ms13', 0, NULL),
	(73, 'member', 'Member', 'mhs', 0, NULL),
	(72, 'leader', 'Founder', 'mhs', 1, NULL),
	(50, 'coleader', 'CoLeader', 'wicks', 4, NULL),
	(52, 'leader', 'Leader', 'wicks', 5, NULL),
	(53, 'leader', 'Leader', 'woo', 4, NULL),
	(54, 'recruit', 'Recruit', 'cartel', 0, NULL),
	(55, 'member', 'Member', 'cartel', 1, NULL),
	(56, 'shooter', 'Shooter', 'cartel', 2, NULL),
	(57, 'tops', 'TopShooter', 'cartel', 3, NULL),
	(58, 'coleader', 'CoLeader', 'cartel', 4, NULL),
	(59, 'leader', 'El Patron', 'cartel', 5, NULL),
	(60, 'young', 'Youngins', 'nsu', 0, NULL),
	(61, 'goon', 'Goons', 'nsu', 1, NULL),
	(62, 'og', 'OG', 'nsu', 2, NULL),
	(63, 'shooter', 'Shooter', 'nsu', 3, NULL),
	(64, 'topshooter', 'TopShooter', 'nsu', 4, NULL),
	(65, 'shotcaller', 'ShotCaller', 'nsu', 5, NULL),
	(66, 'coowner', 'Co-Owner', 'nsu', 6, NULL),
	(67, 'dog', 'TopDog', 'nsu', 7, NULL),
	(68, 'recruit', 'Recruit', 'boyz', 0, NULL),
	(69, 'shooter', 'Shooter', 'boyz', 1, NULL),
	(70, 'co', 'CoOwner', 'boyz', 2, NULL),
	(71, 'owner', 'Owner', 'boyz', 3, NULL),
	(82, 'second', 'Top Demons', 'dt', 1, NULL),
	(83, 'third', 'OG Demons', 'dt', 2, NULL),
	(84, 'forth', 'Devil', 'dt', 3, NULL),
	(85, 'leader', 'Leader', 'sinister', 3, NULL),
	(86, 'member', 'Member', 'sinister', 2, NULL),
	(87, 'trial', 'Trial', 'sinister', 1, NULL),
	(88, 'leader', 'Leader', 'drift', 3, NULL),
	(89, 'topshoota', 'Top Shoota', 'drift', 2, NULL),
	(90, 'member', 'Member', 'drift', 1, NULL),
	(91, 'trial', 'Trial', 'drift', 0, NULL);
/*!40000 ALTER TABLE `gang_ranks` ENABLE KEYS */;

CREATE TABLE IF NOT EXISTS `users` (
  `gang` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
  `gang_rank` int(11) DEFAULT NULL,
    PRIMARY KEY (identifier)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
 

Check that your users table has the identifier column.

CREATE TABLE IF NOT EXISTS `users` (
  `gang` varchar(50) COLLATE utf8mb4_bin DEFAULT NULL,
  `gang_rank` int(11) DEFAULT NULL,
    PRIMARY KEY (identifier) -- **Here you are again defining the identifier column as primary.**
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

Can’t find it

found it, it has the identifier column in it, but im still getter the error

the sql is trying to create a users table when you already have one(clearly). You need to add those two columns to your existing users table.

ye got that all to work now, but when i launch my server it says could not find dependency alpha-tango-golf for resource esx_gangs - where would I find alpha-tango-golf?

1 Like

where did you get your gangs script? The readmes usually list the dependencies and where to get them.

someone sent it to me and the other one i downloaded didn’t have a readme

It’s not a resource name that’s widely used. Your best option is to look at your gangs script to find out what it’s needing from that dependency then modify it to handle it on it’s own.

are you able to send the script i need it <3

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.