# Hunting Zone

{% embed url="<https://github.com/Arius-Scripts/ars_hunting/blob/a84cca5f4d3bd8257a82d9b5f65c105c55572c39/shared/config.lua#L79>" %}

```lua
Config.HuntingZones = {
    ["CHILIAD_MOUNTAINS"] = {
        coords = vec3(1125.88, 4622.2, 80.08),
        radius = 200.0,
        maxSpawns = 5,                                                  -- max animals spawned at one time
        allowedWeapons = { "WEAPON_HEAVYSNIPER_MK2", "WEAPON_DAGGER" }, -- nil if you want to allow every weapon
        zone_radius = {
            enable = true,
            color = 1,
            opacity = 128,
        },
        blip = {
            enable = true,
            name = 'Hunting Zone',
            type = 141,
            scale = 1.0,
            color = 0,
        },
        animals = {
            {
                model = "a_c_deer",
                chance = 80, -- chance of spawning
                harvestTime = 5,
                harvestWeapons = { "WEAPON_DAGGER" },
                blip = {
                    enable = true,
                    name = 'Deer',
                    type = 119,
                    scale = 0.8,
                    color = 1,
                },
                marker = {
                    enable = true,
                    color = { r = 196, g = 136, b = 77, a = 150 }
                },
                items = {
                    skins = {
                        {
                            item = "skin_deer_ruined",
                            chance = 70,
                            maxQuantity = 1,
                        },
                    },
                    meat = {
                        {
                            item = "raw_meat",
                            chance = 100,
                            maxQuantity = 10,
                        },

                    },
                    extra = { -- rare items
                        {
                            item = "deer_horn",
                            chance = 30,
                            maxQuantity = 1,
                        },
                    }

                }
            },
        }
    },
 
}

```

### How to add more <mark style="color:red;">Hunting</mark> zones

> to add more hunting zones you just need to copy and paste the existing zone table | an example is shown below

```lua
Config.HuntingZones = {
    ["CHILIAD_MOUNTAINS"] = {
        coords = vec3(1125.88, 4622.2, 80.08),
        radius = 200.0,
        maxSpawns = 5,                                                  -- max animals spawned at one time
        allowedWeapons = { "WEAPON_HEAVYSNIPER_MK2", "WEAPON_DAGGER" }, -- nil if you want to allow every weapon
        zone_radius = {
            enable = true,
            color = 1,
            opacity = 128,
        },
        blip = {
            enable = true,
            name = 'Hunting Zone',
            type = 141,
            scale = 1.0,
            color = 0,
        },
        animals = {
            {
                model = "a_c_deer",
                chance = 80, -- chance of spawning
                harvestTime = 5,
                harvestWeapons = { "WEAPON_DAGGER" },
                blip = {
                    enable = true,
                    name = 'Deer',
                    type = 119,
                    scale = 0.8,
                    color = 1,
                },
                marker = {
                    enable = true,
                    color = { r = 196, g = 136, b = 77, a = 150 }
                },
                items = {
                    skins = {
                        {
                            item = "skin_deer_ruined",
                            chance = 70,
                            maxQuantity = 1,
                        },
                    },
                    meat = {
                        {
                            item = "raw_meat",
                            chance = 100,
                            maxQuantity = 10,
                        },

                    },
                    extra = { -- rare items
                        {
                            item = "deer_horn",
                            chance = 30,
                            maxQuantity = 1,
                        },
                    }

                }
            },
        }
    },
    ["SOME_OTHER_NAME"] = {
        coords = vec3(1125.88, 4622.2, 80.08),
        radius = 200.0,
        maxSpawns = 5,                                                  -- max animals spawned at one time
        allowedWeapons = { "WEAPON_HEAVYSNIPER_MK2", "WEAPON_DAGGER" }, -- nil if you want to allow every weapon
        zone_radius = {
            enable = true,
            color = 1,
            opacity = 128,
        },
        blip = {
            enable = true,
            name = 'Hunting Zone',
            type = 141,
            scale = 1.0,
            color = 0,
        },
        animals = {
            {
                model = "a_c_deer",
                chance = 80, -- chance of spawning
                harvestTime = 5,
                harvestWeapons = { "WEAPON_DAGGER" },
                blip = {
                    enable = true,
                    name = 'Deer',
                    type = 119,
                    scale = 0.8,
                    color = 1,
                },
                marker = {
                    enable = true,
                    color = { r = 196, g = 136, b = 77, a = 150 }
                },
                items = {
                    skins = {
                        {
                            item = "skin_deer_ruined",
                            chance = 70,
                            maxQuantity = 1,
                        },
                    },
                    meat = {
                        {
                            item = "raw_meat",
                            chance = 100,
                            maxQuantity = 10,
                        },

                    },
                    extra = { -- rare items
                        {
                            item = "deer_horn",
                            chance = 30,
                            maxQuantity = 1,
                        },
                    }

                }
            },
        }
    },

-- add more
 
}

```

## <mark style="color:yellow;">Params</mark>

* maxSpawns

> the param <mark style="color:yellow;">maxSpawns</mark> refers to whats the max quantity of the animals can spawned at the same time **es**. if i set `maxSpawns = 5,`  then that hunting zone cant have more then 5 animals spawned at once

* allowedWeapons

> this tells the script if that zone blocks any weapons&#x20;
>
> * **Add more weapons**\
>   `allowedWeapons = { "WEAPON_HEAVYSNIPER_MK2", "WEAPON_DAGGER", "WEAPON_NAME1", "WEAPON_NAME2", add more }`
> * **Allow every weapon**
>
> &#x20;      `allowedWeapons = nil`

* Add more animals&#x20;

> to add more animals for a zone do the same thing like adding more zones just copy and paste the table in animals

```lua
animals = {
            {
                model = "a_c_deer",
                chance = 80, -- chance of spawning
                harvestTime = 5,
                harvestWeapons = { "WEAPON_DAGGER" },
                blip = {
                    enable = true,
                    name = 'Deer',
                    type = 119,
                    scale = 0.8,
                    color = 1,
                },
                marker = {
                    enable = true,
                    color = { r = 196, g = 136, b = 77, a = 150 }
                },
                items = {
                    skins = {
                        {
                            item = "skin_deer_ruined",
                            chance = 70,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_low",
                            chance = 50,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_medium",
                            chance = 30,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_good",
                            chance = 25,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_perfect",
                            chance = 5,
                            maxQuantity = 1,
                        },
                    },
                    meat = {
                        {
                            item = "raw_meat",
                            chance = 100,
                            maxQuantity = 10,
                        },
                    },
                    extra = { -- rare items
                        {
                            item = "deer_horn",
                            chance = 30,
                            maxQuantity = 1,
                        },
                    }

                }
            },
            {
                model = "a_c_deer",
                chance = 80, -- chance of spawning
                harvestTime = 5,
                harvestWeapons = { "WEAPON_DAGGER" },
                blip = {
                    enable = true,
                    name = 'Deer',
                    type = 119,
                    scale = 0.8,
                    color = 1,
                },
                marker = {
                    enable = true,
                    color = { r = 196, g = 136, b = 77, a = 150 }
                },
                items = {
                    skins = {
                        {
                            item = "skin_deer_ruined",
                            chance = 70,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_low",
                            chance = 50,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_medium",
                            chance = 30,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_good",
                            chance = 25,
                            maxQuantity = 1,
                        },
                        {
                            item = "skin_deer_perfect",
                            chance = 5,
                            maxQuantity = 1,
                        },
                    },
                    meat = {
                        {
                            item = "raw_meat",
                            chance = 100,
                            maxQuantity = 10,
                        },
                    },
                    extra = { -- rare items
                        {
                            item = "deer_horn",
                            chance = 30,
                            maxQuantity = 1,
                        },
                    }

                }
            },
        }
    },

```
