๐Ÿ› ๏ธInstallation

Welcome to our installation guide! In this section, we'll walk you through the steps to effortlessly set up the Script S-Factions!

Factions System Installation

Follow this steps to install the script:

  1. Download the Script from Keymaster

  2. Drag the Script into your resources

  3. Add this to you your server.cfg: start S-Factions

  4. If the SQL file doesn't insert automatically, insert the SQL file in your database by hand.

ALTER TABLE owned_vehicles
ADD `imgsrc` varchar(250) DEFAULT "carpictures/car1.png", 
ADD `star` varchar(10) DEFAULT false,
ADD `label` varchar(10) DEFAULT NULL;

CREATE TABLE IF NOT EXISTS `S_Factions_Storage` (
  `index` int(11) NOT NULL AUTO_INCREMENT,
  `gangname` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `item` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `label` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `count` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `typeofitem` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  PRIMARY KEY (`index`) USING BTREE,
  KEY `item` (`item`)
) ENGINE=InnoDB AUTO_INCREMENT=346 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

CREATE TABLE IF NOT EXISTS `S_Factions_Factions` (
  `index` int(11) NOT NULL AUTO_INCREMENT,
  `gangname` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `wallet`int(20) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  `upgradestatestorage` int(20) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  `upgradeautohaus`int(20) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  `upgradekonto` int(20) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  `upgradeshop`int(20) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  PRIMARY KEY (`index`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=346 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

CREATE TABLE IF NOT EXISTS `S_Factions_PlayTime` (
  `index` int(11) NOT NULL AUTO_INCREMENT,
  `identifier` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `day`varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,  
  `date`varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `playtime` varchar(250) COLLATE utf8mb4_unicode_ci DEFAULT "0",
  PRIMARY KEY (`index`) USING BTREE
) ENGINE=InnoDB AUTO_INCREMENT=346 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC;

ALTER TABLE job_grades
ADD `invite` varchar(10) DEFAULT "false";

ALTER TABLE users
ADD `frakspeere` varchar(10) DEFAULT "false";
  1. Jobs have to be existing. This SQL is an example on "How to create a job in ESX"

INSERT INTO jobs (name,label, whitelisted) VALUES
('lcn', 'LCN', 0);

INSERT INTO job_grades (job_name, grade, name, label, salary, skin_male, skin_female) VALUES
('lcn', "1", "candidato", "Candidato", "0", "{}", "{}"),
('lcn', "2", "lavatore", "Lavatore", "0", "{}", "{}"),
('lcn', "3", "fratelli", "Fratelli", "0", "{}", "{}"),
('lcn', "4", "soldato", "Soldato", "0", "{}", "{}"),
('lcn', "5", "capo del nuovo", "Capo Del Nuovo", "0", "{}", "{}"),
('lcn', "6", "sorvegliante", "Sorvegliante", "0", "{}", "{}"),
('lcn', "7", "capo", "Capo", "0", "{}", "{}"),
('lcn', "8", "gestore Inventario", "Gestore Inventario", "0", "{}", "{}"),
('lcn', "9", "insegnante", "Insegnante", "0", "{}", "{}"),
('lcn', "10", "co-don", "Co-don", "0", "{}", "{}"),
('lcn', "11", "consigliere", "Consigliere", "0", "{}", "{}"),
('lcn', "12", "don", "Don", "0", "{}", "{}")
  1. For ESX 1.1 and 1.2 insert this in <es_extended> > <server> > <functions.lua> under ESX.GetPlayers

function ESX.GetExtendedPlayers(key, val)
	local xPlayers = {}
	for k, v in pairs(ESX.Players) do
		if key then
			if (key == 'job' and v.job.name == val) or v[key] == val then
				xPlayers[#xPlayers + 1] = v
			end
		else
			xPlayers[#xPlayers + 1] = v
		end
	end
	return xPlayers
end
  1. Restart the Server and play S-Factions on your Server!

Thats All! Enjoy the Script on your Server!

Last updated