hadoukore / rs-gangs

Qbus Gang Job supporting PlayerGang function instead of using jobs.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Archived due to using a different gangs system.

rs-gangs

Gangs for RS-Core with Gang Support instead of Jobs, supports infinately scaling gangs. Super optimised down to 0.01ms with a gang, 0.00ms as a civilian.

Features:

Each gang has a stash and a list of vehicles they can get out from their garage. Config is fully customisable for each gang.

New Version 2.3 In-Game Gang Configurator

To begin creating a gang use /creategang [name] [description] to start the process, use /placestash to place the gang stash and /placegarage to place the gang garage using the In-Game configurator to chose the gang colours and vehicle list, when you have placed both you can use /finishgang to complete it or use /cancelgang at any time to abort the process.

Preview

Installation

Add Gangs into rs-core/shared.lua like this:

RSShared.Gangs = json.decode(LoadResourceFile("rs-gangs", "gangs.json"))

Add event to rs-core/server/events.lua

RegisterServerEvent("RSCore:Server:UpdateGangs")
AddEventHandler("RSCore:Server:UpdateGangs", function(gangs)
	RSShared.Gangs = gangs
	RSCore.Shared.Gangs = gangs
end)

Add event to rs-core/client/events.lua

RegisterNetEvent("RSCore:Server:UpdateGangs")
AddEventHandler("RSCore:Server:UpdateGangs", function(gangs)
	RSShared.Gangs = gangs
	RSCore.Shared.Gangs = gangs
end)

To enable lockable doors for gangs, you need to modify rs-doorlocks/client/main.lua line 217 like this:

function IsAuthorized(doorID)
	local PlayerData = RSCore.Functions.GetPlayerData()

	for _,job in pairs(doorID.authorizedJobs) do
		if job == PlayerData.job.name then
			return true
		end
	end

	for _,gang in pairs(doorID.authorizedJobs) do
		if gang == PlayerData.gang.name then
			return true
		end
	end
	
	return false
end

Add Citizenids for gang leaders for each gang into server/config.lua like this:

Config = {
	["GangLeaders"] = {
		["ballas"] = {
			"ORJ52463",
			"ABC12345"
		},
		["marabunta"] = {

		},
		["vagos"] = {

		},
		["families"] = {
			
		},
		["lost"] = {

		}
	}
}

Interiors used:

About

Qbus Gang Job supporting PlayerGang function instead of using jobs.

License:GNU General Public License v3.0


Languages

Language:Lua 80.8%Language:HTML 10.6%Language:JavaScript 6.2%Language:CSS 2.3%