Jota Dev Criminal Organizations

Here you can see the documentation to learn how to install the criminal organization system.

How to start the script for its correct operation:

Put in your server.cfg

# JotaDev Criminal Organizations
ensure jc_organizaciones

Commands

  • Open admin Menu: /organizaciones

  • Open Actions Menu: /orgmenu (F6)

  • Open Tablet Iinteraction /tabletilegal (F10)

Script Settings:

Config = Config or {}
Config.Framework = "" -- Configure "esx" for the ESX framework or "qb" for QB-Core
Config.Locale = "es" -- Set your language to "es" to use Spanish and "en" to use English

Config.AllowedIdentifiers = {
    "steam:000000000000000",
    "license:00000000000000000000000000000",
    "discord:0000000000000000000",
}

Config.DeleteRobados = true -- true = removes stolen vehicles, false = behaves normally and can recover stolen vehicles
Config.MoneyRecover = 200
Config.MaxOrgVehicles = 2 -- Maximum number of vehicles an organization can have outside at one time

-- Enable or disable group validation for the administration panel
Config.CheckGroups = true

-- Configuring groups by framework
Config.Groups = {
    ace = { "admin", "superadmin" }, -- ACE groups
    esx = { "superadmin", "admin" }, -- ESX groups (xPlayer.getGroup())
    qb  = { "god", "admin" }         -- QB groups (Player.PlayerData.permission)
}

Config.BarrioBlip = {
    enabled = true, -- Toggle on/off if you want players to see their neighborhood blip on the map.
    sprite = 357,
    scale = 0.9,
    colour = 5,
    shortRange = false, -- true: only nearby, false: visible on the entire map
    label = "Mi Barrio"
}

Config.OpenOrgMenuKey = "F6" -- Organization's action menu
Config.OpenTabletIlegalMenuKey = "F10" -- Interaction tablet for organizations
Config.CommandPoliceRobos = 'robos'

Config.Almacen = {
    slots = 70, -- Number of slots for warehouses
    maxWeight = 50000  -- Maximum weight for warehouses
}

Config.Inventory = ""  -- "ox" | OX Inventory // "qs-inventory" | Qasar Inventory // "origen_inventory" | Origen Inventory // "qb-inventory" | QB Inventory // "esx_inventory" | For esx inventory default 

Config.RangosAjustes = { -- Ranges that will appear in the interaction tablet settings section
    "jefe"
}

Config.DarkChat = true  -- Enable/Disable DarkChat on the management tablet
Config.FiltroPalabrotas = true -- Activate/Deactivate the swear filter
Config.PalabrasProhibidas = { -- Forbidden words to use in dark chat
    "polla", "cabron", "cabrón", "puta", "puto", "putas", "putos",
    "gilipollas", "maricon", "maricón", "subnormal", "retrasado",
    "idiota", "imbecil", "imbécil", "zorra", "perra", "perro",
    "estupido", "estúpido", "mierda", "cagon", "cagón", "pendejo",
    "culiao", "pelotudo", "baboso", "mamon", "mamón", "tarado",
    "anormal", "mongolo", "chupapollas", "comeojete", "payaso",
    "asco", "asqueroso", "asquerosa", "hijoputa", "hijo de puta",
    "hdp", "malparido", "bastardo", "cornudo", "nazi", "racista",
    "negro de mierda", "sidoso", "apestoso", "pajero", "lerdo",
    "gordo de mierda"
}

Config.RegexProhibidas = {}
for _, palabra in ipairs(Config.PalabrasProhibidas) do
    local pattern = palabra:gsub("([.*+?^$()%%[%]-])", "%%%1")
    pattern = pattern:gsub("a", "[a@4]+")
    pattern = pattern:gsub("e", "[e3]+")
    pattern = pattern:gsub("i", "[i1!íì]+")
    pattern = pattern:gsub("o", "[o0óò]+")
    pattern = pattern:gsub("u", "[uúù]+")
    pattern = pattern:gsub("(.)", "%1[ ._-]*")
    table.insert(Config.RegexProhibidas, pattern)
end

Config.RobosAtracos = true -- Activate/Deactivate the Robberies and Heists section of the tablet

Config.PoliceJobs = { -- Mark police jobs here
    "police",
    "sheriff",
    "fbi"
}

Config.RobosTiempo = 30 -- Minutes you have from the start of the robbery until it ends to consider it successful or unsuccessful.

Config.BagStrength = 1.0 -- Opacity in black when they put the bag on you, if you don't want it completely black, lower it to 0.8 or 0.5, adjust as needed.

-- List of controls that are disabled when handcuffed
Config.HandcuffDisabledControls = {
--    1,    -- Pan
--    2,    -- Tilt
    21,   -- Sprint
    24,   -- Attack
    25,   -- Aim
    30,   -- D
    31,   -- S
    32,   -- W
    34,   -- A
    37,   -- Weapon Wheel
    44,   -- Cover
    45,   -- Reload
    47,   -- Weapon
    59,   -- Vehicle steering
    71,   -- Vehicle forward
    72,   -- Vehicle reverse
    73,   -- Clear animation
    75,   -- Exit vehicle
    140,  -- Melee
    141,  -- Melee
    142,  -- Melee
    143,  -- Melee
    170,  -- Animations
    167,  -- Job
--    199,  -- Pause
    264,  -- Melee
    257,  -- Attack 2
    263,  -- Melee Attack 1
    288,  -- Phone
    289,  -- Inventory
}

-- Different blips for when you have the blip option
Config.BlipsOrgas = {
    blip_players = 630,
    blip_coche = 225,
    blip_muerto = 274,
    blip_barco = 410,
    blip_helicoptero = 43 
}

if Config.Framework == 'qb' then
    QBCore = exports['qb-core']:GetCoreObject()
elseif Config.Framework == 'esx' then
    ESX = exports["es_extended"]:getSharedObject()
else
    print '^1[^6jc_organizaciones^1] ^2Framework No encontrada, ingrese esx o qb^0'
    return
end

Config.Debug = false

Insert the database for proper operation:

CREATE TABLE IF NOT EXISTS `jotadev_organizaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(64) NOT NULL,
  `label` varchar(64) NOT NULL,
  `color` varchar(9) DEFAULT NULL,
  `miembros_maximos` int(11) NOT NULL DEFAULT 1,
  `jefe` varchar(128) DEFAULT NULL,
  `permisos` text DEFAULT NULL,
  `logos_orga` varchar(255) DEFAULT NULL,
  `tienda` longtext DEFAULT NULL,
  `notas_administracion` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `puntos_data` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`puntos_data`)),
  `miembros` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`miembros`)),
  `rangos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`rangos`)),
  `nivel` float NOT NULL DEFAULT 1,
  `dinero_orga` int(11) NOT NULL DEFAULT 0,
  `interiores` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`interiores`)),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_nombre` (`nombre`)
) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `jotadev_graffiti` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(60) NOT NULL,
  `banda` varchar(50) NOT NULL,
  `coords` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`coords`)),
  `image` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `jotadev_orgs_robos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `label` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `policias_min` int(11) DEFAULT 0,
  `nivel_min` int(11) DEFAULT 1,
  `info` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`info`)),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `jotadev_orgs_robos` (`id`, `tipo`, `descripcion`, `nombre`, `label`, `policias_min`, `nivel_min`, `info`) VALUES
	(8, 'menor', 'Roba el Badulaque Central', 'Badu Central', 'badu_central', 1, 2, '[]'),
	(9, 'menor', 'Roba la Tienda de Tattos', 'Tienda Tattos', 'tienda_tatto', 2, 3, '[]'),
	(10, 'mayor', 'Roba el Banco Central y llevate todo su dinero', 'Banco Central', 'baco_central', 1, 1, '[]'),
	(11, 'mayor', 'Roba los Bancos Fleccas', 'Bancos Fleccas', 'baco_flecca', 2, 3, '[]'),
	(12, 'menor', 'Roba la Tienda de Peluquerias', 'Robo Peluquerias', 'tienda_pelu', 1, 3, '[]'),
	(13, 'menor', 'Consigue vehiculos robados y vendelos al por mayor', 'Robo Importacion', 'importa_veh', 1, 3, '[]'),
	(20, 'mayor', 'Roba el Yate y llevate todo su dinero', 'Robo Yate', 'yate', 2, 5, '[]');

CREATE TABLE IF NOT EXISTS `jotadev_org_darkchat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label` varchar(50) NOT NULL,
  `texto` text NOT NULL,
  `identifier` varchar(64) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `jotadev_org_garages_vehicles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vehicle` varchar(50) NOT NULL,
  `label` varchar(100) NOT NULL,
  `props` longtext DEFAULT NULL,
  `plate` varchar(20) NOT NULL,
  `banda_label` varchar(100) NOT NULL,
  `fuel` float(5,2) DEFAULT 100.00,
  `stored` tinyint(1) DEFAULT 1,
  `estado` enum('robado','veh_orga') NOT NULL DEFAULT 'veh_orga',
  PRIMARY KEY (`id`),
  UNIQUE KEY `plate_unique` (`plate`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `jotadev_org_logs_money` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `info` longtext DEFAULT NULL,
  `label_banda` varchar(50) NOT NULL,
  `identifier` varchar(64) NOT NULL,
  `name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4;

CREATE TABLE IF NOT EXISTS `jotadev_org_misiones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `org_id` int(11) NOT NULL,
  `mision_id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `progreso` int(11) DEFAULT 0,
  `completada` tinyint(1) DEFAULT 0,
  `fecha_inicio` timestamp NOT NULL DEFAULT current_timestamp(),
  `fecha_actualizacion` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

CREATE TABLE IF NOT EXISTS `jotadev_org_territorios` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `label_banda` varchar(100) NOT NULL,
  `coords` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`coords`)),
  `type` enum('graffiti','droga') NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `progreso` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`progreso`)),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4;

Add items according to your framework

INSERT INTO items (name, label, weight) VALUES
('graffiti', 'Spray de Graffiti', 1),
('deletegraffiti', 'Borrador de Graffitis', 1);

Dependencies:

  • bob74_ipl

  • pma-voice

If you have problems with the radio, use this fully compatible pma-voice

330KB
Open

Last updated