0% found this document useful (0 votes)
6 views14 pages

Group Types and Permissions Overview

The document defines various groups with their types, permissions, and duties, including law enforcement, government, mafia, gangs, and other organizations. Each group has specific attributes such as name, prefix, permissions, and duty details like skins and positions. Functions are also provided to manage player group assignments and check their statuses within these groups.

Uploaded by

sdd145129
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views14 pages

Group Types and Permissions Overview

The document defines various groups with their types, permissions, and duties, including law enforcement, government, mafia, gangs, and other organizations. Each group has specific attributes such as name, prefix, permissions, and duty details like skins and positions. Functions are also provided to manage player group assignments and check their statuses within these groups.

Uploaded by

sdd145129
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

groupTypes = {

law_enforcement = "Rendvédelem",
government = "Önkormányzat",
mafia = "Maffia",
gang = "Banda",
organisation = "Szervezet",
other = "Egyéb"
}

availableGroups = {
[1] = {
name = "Rendőrség",
prefix = "PD",
type = "law_enforcement",
permissions = {
tazer = true,
bulletExamine = true,
impoundTow = true,
impoundTowFinal = true,
megaPhone = true,
roadBlock = true,
cuff = true,
graffitiClean = true,
gov = true,
ticket = true,
departmentRadio = true,
jail = true,
doorRammer = true,
wheelClamp = true
},
duty = {
skins = {280, 281, 282, 283, 284, 288},
positions = {
{264.30862426758, 110.21092224121, 1004.6171875, 10, 7}
},
armor = 100,
items = {
{325, 1},
{313, 1},
{343, 300},
{344, 150},
{340, 250},
{318, 1},
{49, 1},
{15, 1},
{147, 1},
{48, 1},
{8, 1},
{135, 1},
{291, 1},
}
}
},
[2] = {
name = "Honvédség",
prefix = "SCH",
type = "law_enforcement",
permissions = {
tazer = true,
megaPhone = true,
roadBlock = true,
graffitiClean = true,
cuff = true,
gov = true,
ticket = true,
departmentRadio = true,
jail = true,
doorRammer = true
},
duty = {
skins = {220, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30},
positions = {
{264.19470214844, 109.9136505127, 1004.6171875, 10, 8}
},
armor = 100,
items = {
{26, 1},
{343, 500},
{345, 100},
{15, 1},
{23, 1},
{49, 1},
{147, 1},
{48, 1},
{291, 1},
{30, 1},
{31, 1},
{28, 1},
{347, 100},
{349, 200},
}
}
},
[3] = {
name = "Nemzeti Adó- és Vámhivatal",
prefix = "NAV",
type = "law_enforcement",
permissions = {
tazer = true,
megaPhone = true,
bulletExamine = true,
impoundTow = true,
impoundTowFinal = true,
roadBlock = true,
graffitiClean = true,
cuff = true,
gov = true,
ticket = true,
departmentRadio = true,
jail = true,
doorRammer = true
},
duty = {
skins = {265, 286, 287, 299, 220, 306},
positions = {
{211.41969299316, 185.74348449707, 1003.03125, 3, 782}
},
armor = 100,
items = {
{317, 1},
{8, 1},
{15, 1},
{16, 1},
{23, 1},
{30, 2},
{31, 1},
{48, 1},
{49, 1},
{349, 350},
{343, 350},
{341, 80},
}
}
},
[4] = {
name = "Nemzeti Nyomozó Iroda",
prefix = "NNI",
type = "law_enforcement",
permissions = {
tazer = true,
trackPhone = true,
bulletExamine = true,
impoundTow = true,
impoundTowFinal = true,
megaPhone = true,
roadBlock = true,
heal = true,
graffitiClean = true,
cuff = true,
gov = true,
hideWeapons = true,
ticket = true,
departmentRadio = true,
jail = true,
hiddenName = true,
doorRammer = true
},
duty = {
skins = {164, 163, 159, 200, 230, 261, 140, 272, 84, 309, 258,
263, 262, 248, 249, 250, 251, 204},
positions = {
{2017.4339599609, -1369.2204589844, 17.33593755, 0, 0}
},
armor = 100,
items = {
{318, 1},
{340, 250},
{15, 1},
{147, 1},
{48, 1},
{49, 1},
{291, 1},
{343, 300},
{30, 3},
{31, 3},
{28, 1},
{324, 1},
{319, 1},
{347, 150},
{338, 100},
}
}
},
[5] = {
name = "18th Street Gang",
prefix = "18SG",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true

},
duty = {
skins = {208, 209, 302, 303, 304},
positions = {},
armor = 0,
items = false
}
},
[6] = {
name = "Essaouiran Organization",
prefix = "EO",
type = "mafia",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {128, 129, 130, 132, 133},
positions = {},
armor = 0,
items = false
}
},
[7] = {
name = "Los Santos Mechanic Shop",
prefix = "LSMS",
type = "other",
permissions = {
repair = true,
impoundTow = true,
impoundTowFinal = true,
items = {
{205, 1},
}
},
duty = {
skins = {50},
positions = {
{2528.2687988281, -2119.7209472656, 13.793982505798, 0, 0}
},
armor = 0,
items = {
{205, 1},
}
}
},
[8] = {
name = "Chamberlain Hill's Gangster Bloods",
prefix = "CHGB",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[9] = {
name = "SoulMTA - Team",
prefix = "GA",
type = "mafia",
permissions = {
sprayGraffiti = false,
hideWeapons = false,
canRobATM = false
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[10] = {
name = "Szerelő (NEM)",
prefix = "SZ",
type = "other",
permissions = {
repair = true
},
duty = {
skins = {},
positions = {
{-28.8974609375, 710.0380859375, 21.742862701416 , 0, 0}
},
armor = 0,
items = false
}
},
[11] = {
name = "Cancun Cartel New Generation",
prefix = "CNGC",
type = "mafia",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {195, 131, 39, 305, 290, 289, 291, 70, 170, 196, 78},
positions = {},
armor = 0,
items = false
}
},
[12] = {
name = "Parkolási Felügyelet",
prefix = "PF",
type = "law_enforcement",
permissions = {
impoundTow = true,
impoundTowFinal = true,
departmentRadio = true,
megaPhone = true,
gov = true
},
duty = {
skins = {0},
positions = {},
armor = 0,
items = {
{99, 1}
}
}
},
[13] = {
name = "Turkish Isyancılar",
prefix = "TR",
type = "mafia",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {88, 99, 98, 97, 96}, --83, 162, 246, 211 martin skinje a
kurva anyád
positions = {},
armor = 0,
items = false
}
},
[14] = {
name = "Ndrangheta",
prefix = "NA",
type = "mafia",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[15] = {
name = "Cartel De Sinaloa",
prefix = "CDS",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {311, 245, 173, 168, 158},
positions = {},
armor = 0,
items = false
}
},
[16] = {
name = "Tree Top Piru",
prefix = "TTP",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[17] = {
name = "Area Boys",
prefix = "AB",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[18] = {
name = "Red Skull's",
prefix = "RS",
type = "gang",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {212},
positions = {},
armor = 0,
items = false
}
},
[19] = {
name = "Solntsevskaya Bratva",
prefix = "SB",
type = "mafia",
permissions = {
sprayGraffiti = true,
hideWeapons = true,
canRobATM = true
},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
[20] = {
name = "Government",
prefix = "GOV",
type = "government",
permissions = {},
duty = {
skins = {},
positions = {},
armor = 0,
items = false
}
},
}

for k, v in pairs(availableGroups) do
if not availableGroups[k].balance then
availableGroups[k].balance = 0
end

if not availableGroups[k].description then


availableGroups[k].description = "leírás"
end

if not availableGroups[k].ranks then


availableGroups[k].ranks = {}
end

for i = 1, 15 do
if not availableGroups[k].ranks[i] then
availableGroups[k].ranks[i] = {
name = "rang " .. i,
pay = 0
}
end
end
end

function getGroups()
return availableGroups
end

function getGroupTypes()
return groupTypes
end

function getGroupData(groupId)
return availableGroups[groupId]
end

function addPlayerGroup(playerElement, groupId, dutySkin)


if isElement(playerElement) then
groupId = tonumber(groupId)

if groupId then
if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if not playerGroups[groupId] then
if not dutySkin then
dutySkin =
availableGroups[groupId].[Link][1]
end

playerGroups[groupId] = {1, dutySkin, "N"}


setElementData(playerElement, "[Link]",
playerGroups)

return true
end
end
end
end
end

return false
end

function removePlayerGroup(playerElement, groupId)


if isElement(playerElement) then
groupId = tonumber(groupId)

if groupId then
if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
playerGroups[groupId] = nil
setElementData(playerElement, "[Link]",
playerGroups)
return true
end
end
end
end
end

return false
end

function setPlayerLeader(playerElement, groupId, state)


if isElement(playerElement) then
groupId = tonumber(groupId)

if groupId then
if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
playerGroups[groupId][3] = state
setElementData(playerElement, "[Link]",
playerGroups)
return true
end
end
end
end
end

return false
end

function isPlayerLeaderInGroup(playerElement, groupId)


if isElement(playerElement) then
groupId = tonumber(groupId)

if groupId then
if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
if [Link](playerGroups[groupId][3]) == "y"
then
return true
end
end
end
end
end
end

return false
end

function isPlayerInGroup(playerElement, groups)


if isElement(playerElement) then
if groups then
if type(groups) == "table" then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
for i = 1, #groups do
local groupId = groups[i]

if availableGroups[groupId] then
if playerGroups[groupId] then
return groupId
end
end
end
end
else
local groupId = tonumber(groups)

if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
return groupId
end
end
end
end
end
end

return false
end

function getPlayerGroups(playerElement)
if isElement(playerElement) then
local playerGroups = getElementData(playerElement, "[Link]") or
{}

if playerGroups then
return playerGroups
end
end

return false
end

function getPlayerGroupCount(playerElement)
if isElement(playerElement) then
local playerGroups = getElementData(playerElement, "[Link]") or
{}
local groupCounter = 0

for k, v in pairs(playerGroups) do
groupCounter = groupCounter + 1
end
return groupCounter
end

return false
end

function setPlayerRank(playerElement, groupId, rankId)


if isElement(playerElement) then
groupId = tonumber(groupId)
rankId = tonumber(rankId)

if groupId and rankId then


if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
playerGroups[groupId][1] = rankId
setElementData(playerElement, "[Link]",
playerGroups)
return true
end
end
end
end
end

return false
end

function getPlayerRank(playerElement, groupId)


if isElement(playerElement) then
groupId = tonumber(groupId)

if groupId then
if availableGroups[groupId] then
local playerGroups = getElementData(playerElement,
"[Link]") or {}

if playerGroups then
if playerGroups[groupId] then
local rankId = playerGroups[groupId][1]

if rankId then
if availableGroups[groupId].ranks[rankId]
then
return rankId,
availableGroups[groupId].ranks[rankId].name,
availableGroups[groupId].ranks[rankId].pay
end
end
end
end
end
end
end

return false
end

function getGroupPrefix(groupId)
if groupId then
if availableGroups[groupId] then
return availableGroups[groupId].prefix
end
end

return false
end

function getGroupName(groupId)
if groupId then
if availableGroups[groupId] then
return availableGroups[groupId].name
end
end

return false
end

function getGroupType(groupId)
if groupId then
if availableGroups[groupId] then
return availableGroups[groupId].type
end
end

return false
end

function isPlayerHavePermission(playerElement, permission)


if isElement(playerElement) and permission then
local playerGroups = getElementData(playerElement, "[Link]") or
{}

if playerGroups then
for k, v in pairs(playerGroups) do
if availableGroups[k] and
availableGroups[k].permissions[permission] then
return k
end
end
end
end

return false
end

function thousandsStepper(amount)
local left, center, right = [Link]([Link](amount), "^([^%d]*%d)
(%d*)(.-)$")
return left .. [Link]([Link]([Link](center), "(%d%d%d)",
"%1 ")) .. right
end

function isPlayerOfficer(playerElement)
return isPlayerInGroup(playerElement, {1, 2, 3, 4})
end

function getGroupSkins(groupId)
if availableGroups[groupId] then
return availableGroups[groupId].[Link]
end
return {}
end

You might also like