tattoosShops = {
	{1322.645, -1651.976, 52.275},
	{-1153.676, -1425.68, 4.954},
	{322.139, 180.467, 103.587},
	{-3170.071, 1075.059, 20.829},
	{1864.633, 3747.738, 33.032},
	{-293.713, 6200.04, 31.487},
	{-1220.6872558594, -1430.6593017578, 4.3321843147278},
	{-1115.3640136719, -1658.7386474609, 4.3555798530579},
}

tattoosList = {
	["mpbusiness_overlays"] = {
		"MP_Buis_M_Neck_000",
		"MP_Buis_M_Neck_001",
		"MP_Buis_M_Neck_002",
		"MP_Buis_M_Neck_003",
		"MP_Buis_M_LeftArm_000",
		"MP_Buis_M_LeftArm_001",
		"MP_Buis_M_RightArm_000",
		"MP_Buis_M_RightArm_001",
		"MP_Buis_M_Stomach_000",
		"MP_Buis_M_Chest_000",
		"MP_Buis_M_Chest_001",
		"MP_Buis_M_Back_000",
		"MP_Buis_F_Chest_000",
		"MP_Buis_F_Chest_001",
		"MP_Buis_F_Chest_002",
		"MP_Buis_F_Stom_000",
		"MP_Buis_F_Stom_001",
		"MP_Buis_F_Stom_002",
		"MP_Buis_F_Back_000",
		"MP_Buis_F_Back_001",
		"MP_Buis_F_Neck_000",
		"MP_Buis_F_Neck_001",
		"MP_Buis_F_RArm_000",
		"MP_Buis_F_LArm_000",
		"MP_Buis_F_LLeg_000",
		"MP_Buis_F_RLeg_000",
	},

	["mphipster_overlays"] = {
		"FM_Hip_M_Tat_000",
		"FM_Hip_M_Tat_001",
		"FM_Hip_M_Tat_002",
		"FM_Hip_M_Tat_003",
		"FM_Hip_M_Tat_004",
		"FM_Hip_M_Tat_005",
		"FM_Hip_M_Tat_006",
		"FM_Hip_M_Tat_007",
		"FM_Hip_M_Tat_008",
		"FM_Hip_M_Tat_009",
		"FM_Hip_M_Tat_010",
		"FM_Hip_M_Tat_011",
		"FM_Hip_M_Tat_012",
		"FM_Hip_M_Tat_013",
		"FM_Hip_M_Tat_014",
		"FM_Hip_M_Tat_015",
		"FM_Hip_M_Tat_016",
		"FM_Hip_M_Tat_017",
		"FM_Hip_M_Tat_018",
		"FM_Hip_M_Tat_019",
		"FM_Hip_M_Tat_020",
		"FM_Hip_M_Tat_021",
		"FM_Hip_M_Tat_022",
		"FM_Hip_M_Tat_023",
		"FM_Hip_M_Tat_024",
		"FM_Hip_M_Tat_025",
		"FM_Hip_M_Tat_026",
		"FM_Hip_M_Tat_027",
		"FM_Hip_M_Tat_028",
		"FM_Hip_M_Tat_029",
		"FM_Hip_M_Tat_030",
		"FM_Hip_M_Tat_031",
		"FM_Hip_M_Tat_032",
		"FM_Hip_M_Tat_033",
		"FM_Hip_M_Tat_034",
		"FM_Hip_M_Tat_035",
		"FM_Hip_M_Tat_036",
		"FM_Hip_M_Tat_037",
		"FM_Hip_M_Tat_038",
		"FM_Hip_M_Tat_039",
		"FM_Hip_M_Tat_040",
		"FM_Hip_M_Tat_041",
		"FM_Hip_M_Tat_042",
		"FM_Hip_M_Tat_043",
		"FM_Hip_M_Tat_044",
		"FM_Hip_M_Tat_045",
		"FM_Hip_M_Tat_046",
		"FM_Hip_M_Tat_047",
		"FM_Hip_M_Tat_048",
	},

	["mpbiker_overlays"] = {
		"MP_Biker_Hair_001_M",
		"MP_Biker_Hair_002_M",
		"MP_Biker_Hair_003_M",
		"MP_Biker_Hair_004_M",
		"MP_Biker_Hair_005_M",
		"MP_MP_Biker_Tat_000_M",
		"MP_MP_Biker_Tat_001_M",
		"MP_MP_Biker_Tat_002_M",
		"MP_MP_Biker_Tat_003_M",
		"MP_MP_Biker_Tat_004_M",
		"MP_MP_Biker_Tat_005_M",
		"MP_MP_Biker_Tat_006_M",
		"MP_MP_Biker_Tat_007_M",
		"MP_MP_Biker_Tat_008_M",
		"MP_MP_Biker_Tat_009_M",
		"MP_MP_Biker_Tat_010_M",
		"MP_MP_Biker_Tat_011_M",
		"MP_MP_Biker_Tat_012_M",
		"MP_MP_Biker_Tat_013_M",
		"MP_MP_Biker_Tat_014_M",
		"MP_MP_Biker_Tat_015_M",
		"MP_MP_Biker_Tat_016_M",
		"MP_MP_Biker_Tat_017_M",
		"MP_MP_Biker_Tat_018_M",
		"MP_MP_Biker_Tat_019_M",
		"MP_MP_Biker_Tat_020_M",
		"MP_MP_Biker_Tat_021_M",
		"MP_MP_Biker_Tat_022_M",
		"MP_MP_Biker_Tat_023_M",
		"MP_MP_Biker_Tat_024_M",
		"MP_MP_Biker_Tat_025_M",
		"MP_MP_Biker_Tat_026_M",
		"MP_MP_Biker_Tat_027_M",
		"MP_MP_Biker_Tat_028_M",
		"MP_MP_Biker_Tat_029_M",
		"MP_MP_Biker_Tat_030_M",
		"MP_MP_Biker_Tat_031_M",
		"MP_MP_Biker_Tat_032_M",
		"MP_MP_Biker_Tat_033_M",
		"MP_MP_Biker_Tat_034_M",
		"MP_MP_Biker_Tat_035_M",
		"MP_MP_Biker_Tat_036_M",
		"MP_MP_Biker_Tat_037_M",
		"MP_MP_Biker_Tat_038_M",
		"MP_MP_Biker_Tat_039_M",
		"MP_MP_Biker_Tat_040_M",
		"MP_MP_Biker_Tat_041_M",
		"MP_MP_Biker_Tat_042_M",
		"MP_MP_Biker_Tat_043_M",
		"MP_MP_Biker_Tat_044_M",
		"MP_MP_Biker_Tat_045_M",
		"MP_MP_Biker_Tat_046_M",
		"MP_MP_Biker_Tat_047_M",
		"MP_MP_Biker_Tat_048_M",
		"MP_MP_Biker_Tat_049_M",
		"MP_MP_Biker_Tat_050_M",
		"MP_MP_Biker_Tat_051_M",
		"MP_MP_Biker_Tat_052_M",
		"MP_MP_Biker_Tat_053_M",
		"MP_MP_Biker_Tat_054_M",
		"MP_MP_Biker_Tat_055_M",
		"MP_MP_Biker_Tat_056_M",
		"MP_MP_Biker_Tat_057_M",
		"MP_MP_Biker_Tat_058_M",
		"MP_MP_Biker_Tat_059_M",
		"MP_MP_Biker_Tat_060_M",
	},

	["multiplayer_overlays"] = {
		"NG_M_Hair_001",
		"NG_M_Hair_002",
		"NG_M_Hair_003",
		"NG_M_Hair_004",
		"NG_M_Hair_005",
		"NG_M_Hair_006",
		"NG_M_Hair_007",
		"NG_M_Hair_008",
		"NG_M_Hair_009",
		"NG_M_Hair_010",
		"NG_M_Hair_011",
		"NG_M_Hair_012",
		"NGBea_M_Hair_000",
		"NGBea_M_Hair_001"
	},

	["mpairraces_overlays"] = {
		"MP_Airraces_Tattoo_000_M",
		"MP_Airraces_Tattoo_001_M",
		"MP_Airraces_Tattoo_002_M",
		"MP_Airraces_Tattoo_003_M",
		"MP_Airraces_Tattoo_004_M",
		"MP_Airraces_Tattoo_005_M",
		"MP_Airraces_Tattoo_006_M",
		"MP_Airraces_Tattoo_007_M",
	},

	["mpbeach_overlays"] = {
		"FM_Hair_Fuzz",
		"MP_Bea_M_Back_000",
		"MP_Bea_M_Chest_000",
		"MP_Bea_M_Chest_001",
		"MP_Bea_M_Head_000",
		"MP_Bea_M_Head_001",
		"MP_Bea_M_Head_002",
		"MP_Bea_M_Lleg_000",
		"MP_Bea_M_Rleg_000",
		"MP_Bea_M_RArm_000",
		"MP_Bea_M_Head_000",
		"MP_Bea_M_LArm_000",
		"MP_Bea_M_LArm_001",
		"MP_Bea_M_Neck_000",
		"MP_Bea_M_Neck_001",
		"MP_Bea_M_RArm_001",
		"MP_Bea_M_Stom_000",
		"MP_Bea_M_Stom_001",
	},

	["mpchristmas2_overlays"] = {
		"MP_Xmas2_M_Tat_000",
		"MP_Xmas2_M_Tat_001",
		"MP_Xmas2_M_Tat_003",
		"MP_Xmas2_M_Tat_004",
		"MP_Xmas2_M_Tat_005",
		"MP_Xmas2_M_Tat_006",
		"MP_Xmas2_M_Tat_007",
		"MP_Xmas2_M_Tat_008",
		"MP_Xmas2_M_Tat_009",
		"MP_Xmas2_M_Tat_010",
		"MP_Xmas2_M_Tat_011",
		"MP_Xmas2_M_Tat_012",
		"MP_Xmas2_M_Tat_013",
		"MP_Xmas2_M_Tat_014",
		"MP_Xmas2_M_Tat_015",
		"MP_Xmas2_M_Tat_016",
		"MP_Xmas2_M_Tat_017",
		"MP_Xmas2_M_Tat_018",
		"MP_Xmas2_M_Tat_019",
		"MP_Xmas2_M_Tat_022",
		"MP_Xmas2_M_Tat_023",
		"MP_Xmas2_M_Tat_024",
		"MP_Xmas2_M_Tat_025",
		"MP_Xmas2_M_Tat_026",
		"MP_Xmas2_M_Tat_027",
		"MP_Xmas2_M_Tat_028",
		"MP_Xmas2_M_Tat_029",
	},

	["mpgunrunning_overlays"] = {
		"MP_Gunrunning_Hair_M_000_M",
		"MP_Gunrunning_Hair_M_001_M",
		"MP_Gunrunning_Tattoo_000_M",
		"MP_Gunrunning_Tattoo_001_M",
		"MP_Gunrunning_Tattoo_002_M",
		"MP_Gunrunning_Tattoo_003_M",
		"MP_Gunrunning_Tattoo_004_M",
		"MP_Gunrunning_Tattoo_005_M",
		"MP_Gunrunning_Tattoo_006_M",
		"MP_Gunrunning_Tattoo_007_M",
		"MP_Gunrunning_Tattoo_008_M",
		"MP_Gunrunning_Tattoo_009_M",
		"MP_Gunrunning_Tattoo_010_M",
		"MP_Gunrunning_Tattoo_011_M",
		"MP_Gunrunning_Tattoo_012_M",
		"MP_Gunrunning_Tattoo_013_M",
		"MP_Gunrunning_Tattoo_014_M",
		"MP_Gunrunning_Tattoo_015_M",
		"MP_Gunrunning_Tattoo_016_M",
		"MP_Gunrunning_Tattoo_017_M",
		"MP_Gunrunning_Tattoo_018_M",
		"MP_Gunrunning_Tattoo_019_M",
		"MP_Gunrunning_Tattoo_020_M",
		"MP_Gunrunning_Tattoo_021_M",
		"MP_Gunrunning_Tattoo_022_M",
		"MP_Gunrunning_Tattoo_023_M",
		"MP_Gunrunning_Tattoo_024_M",
		"MP_Gunrunning_Tattoo_025_M",
		"MP_Gunrunning_Tattoo_026_M",
		"MP_Gunrunning_Tattoo_027_M",
		"MP_Gunrunning_Tattoo_028_M",
		"MP_Gunrunning_Tattoo_029_M",
		"MP_Gunrunning_Tattoo_030_M",
	},

	["mpimportexport_overlays"] = {
		"MP_MP_ImportExport_Tat_000_M",
		"MP_MP_ImportExport_Tat_001_M",
		"MP_MP_ImportExport_Tat_002_M",
		"MP_MP_ImportExport_Tat_003_M",
		"MP_MP_ImportExport_Tat_004_M",
		"MP_MP_ImportExport_Tat_005_M",
		"MP_MP_ImportExport_Tat_006_M",
		"MP_MP_ImportExport_Tat_007_M",
		"MP_MP_ImportExport_Tat_008_M",
		"MP_MP_ImportExport_Tat_009_M",
		"MP_MP_ImportExport_Tat_010_M",
		"MP_MP_ImportExport_Tat_011_M",
	},

	["mplowrider2_overlays"] = {
		"LR_M_Hair_004",
		"LR_M_Hair_005",
		"LR_M_Hair_006",
		"MP_LR_Tat_000_M",
		"MP_LR_Tat_003_M",
		"MP_LR_Tat_006_M",
		"MP_LR_Tat_008_M",
		"MP_LR_Tat_011_M",
		"MP_LR_Tat_012_M",
		"MP_LR_Tat_016_M",
		"MP_LR_Tat_018_M",
		"MP_LR_Tat_019_M",
		"MP_LR_Tat_022_M",
		"MP_LR_Tat_028_M",
		"MP_LR_Tat_029_M",
		"MP_LR_Tat_030_M",
		"MP_LR_Tat_031_M",
		"MP_LR_Tat_032_M",
		"MP_LR_Tat_035_M",
	},

	["mplowrider_overlays"] = {
		"LR_M_Hair_000",
		"LR_M_Hair_001",
		"LR_M_Hair_002",
		"MP_LR_Tat_001_M",
		"MP_LR_Tat_002_M",
		"MP_LR_Tat_004_M",
		"MP_LR_Tat_005_M",
		"MP_LR_Tat_007_M",
		"MP_LR_Tat_009_M",
		"MP_LR_Tat_010_M",
		"MP_LR_Tat_013_M",
		"MP_LR_Tat_014_M",
		"MP_LR_Tat_015_M",
		"MP_LR_Tat_017_M",
		"MP_LR_Tat_020_M",
		"MP_LR_Tat_021_M",
		"MP_LR_Tat_023_M",
		"MP_LR_Tat_026_M",
		"MP_LR_Tat_027_M",
		"MP_LR_Tat_033_M",
	}
}

local tatCategs = {
    {"ZONE_TORSO", 0},
    {"ZONE_HEAD", 0},
    {"ZONE_LEFT_ARM", 0},
    {"ZONE_RIGHT_ARM", 0},
    {"ZONE_LEFT_LEG", 0},
    {"ZONE_RIGHT_LEG", 0},
    {"ZONE_UNKNOWN", 0},
    {"ZONE_NONE", 0},
}

function AddZoneIDToTattoos()
    tempTattoos = {}
    for key in pairs(tattoosList) do
        for i = 1, #tattoosList[key] do
            if tempTattoos[key] == nil then tempTattoos[key] = {} end
            tempTattoos[key][i] = {
                tattoosList[key][i],
                tatCategs[
                    GetPedDecorationZoneFromHashes(
                        key,
                        GetHashKey(tattoosList[key][i])
                    ) + 1
                ][1]
            }
        end
    end
    tattoosList = tempTattoos
end

AddZoneIDToTattoos()

function CreateHashList()
    tempTattooHashList = {}
    for key in pairs(tattoosList) do
        for i = 1, #tattoosList[key] do
            local categ = tattoosList[key][i][2]
            if tempTattooHashList[categ] == nil then tempTattooHashList[categ] = {} end
            table.insert(
                tempTattooHashList[categ],
                {GetHashKey(tattoosList[key][i][1]),
                GetHashKey(key)}
            )
        end
    end
    return tempTattooHashList
end

function GetTatCategs()
    for key in pairs(tattoosList) do
        for i = 1, #tattoosList[key] do
            local zone = GetPedDecorationZoneFromHashes(
                key,
                GetHashKey(tattoosList[key][i][1])
            )
            tatCategs[zone+1] = {tatCategs[zone+1][1], tatCategs[zone+1][2]+1}
        end
    end
    return tatCategs
end