Config
Here you will find all the relevant information and tips you need to get everything running smoothly.
You can enter the values ββlisted below in your config at AggroLevel to determine how a Ped group should behave.
You can make adjustments for your framework in the ESX Config. This means, for example, events for awarding items or weapons, or an animation for picking up items. Normally there is no need to change anything there if you use ESX.
ESX Config
Config.ItemDropCallback = function(source, type, item, count)
local ESX = exports['es_extended']:getSharedObject()
local xPlayer = ESX.GetPlayerFromId(source)
if type == "item" then
xPlayer.addInventoryItem(item, count)
elseif type == "weapon" then
xPlayer.addWeapon(item, count)
end
end
Config.PickupAnim = {
Animation = "pickup_low",
Lib = "random@domestic"
}
The Active Peds Config is there to set and configure your Ped groups. There you can, for example, create groups with peds that work together, customize their protective vests, the weapons they use, the aggro level and much more. You can create unlimited different groups of Peds.
Active Peds Config
Config.Groups =
{
["Grove"] = {
Defaults = {
Weapon = "WEAPON_MICROSMG",
AggroLevel = 4,
Accuracy = 15,
Armour = 0,
RespawnSeconds = -1,
GroupCenterCoords = vector3(103.3628, -1939.7953, 20.8037),
ItemDrops = {
{type = "item", name = "case", amount = 1, chance = 5},
{type = "item", name = "casekey", amount = 1, chance = 5},
{type = "item", name = "weaclip", amount = 1, chance = 5},
}
},
Peds = {
{ coords = vector3(116.9127, -1927.4237, 20.7443), heading = 133.513, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", Armour = 100},
{ coords = vector3(111.0326, -1921.4326, 20.8709), heading = 151.780, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", AggroLevel = 5},
{ coords = vector3(79.1506, -1947.3203, 21.1741), heading = 310.0021, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", Accuracy = 90},
{ coords = vector3(90.4941, -1955.1763, 20.8671), heading = 0.561200, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG",
{ coords = vector3(86.8706, -1948.5342, 20.7981), heading = 338.9240, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(101.4297, -1957.6694, 20.7428), heading = 24.2025, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(111.6559, -1958.4443, 20.8265), heading = 29.4064, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(117.7004, -1951.0455, 20.7459), heading = 24.7913, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG"},
}
},
In the code example from our config below you can see how you can assign overriding variables to individual peds. This means that you can not only set all values ββfor a group, but also for all Peds individually if desired.
Custom Peds Config
Peds = {
{ coords = vector3(116.9127, -1927.4237, 20.7443), heading = 133.513, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", Armour = 100},
{ coords = vector3(111.0326, -1921.4326, 20.8709), heading = 151.780, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", AggroLevel = 5},
{ coords = vector3(79.1506, -1947.3203, 21.1741), heading = 310.0021, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG", Accuracy = 90},
{ coords = vector3(90.4941, -1955.1763, 20.8671), heading = 0.561200, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG",
{ coords = vector3(86.8706, -1948.5342, 20.7981), heading = 338.9240, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(101.4297, -1957.6694, 20.7428), heading = 24.2025, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(111.6559, -1958.4443, 20.8265), heading = 29.4064, model = 'csb_ramp_gang', Weapon ="WEAPON_MICROSMG"},
{ coords = vector3(117.7004, -1951.0455, 20.7459), heading = 24.7913, model = 'csb_ramp_gang', Weapon ="WEAPON_SMG"},
}
},
In the Static Ped Config you can create your static Peds. You have the option to set the coordinates, the ped model and the animation if you want one. You can create unlimited static peds.
Static Peds Config
Config.StaticPeds = {
{
coords = vector3(222.8386, 205.9472, 104.5159),
heading = 167.9034,
model = 'csb_prolsec',
animLib = "mp_player_inteat@burger",
anim = "mp_player_int_eat_burger_fp"
}
}
Exports
Use this export to respawn peds of a certain group
respawnGroup("groupName")
Last updated