# 📜 Installation

## Installation

1. Install the script in your resource folder.
2. Configure the script in your config.lua file.
3. (Configure custom function like vehicle keys)
4. Add the script to your server.cfg
5. Insert the SQL into your database.
6. Restart the server now.\\

### Configuration:

Config.lua Preview:

```lua
Config = {}
-- Which language?
Config.Locale = 'de'
-- How high should be the delay? (The optimation)
Config.Optimation = 100
Config.Debug = false

-- Job Informations
Config.NeedJob = false
Config.JobName = "unemployed"
Config.Interaction = "e-interaction" -- e-interaction or ox-target (SOON! NOT YET!)
Config.WorkWeather = true -- Needs good weather for work

-- Spawnpoint of the work vehicle
Config.VehicleSpawn = {x = 2559.0, y = 2741.43, z = 42.72, h = 344.44}
-- Vehicle Spawnname
Config.VehicleName = "bodhi2" 
-- Vehicle Plate
Config.PlateText = "PAL" -- MAX 3 
-- Used Vehicle Keys
Config.VehicleKeys = "qs" -- false or "qs"
-- Settings for vehicle blip
Config.VehicleBlip = {
    Sprite = 67, --- Which blip? -  https://docs.fivem.net/docs/game-references/blips/
    Scale = 0.7, -- Scale of the blip.
    Colour = 31, -- Color of the blip. - https://docs.fivem.net/docs/game-references/blips/
}

Config.VehicleProps = {
	Boxes = "m23_1_prop_m31_plasticcrate_01a",
	Shovel = "xm_prop_x17_shovel_01a",
	Brush = "v_serv_bs_shvbrush",
	Drinks = "prop_crate_11e",
}

Config.EquipmentItems = {
	Shovel = "shovel",
	Brush = "brush",
}

Config.AttachCoords = {
    [1] = { x = -0.52, y = -2.3, z = -0.1, type = "Boxes", rx = 0.0, ry = 0.0, rz = 90.0 },
    [2] = { x =  0.01, y = -2.3, z = -0.1, type = "Boxes", rx = 0.0, ry = 0.0, rz = 90.0 },
    [3] = { x =  0.5,  y = -2.3, z = -0.1, type = "Drinks", rx = 0.0, ry = 0.0, rz = 0.0 },
    [4] = { x =  -0.8,  y = 1.4, z =  0.472, type = "Shovel", rx = -90.0, ry = 180.0, rz = 90.0 },
    [5] = { x =  0.29, y = -1.52, z = -0.1, type = "Boxes", rx = 0.0, ry = 0.0, rz = 0.0 },
    [6] = { x = -0.29, y = -1.52, z = -0.1, type = "Boxes", rx = 0.0, ry = 0.0, rz = 0.0 },
	[7] = { x = 0.03, y = -1.1, z = -0.1, type = "Brush", rx = 90.0, ry = 0.0, rz = 30.0 },
}

Config.UseDistance = true -- Use distances, where the workers get punished if they're to far awway
Config.Distance = {
	Warning = 500, -- Distance for a warning
	Action = 700, -- Distance to punish
}

Config.ExcavationLeaderPed = {
	Coords = {x = 2964.78, y = 2745.61, z = 42.41, h = 230.54}, -- Always do minus 1 for z
	Ped = "s_m_y_construct_02",
	Blip = true,
}

Config.FoodStandLoc = {
	Coords = { x = 2995.4155, y = 2761.2458, z = 42.7972 },
	Ped = "s_m_y_construct_02",
	UsePed = false,
	Heading = 250.7664,
	Blip = true,
}

Config.FoodShop = {
	[1] = {"sandwich", "Sandwich", price = 25, useRiskMulitiplicator = true, icon = ""},
	[2] = {"water_bottle", "Wasser", price = 25, useRiskMulitiplicator = true, icon = ""},
}

-- Location of the way point to the excavation site 2995.4155, 2761.2458, 42.7972, 250.7664
Config.Waypoint = {x = 2991.73, y = 2773.98, z = 42.97}


-- Marker Configuration
Config.Marker = {
    Type = 2,
    --/// Important!!!
    Coords = {x = 2569.35, y = 2720.34, z = 42.96}, -- Where to open the job menu?

    Scale = {x = 0.5, y = 0.5, z = 0.5}, -- Scale of the marker.
    Color = {r = 21, g = 151, b = 226, a = 100}, -- Color of the marker. - http://www-db.deis.unibo.it/courses/TW/DOCS/w3schools/colors/colors_picker.asp-colorhex=00BFFF.html#gsc.tab=0
    DrawDistance = 15.0 -- When should the marker be drawed?
}

Config.Blip = {
    Sprite = 134, --- Which blip? -  https://docs.fivem.net/docs/game-references/blips/
    Scale = 1.0, -- Scale of the blip.
    Colour = 31, -- Color of the blip. - https://docs.fivem.net/docs/game-references/blips/
    Coords = {x = 2572.01, y = 2716.6, z = 42.52}, -- Coords of the blip
}

Config.Levels = {
    [1] = {label = "Anfänger", name = "starter",     minCount = 0,   riskMultiplicator = 1.0},
    [2] = {label = "Lehrling", name = "apprentice",  minCount = 100,  riskMultiplicator = 0.95},
    [3] = {label = "Geselle",  name = "journeyman",  minCount = 250,  riskMultiplicator = 0.90},
    [4] = {label = "Meister",  name = "master",      minCount = 750,  riskMultiplicator = 0.85},
}

-- Bone Types:

-- Add as many you want
-- You can add new types for bones
Config.DinoDigs = {
    [1] = {label = "Stegosaurus", name = "dino_1", minLevel = "starter", icon = "fas fa-wrench", 
    bones = {
        {label = "Stegosaurus Rückenplatte", item = "stego_plate", rarity = 0.2, value = 50, type = "plate"},
        {label = "Stegosaurus Schwanzstachel", item = "stego_spike", rarity = 0.1, value = 100, type = "spike"},
        {label = "Stegosaurus Schädel", item = "stego_skull", rarity = 0.05, value = 150, type = "skull"},
        {label = "Stegosaurus Zahn", item = "stego_tooth", rarity = 0.03, value = 200, type = "tooth"},
    },
    coords = {
        location = {x = 2942.7783, y = 2783.5793, z = 39.6862},
        prop = {x = 2942.6912, y = 2782.9551, z = 39.6277, rx = 0.0, ry = 0.0, rz = 90.0, model = "prop_ld_flow_bottle"},
    }},
    [2] = {label = "Velociraptor", name = "dino_2", minLevel = "apprentice", icon = "fas fa-wrench",
    bones = {
        {label = "Velociraptor Kralle", item = "raptor_claw", rarity = 0.2, value = 250, type = "claw"},
        {label = "Velociraptor Schädel", item = "raptor_skull", rarity = 0.05, value = 300, type = "skull"},
        {label = "Velociraptor Beinknochen", item = "raptor_leg", rarity = 0.1, value = 350, type = "leg"},
    },  
    coords = {
        location = {x = 2967.2378, y = 2782.5303, z = 39.1160},
        prop = {x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0, model = ""},    
    }},
    [3] = {label = "Brachiosaurus", name = "dino_3", minLevel = "journeyman", icon = "fas fa-wrench",
    bones = {
        {label = "Brachiosaurus Wirbel", item = "brachio_vertebra", rarity = 0.2, value = 400, type = "whirl"},
        {label = "Brachiosaurus Beinknochen", item = "brachio_femur", rarity = 0.05, value = 500, type = "leg"},
        {label = "Brachiosaurus Schädel", item = "brachio_skull", rarity = 0.015, value = 550, type = "skull"},
    },      
    coords = {
        location = {x = 2976.0815, y = 2786.8638, z = 39.8101}, 
        prop = {x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0, model = ""},
    }},
    [4] = {label = "Tyrannosaurus Rex", name = "dino_4", minLevel = "master", icon = "fas fa-wrench", 
    bones = {
        {label = "T-Rex Zahn", item = "t_rex_tooth", rarity = 0.1, value = 750, type = "tooth"},
        {label = "T-Rex Kralle", item = "t_rex_jaw", rarity = 0.05, value = 800, type = "claw"},
        {label = "T-Rex Schädel", item = "t_rex_skull", rarity = 0.01, value = 900, type = "skull"},
    }, 
    coords = {
        location = {x = 2938.9976, y = 2801.6609, z = 41.1359},
        prop = {x = 0, y = 0, z = 0, rx = 0, ry = 0, rz = 0, model = ""},     
    }},
}


Config.Baerenstein = {
    chance = 0.001,
    item = "amber",
    label = "Bärenstein",
    value = 5000
}

Config.DamagedBone = {
    item = "bone_fragment",
    label = "Beschädigter Fossilrest",
    value = 50,
    chance = 0.25 -- z. B. 25 % Wahrscheinlichkeit für beschädigten Knochen
}

Config.SellPoint = {
	location = {x = 858.5445, y = -3202.4680, z = 5.9950},
	ped = "s_m_y_construct_02",
	pedlocation = {x = 858.5445, y = -3202.4680, z = 4.9950, h = 180.1094},
}

Config.Buyers = {
    [1] = {
        label = "Dr. Schädelstein",
        specialty = {"skull"},
        specialtyBonus = 1.3,
        multiplier = 1.1,
        chance = 0.2,
        description = "Zahlt extra für Schädel und Kiefer.",
    },
    [2] = {
        label = "Museum Komplettus",
        specialty = {"jaw"},
        specialtyBonus = 1.4,
        multiplier = 1.0,
        chance = 0.5,
        description = "Zahlt extra für Kiefer.",
    },
    [3] = {
        label = "Baron von Plattus",
        specialty = {"plate"},
        specialtyBonus = 1.3,
        multiplier = 1.2,
        chance = 0.3,
        description = "Sammelt seltene Panzerplatten.",
    },
    [4] = {
        label = "Spicula & Co.",
        specialty = {"spike"},
        specialtyBonus = 1.4,
        multiplier = 1.0,
        chance = 0.25,
        description = "Hat ein Faible für Stacheln.",
    },
    [5] = {
        label = "Dentaurus GmbH",
        specialty = {"tooth"},
        specialtyBonus = 1.4,
        multiplier = 1.1,
        chance = 0.4,
        description = "Zahlt gut für Zähne aller Art.",
    },
    [6] = {
        label = "KlauenKönig",
        specialty = {"claw"},
        specialtyBonus = 1.4,
        multiplier = 1.0,
        chance = 0.35,
        description = "Spezialisiert auf Klauen und Krallen.",
    },
    [7] = {
        label = "Bein & Bein Fossilienhandel",
        specialty = {"leg"},
        specialtyBonus = 1.3,
        multiplier = 1.2,
        chance = 0.3,
        description = "Interessiert sich besonders für Beine.",
    },
    [8] = {
        label = "WirbelWert",
        specialty = {"whirl"},
        specialtyBonus = 1.4,
        multiplier = 1.1,
        chance = 0.2,
        description = "Sucht nach seltenen Wirbeln.",
    },
    [9] = {
        label = "Dr. Mixalot",
        specialty = {"tooth", "claw"},
        specialtyBonus = 1.3,
        multiplier = 1.3,
        chance = 0.45,
        description = "Liebt Kombinationen aus Zähnen und Klauen.",
    },
    [10] = {
        label = "Fossil Fusion",
        specialty = {"plate", "spike", "whirl"},
        specialtyBonus = 1.2,
        multiplier = 1.4,
        chance = 0.5,
        description = "Zahlt gut für komplexe Fossilienstrukturen.",
    },
    [11] = {
        label = "KnochenKunst",
        specialty = {"skull", "leg"},
        specialtyBonus = 1.4,
        multiplier = 1.2,
        chance = 0.3,
        description = "Verwendet Schädel und Beine für Kunstwerke.",
    },
    [12] = {
        label = "Sammler Saurus",
        specialty = {"claw", "spike", "tooth"},
        specialtyBonus = 1.3,
        multiplier = 1.3,
        chance = 0.4,
        description = "Sammelt aggressive Fossilteile.",
    },
}



Config.Clothe = { -- Clothe for the job
    paleontologe = {
		male = {
			['tshirt_1'] = 15,  	['tshirt_2'] = 0,
			['torso_1'] = 12,   	['torso_2'] = 7,
			['decals_1'] = 0,   	['decals_2'] = 0,
			['arms'] = 1,			['chain_1'] = 0,
			['pants_1'] = 15,   	['pants_2'] = 7,
			['shoes_1'] = 62,	   	['shoes_2'] = 0,
			['helmet_1'] = 13,  	['helmet_2'] = 2,
			['vest_1'] = 0,  	['vest_2'] = 0,
			--['glasses_1']= 5,		['glasses_2'] = 0		
        },
		female = {
			['tshirt_1'] = 20,  	['tshirt_2'] = 1,
			['torso_1'] = 353,   	['torso_2'] = 7,
			['decals_1'] = 0,   	['decals_2'] = 0,
			['arms'] = 1,			['chain_1'] = 0,
			['pants_1'] = 90,   	['pants_2'] = 6,
			['shoes_1'] = 25,	   	['shoes_2'] = 0,
			['helmet_1'] = 103,  	['helmet_2'] = 25,
			['glasses_1']= 0,		['glasses_2'] = 0		
		}
	},

}

```
