Please see Grouse Labs v2.0.0 for further support and updates.
Configurable Ped Patrols for FiveM! This is a paid script, available on my Tebex.
- Optimised code, resting resmon of 0.00ms and ~0.01ms whilst in use.
- Configure Different Areas of Patrol
- 23 Locations Pre-Configured // Add as many as you want!
- Choose Between 5 Patrol Types, Guarding, Walking, Driving, Flying and Boating.
- Patrols are Highly Configurable, with Global Settings for Cooldown, Spawn/Despawn Distances, Death Percentage and more.
- Patrols stay Tasked between Players and will go Dormant whilst no Players are nearby.
- Peds are Configurable, with Unique Settings for each Ped, including Health, Armour, Weapons, Ammo and their Model.
- Ability to Loot the Patrol Peds, and Set Custom Loot Tables for each Ped.
- Guards will Detect if They've Left their Guard Position and will Return to it.
- Vehicles are Configurable, with Unique Settings for each Vehicle, including Health, Plate, Lock Type and their Model.
- Vehicle Peds have the Ability to Control Mounted Turrets, and Vehicles have a Passenger Limit of 10 (if they can fit it!).
- Patrols have the Ability to Determine if a Players' Job is a Threat to them, and will Respond Accordingly.
- Patrols are Created Server-Side, and are Synced to all Players.
- don-patrols
- DurtyFrees' Data Dumps for the various data dumps needed for this script.
- PlebMasters for their updated ped, vehicle and weapon viewers.
- Vespura's Driving Style Calculator for the inspiration for the Driving Style Calculator.
- mrnewb, Mintz, beauflexx & others who provided testing and feedback.
Depending on your Framework, you will need to have installed either of the following dependencies:
- Always use the latest FiveM artifacts (tested on 6683), you can find them here.
- Ensure your
server.cfghasset sv_enforceGameBuild 2060or above, you can find more info on game builds here - Download the latest version from your keymaster.
- Extract the contents of the zip file into your resources folder, into a folder which starts after your framework or;
- Ensure the script in your
server.cfgafter your framework. - Configure the global
Config.DebugModebefore starting the script, to ensure correct startup and that debug are set to your liking.
Config.DebugMode = falseConfig.DebugModeboolean, if set true, the script will print debug messages to the console.
Config.Cooldown = 15
Config.DeathPercent = 80
Config.ResetsOnDeath = false
Config.DeleteOnReset = false
Config.SpawnDistance = 500.0
Config.DespawnDistance = 1000.0Config.Cooldowninteger, the time (in minutes) to wait before a patrol can be spawned again.Config.DeathPercentinteger, the percentage of peds that if killed, will cause the patrol to flee from the player.Config.ResetsOnDeathboolean, if set true, killing the above percentage of peds will cause the patrol to reset, opposed to waitng for the cooldown timer.Config.DeleteOnResetboolean, if set true, will delete the patrol entities on reset (patriculary handy if bodies aren't despawning naturally).Config.SpawnDistancefloat, the distance from any coordinate in a configured patrol area that triggers the patrol to spawn.Config.DespawnDistancefloat, the distance from any coordinate in a configured patrol area that triggers the patrol to despawn.
Note: Entities in FiveM (and GTA as a whole) have scope; that is, a distance of which players need to be within to know of it's existence. By default this is 424 units from the entity, Config.SpawnDistance will allow players to create entities outside of this scope, so this should be used with caution as it can cause performance issues and unexpected behaviour. Read more about scopes here.
Config.UI = {
uiType = 'drawtext',
label = 'Search',
icon = 'fas fa-search',
['Items'] = {
notify = 'framework',
title = 'Item Found',
text = 'You found %s x %s',
images = 'https://cfx-nui-qb-inventory/html/images/'
},
}Config.UI.uiTypestring, the type of UI to use for the search, can beqb-target,ox-target,drawtextorhelptext.Config.UI.labelstring, the label to display on the UI.Config.UI.iconstring, the icon to display on the UI (only used forqb-targetandox-target).Config.UI['Items'].notifystring|boolean, whether to notify the player when they find an item, can benative,frameworkorfalse.Config.UI['Items'].titlestring, the title of the notification (only used ifConfig.UI['Items'].notifyis set tonative).Config.UI['Items'].textstring, the text of the notification,%swill be replaced with the item name and amount (only used ifConfig.UI['Items'].notifyis set tonative).Config.UI['Items'].imagesstring, the path to the images folder for the notification (only used ifConfig.UI['Items'].notifyis set tonative).
- To create a new location, you need to add a new Table to the
Config.LocationsTable.
Config.Locations = {
{
name = '',
['Enabled'] = {guards = false, patrols = false, vehicles = false},
['Routes'] = {
guard = {...},
patrol = {
{...}
},
vehicle = {
{...}
}
},
['Peds'] = {
guard = {...},
patrol = {...},
vehicle = {
{...}
}
},
['Vehicles'] = {
{...}
},
['Settings'] = {
['Behavior'] = {...},
['Blips'] = {...},
['Combat'] = {...},
['Damages'] = {...},
['Drops'] = {...},
['Events'] = {...},
['Pathing'] = {
['Avoidance'] = {...},
['Movement'] = {...},
['Ragdoll'] = {...},
},
['Relationships'] = {...},
}
},
}Note: Each patrol table is declared as a non-indexed table (i.e. instead of [1] = {}, it's just {}). However, this script does support number indexed tables, so if you want to use them, go ahead.
namestring, the name of the patrol area, make sure it's unique and doesn't have any spaces (i.e. Grapeseed_Weed_Farm, Humane_Labs, etc.).Enabledtable;guardsboolean, whether the patrol will spawn guards.patrolsboolean, whether the patrol will spawn patrols.vehiclesboolean, whether the patrol will spawn vehicles.
Routestable, split into three sub-tables,guard,patrolandvehicle. Each of these tables is a table of information for the respective patrol type.guardis the Table of Guard Positions, with each guard having one table declaring coords, heading, scenario and chair (if applicable).patrolis the Table of Patrols, with each patrol having one main table, with each patrol point having a table declaring coords, heading, time and scenario.vehicleis the Table of Vehicle Patrols, with each patrol having one main table, with each patrol point having a table declaring coords, speed and flags (ie. driving style).
Note: For patrol types with scenarios, only 'WORLD_HUMAN_.. & 'PROP_HUMAN_.. have been tested and known to work. Other scenarios may work, but are not guaranteed.
guard = {
{coords = vector3(-2302.88, 3385.7, 31.26), heading = 143.86, scenario = 'WORLD_HUMAN_GUARD_STAND_ARMY', chair = `h4_prop_h4_weed_chair_01a`},
{coords = vector3(-2301.31, 3387.83, 31.26), heading = 321.56, scenario = 'WORLD_HUMAN_GUARD_STAND_ARMY', chair = `h4_prop_h4_weed_chair_01a`}
},Note: The amount of guards for a given location is not limited, so you can add as many as you want by adding more tables to the guard table.
coordsvector3, the coordinates of the Guard Positionheadingfloat, the heading of the Guard whilst at the Guard Position.scenariostring, the Scenario of the Guard, you can find a list of scenarios here.chairnumber|string|nil, nil if the guard is not sitting, otherwise the hash or name of the chair prop. You can find a list of chair props here.
patrol = {
{
{coords = vector3(-1826.44, 3296.78, 32.83), heading = 332.92, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_GUARD_STAND_ARMY'},
{coords = vector3(-1791.71, 3277.2, 32.77), heading = 238.37, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_BINOCULARS'},
{coords = vector3(-1743.14, 3248.95, 32.81), heading = 333.22, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_GUARD_PATROL'},
{coords = vector3(-1785.16, 3176.31, 32.83), heading = 152.92, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_STAND_IMPATIENT'},
{coords = vector3(-1819.5, 3195.79, 32.79), heading = 59.17, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_GUARD_PATROL'},
{coords = vector3(-1867.65, 3225.62, 32.85), heading = 153.11, time = math.random(1000, 5000), scenario = 'WORLD_HUMAN_GUARD_STAND_ARMY'}
}
},Note: The amount of patrols for a given location is not limited, so you can add as many as you want by adding more tables to the patrol table.
coordsvector3, the coordinates of the Patrol Position.headingfloat, the heading of the Patrol Position.timeinteger, the time to wait at the Patrol Position (in milliseconds). This can be a number or a math.random() function, to randomise the time between two numbers.scenariostring, the Scenario of the Guard, you can find a list of scenarios here.
vehicle = {
{
{coords = vector3(-1851.93, 3318.97, 32.93), speed = 20.0, flags = 447},
{coords = vector3(-1716.95, 3241.34, 32.54), speed = 20.0, flags = 447},
{coords = vector3(-1741.59, 3161.12, 32.55), speed = 20.0, flags = 447},
{coords = vector3(-1894.12, 3231.54, 32.56), speed = 20.0, flags = 447}
}
},Note: The amount of vehicle patrols for a given location is not limited, so you can add as many as you want by adding more tables to the vehicle table.
coordsvector3, the coordinates of the Patrol Position.speedfloat, the speed of the Vehicle going to the Patrol Position.flagsinteger, the Driving Style of the Vehicle going to the Patrol Position, you can calculate driving styles online here or in-game here and also find a list of flags here.
Some Driving Styles:
447 - Will obey all traffic laws, and act like a normal civilian vehicle.
262591 - Will obey all traffic laws, and will path on dirt roads.
786432 - Drives recklessly, and will path on dirt roads.
Pedsis split into three sub-tables,guard,patrolandvehicle. Each of these tables is a table of information for the respective patrol type. Vehicles have some extra functionality and tables, which will be explained here.
['Peds'] = {
guard = {
{...}, -- Guard 1
{...} -- Guard 2
},
patrol = {
{...}, -- Patrol 1
{...} -- Patrol 2
},
vehicle = {
{ -- Vehicle 1
{...}, -- Passenger 1
{...} -- Passenger 2
}
{...} -- Vehicle 2 w/ No Unique Passengers
}
},['Base'] = {
model = 's_m_m_marine_01',
weapon = 'weapon_pistol_mk2',
health = 250,
armour = 100,
ammo = 250,
brandish = true,
-- flags = {},
['Loot'] = {...}
},modelstring|number, the Model of the Ped, this can be either a string or the hash. You can find a list of all Ped Models here.weaponstring|number, the Weapon of the Ped, this can be either a string or the hash. You can find weapon names and stats here.healthinteger, a value between 0 and 1000, this is the health of the ped. Default ped health for males is between 100 to 200 and between 0 and 100 for females.armourinteger, a value between 0 and 100, this is the armour of the ped.ammointeger, setting the ammo of the ped. This is only used ifuseDiminishingAmmois set totruein theBasetable of theSettingstable.brandishboolean, whether the ped will brandish their weapon when spawned. Default is false, set to true to enable.flagsinteger[], array of flags to uniquely set on the ped. This is by default used by vehicle peds and care should be taken that the flags don't conflict with the global settings. A full list of flags can be found here.['Loot']nil|boolean|table{item: string|string[], amount: integer|integer[]}['Loot'].itemstring|string[], the item to give the player when the ped is looted. If a string, it will give the item and configured amount. If a table, it will give a random item from the table and configured amount.['Loot'].amountinteger|integer[], the amount of the item to give the player when the ped is looted. If an integer, it will give the item and configured amount. If a table, it will give a random amount between the two numbers.
['Ranges'] = {
lod = 250.0,
id = 100.0,
seeing = 100.0,
peripheral = 100.0,
hearing = 100.0,
shout = 100.0
}lodfloat, the distance the ped will be visible from.idfloat, the distance the ped will be visible to other peds from.seeingfloat, the distance the ped can see hostile actions from.peripheralfloat, the distance the ped can see hostile actions from the 'corner' of their eye.hearingfloat, the distance the ped can hear hostile actions from.shoutfloat, the distance the ped can communicate to respected peds.
Note: The vehicles table can be declared in two ways, depending on how you want that vehicle configured.
-
If you want the vehicle to have unique settings on each passenger, first declare the vehicle table and create a non-indexed table, with each table being the settings for that passenger (see Example 1).
-
If you want the vehicle to have the same settings for each passenger, first declare the vehicle table and then populate that table the same as you would either guards or patrols (see Example 2). The amount of passengers will be declared in the
['Vehicles]table, explained here.
vehicle = {
{ -- Example 1
{
['Base'] = {...},
['Ranges'] = {...}
}, {
['Base'] = {...},
['Ranges'] = {...}
}
},
{ -- Example 2
['Base'] = {...},
['Ranges'] = {...}
}
}flagsinteger[], array of flags to uniquely set on the ped. Here it is used to set the flags on the vehicle peds, the example array is my reccomended flags for vehicle peds. A full list of flags can be found here.
Vehiclesis split into tables for each vehicle, with each vehicle having a table of settings. This table matches the index of the vehicle in the['Route']table, so if you have two vehicles in the Route table, you will need two tables in the Vehicles table.
['Vehicles'] = {
{['Base']}, -- Vehicle 1
{['Base']} -- Vehicle 2
},['Base'] = {
model = 'crusader',
vehType = 'automobile',
passengers = false,
lockType = 3,
health = 1000.0,
dirtLevel = 0.0,
plate = 'ARMY'
}modelstring|number, the Model of the Vehicle, this can be either a string or the hash. You can find a list of Vehicle Models here.vehTypestring, the Type of the Vehicle, this can beautomobile,bike,boatorheli.passengersboolean|integer|nil, is either false|nil or an integer;- If false, the vehicle passengers will be configured individually and the amount determined by the amount of tables in the
['Peds'].vehicle[patrol]table. - If an integer, the vehicle passengers will be configured the same as the vehicle driver and the amount determined by the integer.
- If false, the vehicle passengers will be configured individually and the amount determined by the amount of tables in the
lockTypeinteger, value between 0 and 5, this is the lock type of the vehicle. Default is3(LockedForPlayer). For more information on lock types, see here.healthfloat, the health of the vehicle. Default is1000.0and maximum is1000.0.dirtLevelfloat, the dirt level of the vehicle. Default is0.0and maximum is15.0.platestring, the plate of the vehicle. This has a character limit of8.
Settingsis split into eight sub-tables,Behavior,Blips,Combat,Damages,Drops,Events,PathingandRelationships. Each of these tables globally set across the patrol.
['Settings'] = {
['Behavior'] = {...},
['Blips'] = {...},
['Combat'] = {...},
['Damages'] = {...},
['Drops'] = {...},
['Events'] = {...},
['Pathing'] = {
['Avoidance'] = {...},
['Movement'] = {...},
['Ragdoll'] = {...},
},
['Relationships'] = {...},
},['Behavior'] = {
ignoreMelee = false,
ignoreFire = false,
ignoreBeingJacked = false,
ignoreSilencedClone = true,
ignoreExplosion = false,
preventMeleeTaunts = false,
disableHurt = false,
disableWrithe = false,
preferInjuredGetup = true,
onlyWritheFromWeapon = true,
runFromFires = true,
dontShoutTarget = false,
dontCryForHelp = false
},ignoreMeleeboolean, whether the ped will ignore melee actions.ignoreFireboolean, whether the ped will ignore fire.ignoreBeingJackedboolean, whether the ped will ignore being jacked from a vehicle.ignoreSilencedCloneboolean, whether the ped will ignore silenced weapons.ignoreExplosionboolean, whether the ped will ignore explosions.preventMeleeTauntsboolean, whether the ped can melee taunt.disableHurtboolean, whether the ped can have hurt reactions.disableWritheboolean, whether the ped can writhe on the ground.preferInjuredGetupboolean, whether the ped will prefer getting up from an injured state.onlyWritheFromWeaponboolean, whether the ped will only writhe from weapon damage.runFromFiresboolean, whether the ped will run from fires.dontShoutTargetboolean, whether the ped will communicate their targets postion.dontCryForHelpboolean, whether the ped will call for help when injured.
['Blips'] = {
enabled = true,
hasCone = true,
forcedOn = false,
colour = {enemy = 1, ally = 3},
range = 50.0,
clearOnDeath = true
},enabledboolean, whether the ped will have a blip.hasConeboolean, whether the blip has a view cone on the minimap whilst active.forcedOnboolean, whether the blip will be forced on the minimap. Default isfalse.colourtable,colour.enemyfor the colour of the blip when the ped is an enemy andcolour.allyfor the colour of the blip when the ped is an ally. A full list of colours can be found here.rangefloat, the distance the blip can be activated from.clearOnDeathboolean, whether the blip will be removed on death.
['Combat'] = {
attributes = {5, 14, 15, 46},
ability = 100,
accuracy = 100,
alertness = 2,
movement = 1,
range = 2,
targetResponse = 2,
canAttackFriendly = false,
canUseCover = true,
useDiminishingAmmo = true,
blockWeaponSwitching = false,
enableWeaponBlocking = false,
keepWeaponHolstered = true,
disableMelee = false,
disableUnarmedDriveby = false,
disableWritheShooting = false,
respondToHelpCries = true,
treatDislikeAsHated = true,
treatNonFriendlyAsHated = false,
},attributesinteger[], array of attributes to set on the ped. A full list of attributes can be found here.abilityinteger, between 0 and 100, this is the ability of the ped. A number between 0 and 50 is poor, 50 and 75 is average and 75 and above is professional.accuracyinteger, between 0 and 100, this is the accuracy of the ped.alertnessinteger, between 0 and 3, this is the alertness of the ped. 0 is calm and 3 is paranoid.movementinteger, between 0 and 3, this is the movement of the ped. 0 is stationary, 1 is defensive, 2 is will advance and 3 is will retreat.rangeinteger, between 0 and 3, this is the range of the ped. 0 is near, 1 is medium, 2 is far and 3 is very far.targetResponseinteger, between 0 and 2, this is the target response of the ped. 0 is exist task, 1 is never lose target and 2 is search for target.canAttackFriendlyboolean, whether the ped can attack friendly peds.canUseCoverboolean, whether the ped can use cover.useDiminishingAmmoboolean, whether the ped will use diminishing ammo. If set to false, the ped will have infinite ammo.blockWeaponSwitchingboolean, whether the ped can switch weapons.enableWeaponBlockingboolean, whether the ped will be blocked by objects when shooting (or attempting to shoot).keepWeaponHolsteredboolean, whether the ped will keep their weapon holstered until fired.disableMeleeboolean, whether the ped can use melee attacks.disableUnarmedDrivebyboolean, whether the ped can use unarmed drivebys.disableWritheShootingboolean, whether the ped can shoot whilst writheing on the ground.respondToHelpCriesboolean, whether the ped will respond to help cries.treatDislikeAsHatedboolean, whether the ped will treat dislike as hated (Relationship type 4).treatNonFriendlyAsHatedboolean, whether the ped will treat non friendly as hated (Any Relationship from 3 and above).
['Damages'] = {
diesWhenInjured = false,
incapacitation = true,
criticals = true,
bullets = true,
fire = true,
explosion = true,
collision = true,
steam = true,
melee = true,
drown = true,
electric = true,
ragdoll = false,
invincible = false
},diesWhenInjuredboolean, whether the ped will die when injured.incapacitationboolean, whether the ped will writhe when injured.criticalsboolean, whether the ped will suffer critical hits.bulletsboolean, whether the ped will suffer bullet damage.fireboolean, whether the ped will suffer fire damage.explosionboolean, whether the ped will suffer explosion damage.collisionboolean, whether the ped will suffer collision damage.steamboolean, whether the ped will suffer steam damage.meleeboolean, whether the ped will suffer melee damage.drownboolean, whether the ped will drown.electricboolean, whether the ped will suffer electric damage.ragdollboolean, whether the ped will die when ragdolled.invincibleboolean, whether the ped will be invincible.
['Drops'] = {
weapons = false,
healthSnacks = false
},weaponsboolean, whether the ped will drop their weapon when killed.healthSnacksboolean, whether the ped will drop a health snack when killed (like in GTA:O).
['Events'] = {
listensToSoundEvents = true,
checkLOSForSoundEvents = true,
disableWeirdPedEvents = false,
disableCryForHelpEvents = false,
usePerceptionForAimEvents = true,
disableShockingEvents = false,
disableShockingDrivingEvents = false
},listensToSoundEventsboolean, whether the ped will listen to sound events.checkLOSForSoundEventsboolean, whether the ped will check line of sight to generate/respond to sound events.disableWeirdPedEventsboolean, whether the ped will disable weird ped events (ie. CEventShockingWeirdPed & CEventShockingWeirdPedApproaching)disableCryForHelpEventsboolean, whether the ped will disable cry for help events (ie. CEventShockingCryForHelp)usePerceptionForAimEventsboolean, whether the ped will use their perception to generate aim eventsdisableShockingEventsboolean, whether the ped will respond to shocking events (ie. CEventShocking)disableShockingDrivingEventsboolean, whether the ped will respond to shocking driving events (ie. CEventShockingDriving)
['Avoidance'] = {
avoidDrops = true,
avoidFire = true,
avoidPeds = true,
avoidTearGas = true,
avoidWater = true
},avoidDropsboolean, whether the ped will avoid falls from height whilst randomly pathing.avoidFireboolean, whether the ped will avoid fire whilst randomly pathing.avoidPedsboolean, whether the ped will avoid other peds whilst randomly pathing.avoidTearGasboolean, whether the ped will avoid tear gas whilst randomly pathing.avoidWaterboolean, whether the ped will avoid water whilst randomly pathing.
['Movement'] = {
disableCrouch = false,
disableDives = false,
disableClimbing = false,
disableLadders = false
},disableCrouchboolean, whether the ped will can crouch.disableDivesboolean, whether the ped will can evasive dive.disableClimbingboolean, whether the ped will can climb over objects.disableLaddersboolean, whether the ped will can climb ladders.
['Ragdolling'] = {
canRagdoll = true,
pedImpact = true,
vehicleImpact = true,
bulletImpact = true,
explosion = true,
fire = true,
electrocution = true,
objectImpact = true,
melee = true,
waterjetImpact = true,
drowning = true,
falling = true,
onBoats = true,
rubberBullet = true,
smokeGrenades = true,
pedCollision = true,
vehicleCollision = true,
playerImpact = true,
aiRagdollImpact = true,
playerRagdollImpact = true,
minorPlayerImpact = true,
ragdollOnDeath = true
}canRagdollboolean, whether the ped can ragdoll.pedImpactboolean, whether the ped will ragdoll from ped impacts.vehicleImpactboolean, whether the ped will ragdoll from vehicle impacts.bulletImpactboolean, whether the ped will ragdoll from bullet impacts.explosionboolean, whether the ped will ragdoll from explosions.fireboolean, whether the ped will ragdoll from fires.electrocutionboolean, whether the ped will ragdoll from being electrocuted.objectImpactboolean, whether the ped will ragdoll from object impacts.meleeboolean, whether the ped will ragdoll from melee attacks.waterjetImpactboolean, whether the ped will ragdoll from water jet impacts.drowningboolean, whether the ped will ragdoll from drowning.fallingboolean, whether the ped will ragdoll from falling.onBoatsboolean, whether the ped will ragdoll from being on boats whilst they're moving.rubberBulletboolean, whether the ped will ragdoll from rubber bullet impacts.smokeGrenadesboolean, whether the ped will ragdoll from smoke grenade impacts.pedCollisionboolean, whether the ped will ragdoll from ped collisions.vehicleCollisionboolean, whether the ped will ragdoll from vehicle collisions.playerImpactboolean, whether the ped will ragdoll from player impacts.aiRagdollImpactboolean, whether the ped will ragdoll from ai ragdoll impacts.playerRagdollImpactboolean, whether the ped will ragdoll from player ragdoll impacts.minorPlayerImpactboolean, whether the ped will ragdoll from minor player impacts.ragdollOnDeathboolean, whether the ped will ragdoll on death.
['Relationships'] = {
[0] = {'police', 'ambulance', 'fire', 'ARMY'},
[1] = 'security',
[5] = 'PLAYER',
override = 'Zancudo_Army_Base'
}Relationships have 6 Levels, 0 for Companion, 1 for Respect, 2 for Like, 3 for Neutral, 4 for Dislike and 5 for Hate. Use the desired level as a table index and then specify the job or jobs you want to set the relationship for. For the Patrols general hostility towards players, ensure table index 5 or 4 has the string PLAYER in it.
- Companion | Will never be triggered by hostile actions, and will help the player if they are attacked.
- Respect | Will only be triggered by extreme hostile actions, and will help the player if they are attacked.
- Like | Will only be triggered by extreme hostile actions.
- Neutral | Will be triggered by hostile actions.
- Dislike | Will be triggered by hostile actions, and will attack the player if they are attacked.
- Hate | Will be triggered by any hostile action, and will attack the player on sight.
overridestring, the name of the relationship override, this is used to set the same relationship between different Patrols.
- On FiveM build (6356) CPatrolNodeLimit has a lower cap (~50), throwing an error when trying to create more patrols than the ascribed limit. This issue has been resolved without the need to increase Game Pool sizes, and use's Sequences to replace TaskPatrol, thus alleviating the issue.
Copyright © 2022, Hulieo Anderson
- Join my discord.
- Open a ticket and please have your Tebex Transation ID ready 🙂.
- v2.0.0 - Many improvements to the server AI loop, reduction in config bloat, updates to support new framework versions as well as many bugs squashed.
- v1.4.5 - Added More Entity Checks on Players to Avoid Triggering Errors in the Server Console.
- v1.4.4 - Update Lua Language Server comments & Fix Server Console Error Spam due to Unknown Entity.
- v1.4.3 - Various linting Updates, Added New Loot Ped Feature and Custom Loot Tables per Ped and More Fixes to Patrols Starting on ESX.
- v1.4.2 - Fixed Issue Where Guarding and Walking Patrols Wouldn't Face the Correct Heading, Fixed issue with Patrols not starting w/o a restart on ESX, Ensure Guarding Patrols Return to their Original Position after being Retasked & Fixed Issue Where Guards w/o Firearms would get Stuck Between Attacking and Guarding.
- v1.4.1 - Changed to Use Promises in Version Checker, Updated README & Added New Preview Links.
- v1.4.0 - Created Version Checker & Fix Bug Related to Reseting Patrols.
- v1.3.9 - Add Final Cayo Locations, Fix Bug with Vehicle Patrols Passengers not being able to Find their Seat when other Vehicles were Active in the Same Patrol.
- v1.3.8 - Improve Performance of ReTasking Event, Updates to Relationship Syncing & Add NextPoint in route check when re-tasking.
- v1.3.7 - Update README & Config links, Improve Comments & Add More Cayo Patrols.
- v1.3.6 - Improve typings in annotations (and annotations overall), Improve Flee function AI and to include all new vehicle types.
- v1.3.5 - Added chair prop to Guard Config, Add Scenarios to some default Patrols & Removed Unused Tables.
- v1.3.4 - Change Debug Prints to be More Descriptive & Add Scenarios to Patrols (not just Guards).
- v1.3.3 - Improve Blip Config, Added Ally & Enemy Blip Colours, Added Blip Forced On & Stopped Blips Appearing on main map.
- v1.3.2 - Implemented First Heli Patrol & Added Freeze function between tasking and net owner changes.
- v1.3.1 - Implemented First Boat Patrol, Finished Cayo Weed Farm and Start Cayo Town 3.
- v1.3.0 - Cleanup Pass; Remove Unused Code, Improve Code Readability & Reduced Wait time on spawning & tasking.
- v1.2.9 - Add Passenger Checks to Prevent Vehicle Patrols from leaving without their passengers & more Improvements to GetSeat.
- v1.2.8 - Improve GetSeat check for vehicle peds & Fixed Bug Where Vehicle would find new drivers whilst having one.
- v1.2.7 - Initialised 4 More Cayo Perico Patrols.
- v1.2.6 - Create Event to Sync Relationships across clients & Change PlayerDowned function to use framework specific metadata.
- v1.2.5 - Add Auto Framework Detection.
- v1.2.4 - Restructure File, moving
libandconfigto thesharedfolder & Refactor style to follow Lua Style Guide. - v1.2.3 - Begin Implementing Cayo Perico Patrols.
- v1.2.2 - Add Job.type support for QBCore.
- v1.2.1 - Improve Tasking Functions, Improve JobData Collection & Add GameBuild 2060+ to Dependecies.
- v1.2.0 - Reworked Guard peds to be able to complete any Scenario whilst guarding, opposed to just using
StandGuard. - v1.1.9 - Changed all Walking tasks to utilise navmeshes for smoothness & All Old Patrols excluding Cayo Perico updated to the new format.
- v1.1.8 - Created First New Patrol Route (Zancudo Military), Create a death thread to ensure calm AI to downed players & add brandish to ped config.
- v1.1.7 - Rework README to implement config changes and improve readability.
- v1.1.6 - More Robust Ped & Patrol Configuration w/ functions to suit, Initialised EntityDump for tracking dropped peds on the server & Finished Statebag Implementation.
- v1.1.5 - Start of large refactor, Annotated all Code and Began Statebag Implementation.
- v1.1.4 - Added Multi-Framework Support.
- v1.1.3 - Added New Config Options
pedSettings.suffersCrits,pedSettings.diesWhenInjuredandpedSettings.pathing.canRagdoll. Small Code Cleanup. - v1.1.2 - Fixed an error on the server where the Ped didn't exist and had it's coords checked.
- v1.1.1 - Added a table of Threads to handle Vehicle Patrols whilst having multiple clients nearby. This should fix drivers staying in the same place when the network owner leaves the area.
- v1.1.0 - Proper Syncing between Clients, Ensuring Vehicle Patrols stay Tasked when players leave area and Optimised Functionality for Checking for Closest Players.
- v1.0.9 - New Function for Finding Closest Player, and Added an Event to Retask a Patrol after changing Owners.
- v1.0.8 - Added a failsafe for when a player leaves the area but other players are nearby.
- v1.0.7 - More Failsafes for Vehicle Patrols.
- v1.0.6 - More Debug Prints, attempted Fixes of Patrols Duplicating.
- v1.0.5 - Added Debug Mode and Fixed a bug where Driver Peds wouldn't attack a Players Friends.
- v1.0.4 - Linting and General Fixes.
- v1.0.3 - Added Fail Safes' for Drivers Despawning when a Player is too far away.
- v1.0.2 - Added
pedSettings.relNameOverrideand Vehicle Patrols will now chase down the player if they are in a vehicle. - v1.0.1 - Added Config Options for Distance Checks.
- v1.0.0 - Initial Release