[RELEASE] FiveM Crackdown game mode and mission generator/creation [BETA]

update to 3.0.4:
mrp-missions-3.0.4.zip (365.6 KB)

Fixes a bug introduced that caused rescued hostages to receive red enemy blips.

update to 3.0.5, another bug fix:
mrp-missions-3.0.5.zip (365.7 KB)

Hostage count updates properly now for Mission21. Also Mission25 updated to spawn enemy planes again which were taken out due to debugging that was left in.

another post-v3 release update. Some code for Mission4 was commented out during debugging, this puts it back in to highlight a new feature in v3, where you can have vehicles follow other vehicles or peds easily via a simple config setting for the mission config… Mission4 is proper now
mrp-missions-3.0.6.zip (365.7 KB)

1 Like

Ack, found another newly added mission, Mission15 had some commented out code for debugging I forgot to put back in. Thats fixed now.

Just reviewed everything, that should be it. Also improved the README.txt. It now details each of the 34 mission features, to help build your own missions.

mrp-missions-3.0.7.zip (374.0 KB)

EDIT: updated to 3.0.8, small update to client.lua:
mrp-missions-3.0.8.zip (374.0 KB)

EDIT2: updated to 3.0.9. Changed controls for deploying air drop supply, since this interfered with other in-game controls.
mrp-missions-3.0.9.zip (375.2 KB)

CONTROLS (which can be turned on/off depending on mission config settings):

Players can press (DPAD LEFT & RB) of their gamepad or Q key & SCROLLWHEEL UP together, to call in an air drop of mission weapons and upgrades for a $ cost. If they dont want to make it to the safe house.
The safe house has to be open for this work.

There is a working RC Bandito remote detonation vehicle as well to use on missions. Use LB on the gamepad, or E key to detonate it.

Players can spawn/deploy rcbandito remote detonate vehicles on the fly using RB+DPAD-Right or A + D keys. This will use one of their safe house vehicles for the mission though, will cost same $ amount
as a safehouse vehicle, and players will need to wait until the safehouse is open to be able to deploy.

Players can toggle night vision and thermal vision if enabled. Player will press and hold both Left stick down + right stick down ( C + Left Ctrl by default) to cycle through.

If EnableOptIn or EnableSafeHouseOptIn is turned on:
Players press ‘Q’ and ‘]’ keys or RB + DPAD UP together to join an active mission. (with EnableSafeHouseOptIn player has to be
at the safehouse marker.)
Players Press RB + DPAD DOWN or ‘Q’ and ‘[’ keys together to stop particpating in missions, only after a mission is over and
another has not started.

Mission comments for building your own missions:
Mission1 is a standard 1 Objective mission, that also has events added.
Mission2 is a HostageRescue mission that also has an event with a custom notify message
Mission3 is an Assassinate mission that has a vehicle following/chasing another vehicle,
this one stationary.
Mission4 is an Assassinate mission that has a vehicle following/chasing another vehicle
that is moving.
Mission5 is an Assassinate mission that also has a friendly to rescue
Mission6 is a multi-objective mission that has 3 objectives to capture and 1 hostage to
(optionally) rescue. It also has custom props added, and events, one which will spawn a
random enemy vehicle, another random enemy peds.
Mission7 is a standard 1 Objective mission, that also has an event with a custom notify message
and custom props.
Mission8 is a standard 1 Objective mission, that also has events, custom props and a vehicle
chasing/following another vehicle, this one stationary.
Mission9 is a standard 1 Objective mission, that also has events and custom props, and a vehicle
chasing/following another vehicle, this one stationary.
Mission10 is an Assassinate + IsDefend mission where players have to stop enemies making it to a zone they must
defend. It has a custom mission start point, and a few custom safehouse options which alter the
default safe house behaviour.
Mission11 is a standard 1 Objective mission, that has custom reward pickups defined for mission completion.
Mission12 is a randomly generated mission (IsRandom) that is a standard 1 objective mission that uses RandomMissionPositions array to spawn a mission.

Mission13 is an Assassinate + IsDefend + IsDefendTarget mission that has players defending a target on foot. It has SetBlockingOfNonTemporaryEvents attribute set to true for 1/2 the enemies. All enemies will chase the
target due to IsDefendTargetChase=true, and the ones with SetBlockingOfNonTemporaryEvents=true, will attack
the target when within 10m of them, due to IsDefendTargetAttackDistance = 10.0. Also other settings as well,
like removing all weapons from mission players at mission start, and a custom mission start point, etc…
Also, custom movespeed attribute is set 1.0 for walking, 2.0 for running for NPCs
IsDefendTargetEntity defined the target ped. Blip2 and Blip are at the same, since target ped is stationary,
and has IsDefendTargetSetBlockingOfNonTemporaryEvents=true set to true, so they dont run off.

Mission14 is an Assassinate + IsDefend + IsDefendTarget mission, similar to Mission13, but for vehicles. The target ped to defend is in
a vehicle. Of note: IsVehicleDefendTargetChase=true makes enemy NPCs in vehicles chase the target. IsDefendTargetEntity defines the target NPC and vehicle, and they have movetocoord set to make them drive at a movespeed rate.
Blip2 is where the target spawns, but you can also use SpawnAt={x=…,y=…,z=…} inside IsDefendTargetEntity to
have the target + vehicle spawn at a custom position. Blip is the destination, where their movetocoord points to, and since IsDefendTargetRewardBlip = true, a marker with IsDefendTargetGoalDistance radius, and money reward of
GoalReachedReward = 1000 if the target makes it there, to complete the mission.
The mission can also be completed if all enemies are eliminated, like any other IsDefend/IsDefendTarget mission.
IsDefendTargetDoPlaneMission=true, makes planes AI slightly different than if it is false, worth experimenting with,
may not make a difference.
It also has custom safe house mission vehicles spawn in the mission’s Vehicles array. These must come after any enemy
NPC vehicles, and not have id2 attribute defined.

Mission15 is basically the same as Mission14, except there is no destination (So Blip and Blip2 are the same), the
target to defend (IsDefendTargetEntity) has driving=true which basically makes them wander, or drive from the enemy NPCs.
IsDefendTargetRescue = true in this case so the target can be rescued to complete the mission without killing all the enemy NPCs.
It also has npcs with conqueror=true, which is basically the same as having SetBlockingOfNonTemporaryEvents=true

Mission16 Assassinate + IsDefend mission, where players have to defend a zone from enemy incursion. This highlights how you
can define each specific vehicle driver to follow/escort/defend another vehicle, with via attributes like:
VehicleGotoMissionTarget=true,VehicleGotoMissionTargetVehicle=2
where the 2 is the vehicle index of a vehicle that is defined BEFORE the vehicle with the attributes.
It also has a mission defined VehicleGotoMissionTargetVehicle=9, which is the default mission vehicle id to follow.
See the bombushka, which just has VehicleGotoMissionTarget=true set. If no VehicleGotoMissionTarget attribute is set,
the vehicle will do default behavior.
This mission also has a event, with the attributes, that spawns a vehicle:
DoIsDefendBehavior=true, <-- Tells the vehicle driver spawned to act like other AI driver in an IsDefend/IsDefendTarget mission.
IsDefendTargetTriggersEvent = true, <-- this event can be triggered by an IsDefendTarget ped (none in Mission16)
There is also DoBlockingOfNonTemporaryEvents=true, which is the same as setting SetBlockingOfNonTemporaryEvents=true for the ped

Mission17 is a HostageRescue IsRandom + IsRandomSpawnAnywhere randomly generated mission. See RandomMissionTypes attribute.
It means that it will spawn a mission anywhere within IsRandomSpawnAnywhereCoordRange. Since RandomMissionDoLandBattle is true,
it will only spawn ped/vehicles on land. IsRandomEvent=true, means that a single random event will spawn when players get close
enough. RandomMissionGuardAircraft=true, means that a random, aircraft will spawn that will guard the mission object blip area.
There are a lot of other random mission settings as well. See missions.lua and Config_Guide.lua.txt for more information.

Mission18 is basically the same as Mission17, except RandomMissionTypes ={“BossRush”}, where Boss peds that are tougher are made
the targets to eliminate to complete the mission.

Mission19, is the same as Mission13, except randomly generated: IsRandom=true and RandomMissionTypes ={“Assassinate”}.
RandomMissionPositions is defined on Mission19 at a specific location.
IsDefendTargetOnlyPlayersDamagePeds=false, overrides the default whereby enemy NPCs are only damage by peds, since the
target to defend will be fighting back this time. There are a lot more mission specific overrides set as well.

Mission20 is similar in many ways to random missions 17 and 18, except IsBountyHunt=true. Since RandomMissionTypes ={“Assassinate”},
it will spawn targets to eliminate via RandomMissionMinPedSpawns… etc…, but since IsBountyHunt=true, it will spawn squads or
protectors and at least one other target to eliminate with each main ped/vehicle. See the other Bounty attributes
which define squad size and range etc… also missions.lua and Config_Guide.lua.txt for more information.
NOTE, RandomMissionSpawnRadius = 6000.0, So it will spawn groups of peds/vehicles around the map.
Also, IsBountyHuntDoBoats=true, which means if water is found when spawn a vehicle, spawn a boat.

NOTE: Missions 17 + 18 spawn in a way not to spawn on rooftops, via ray tracing, but doesnt always work great around mountains, where
you can get peds in the air sometimes or under the map, until they become aware of the players.
Mission20 spawning with squads, I find works great around mountains, and if you want to spawn on rooftops more, use that in cities
as well.

Mission21 is pretty much the same as Mission20, except rescuing hostages, RandomMissionTypes ={“HostageRescue”}, where squads are defending the hostages.

Mission22 is in some ways the same as Mission12, a randomly generated 1 Objective mission, RandomMissionTypes ={“Objective”},
except, IsRandomSpawnAnywhere=true, so spawns anywhere on the map and IsBountyHunt=true, so squads of peds will spawn around default
defined peds in a way, similar to Mission20 and Mission21, except the RandomMissionSpawnRadius = 250.0, is much smaller and localized.

Mission23 is the same as Mission22, except RandomMissionTypes ={“Assassinate”}, where targets peds to eliminate are spawned, with
regular squads of body guards.

Mission24 is a random mission version of Mission14. Since IsRandom=true, we use
IsDefendTargetSetBlockingOfNonTemporaryEvents=true, to make the target ped driver to stick to the task. It uses similar attributes as Mission14, except IsVehicleDefendTargetGotoGoal=true, is set as well.
IsVehicleDefendTargetGotoGoal=true, makes the target ped drive/fly to one of the
RandomMissionDestinations randomly chosen.
Blip2 gets set to RandomMissionPositions[N].Postion, the start, where the target ped starts.
Enemies spawn around RandomMissionDestinations[M].x etc… by default.

Also, RandomMissionPositions also has
DefendTargetInVehicle = true,
DefendTargetVehicleMoveSpeedRatio = 0.5, --have vehicle move at 1/2 top speed

telling the mission system to set the target ped to drive a land vehicle, defined in
IsDefendTargetRandomVehicles array, at 1/2 top speed.

Mission25 is the same as Mission24, except for aircraft, where in
RandomMissionPositions:
DefendTargetInVehicle = true,
DefendTargetVehicleIsAircraft=true,

and an aircraft is randomly chosen from IsDefendTargetRandomAircraft array

Mission26 is the same as Mission26, exept we have in
RandomMissionPositions:
DefendTargetInVehicle = true,
DefendTargetVehicleIsBoat=true,

and a boat is randomly chosen fromIsDefendTargetRandomBoat array

Mission27 is the same as Mission24, except IsDefendTargetPassenger=true. So the target ped to defend
is a passenger that the player must drive to the destination. Default seatid is 0 for target passenger.
This can be overidden by using IsDefendTargetPassengerSeatId to define what seat id to go in.

Mission28 is the same as Mission25, except the player ped must fly the target to the destination, since
IsDefendTargetPassenger=true

Mission29 is the same as Mission26, except the player ped must drive/sail the target to the destination, since
IsDefendTargetPassenger=true

NOTE: RandomMissionDestinations in this case has a SpawnAt={x=…,y=…,z=…} attribute which will force the
random enemies to spawn around a different location instead of at the destination location (default)

Mission30 is a multi-objective mission, but with IndoorsMission = true, This means that ped and vehicles will
only spawn when a player is nearby. This was needed to be added for places like Humane Labs and DLC indoor areas,
where NPC skins would be invisble otherwise for some reason(?). SafeHouseSniperExplosiveRoundsGiven is set to 0,
which is a way to nerf exposive round amounts= given at the safe house, for the heavy sniper rifle, this case 0.
Events are used as well.

Mission31 is a Multi-objective mission that has a lot of events.

Mission32 is a Multi-objective mission with 1 objective, with a lot of events. Also a lot of custom safe house settings,
to teleport mission players into the bank vault, so they can fight their way out. A large custom prop as objective too.

Mission33 is a standard 1 objective mission with a lot of events, and custom props.

Mission34 is a version of Mission24, except similar to Mission15, in that there is no destination, the target to defend
drives and wanders, or evades enemies, which you must eliminate to save the target.

Mission39 is an example of a mission that uses Blips array to have multi objective mission blips

Mission42 is an example of the use of NextMission and NextMissionIfFailed mission attributes to combine missions into
stages, where if a mission is passed the next is loaded right away, else if failed, you need to restart the mission.
This can be done to create campaigns/multi stage missions that join together.

2 Likes

Another big update, which will most likely be the final one.
I will probably throw this up on github and announce in separate thread, with some guidance for people to incorporate into their own server with whatever changes.
mrp-missions-3.1.2.zip (326.2 KB)
Some of the new features:

Credits to VenomXNL and illusivee which I credited and link to their work in the OP as well.

Improved GUI:
-Mission Stats only show now when pressing DPAD DOWN or ‘[’ key
-Missions get received via notifications, credits to VenomXNL for his SMS_Message wrapper. Up to 3 SMS messages from a mission contact can be used to start missions. Different SMS messages can be sent on mission fail/pass from the mission contact.
-Mission fail/pass (and wasted) use native scaleform and improved. credits to illusivee for his Scaleform Wrapper.

Improved Features:
-Missions can now be easily configured to create campaigns/mission stages where passing a mission will automatically lead to another, failing will cause the current mission to be repeated etc… See Mission42. NextMission, NextMissionIfFailed and ProgressToNextMissionIfFail new attributes added to support this.

-When randomized mission selection is on, the server will remove the mission played until all the missions are played before re-adding all missions as a selection, to stop repetition. Players/admins can still pick missions per voting or commands.

-Stromberg will be modded when used in missions, added to certain missions.

New config options (can be turned on/off per mission):
-DoHelpScreens to enable key/button bindings notifications at mission start which is turned off now
-MissionVehicleRandomizeLiveries which is on, and this randomizes the livery (look and feel) of any mission vehicle to give more variety.
-ShowMissionIntroText which is off, which removes the old mission intro text, which is replaced by SMS now.
-Many SMS config options now too, like having random contacts/messages/subjects everytime a mission is played etc… See Missions.lua or Config_Guide.lua.txt file

1 Like

FYI, new thread is here, along with new link to github to download the latest version:

1 Like

not sure what you mean? there should be resources out there that do that.

Hi, just add that code yourself. Im not supporting that. My developed has finished on this for the time being.

can i strip this down and making zombies missions. i run a new zombie server. everyone is done but i want to make a mission system .

1 Like

Yes you can. Just edit the missions.lua to add the zombie peds instead for the mission. There is code already in the resource that looks for the zombie skin and “buffs”/alters the ped behavior to act more like a zombie, basically similar to how they act in corruptsnail resource.

1 Like

amazing thank you sir

1 Like

Hi. Love your script @ddraigcymraeg. Just have one issue, maybe you can assist? At the moment players are able to exploit this by storing the weapons they get in the missions in their safes/vehicles/house inventories etc. Is there perhaps a workaround for this?

@MidlifeGamingCrisis
Glad you are enjoying it. :slight_smile:
Hmmn, you could try setting one of these to true below… you would need to set the optin settings to true… see OPT-OUT/OPT-IN SETTINGS section. in missions.lua

–Set this to true to remove all weapons and upgrades (Crackdown mode buffs if enabled) at the mission end.
–This should be used with one of the 2 OptIn bove settings set to true, else it will remove weapons from everyone.
Config.RemoveWeaponsAndUpgradesAtMissionEnd = false

–Similar: Remove any previous upgrades/weapons before
–supplying new upgrades/equipment for the mission
–players need to be opted in if OptIn is enabled
Config.RemoveWeaponsAndUpgradesAtMissionStart = false

@ddraigcymraeg thank you for your reply! I have all those settings set to true and it does remove their weapons at the start and end of the mission if they’ve opted in, from their personal inventory BUT it doesn’t stop them from storing it in their house inventories, trunks or personal safes, then the script doesn’t know it’s there and therefore doesn’t delete them. If that makes any sense?

Ah, that would be tricky. Not sure how house inventories safes etc… are tied to the player id…but you would need to have a custom script that checked for the weapons per per safe/house etc… per client (per player) every so many seconds during a mission to remove. Thats not supported by this resource.

Thought as much! Thanks anyway.

would have to make the assets different from the standard ones so they will be deleted when outside the mission radius and delete if stored. or you could make it that they have to get the weapons etc in order to do the mission instead of spawning them, that way the player has the right to own it since they acquired it legally

Hey, great game mode. Can you please point out the money code line?
I’m using dunko vRP and I can’t figure out what code line of crackdown interacting with ESX money. Thank you, much appreciated.

Just look for ESX in the code, you will find it.

fyi… latest is here, with github: [Release] 'Crackdown' Missions System v3 & GitHub for your own missions

Can I make it so they dont have %100 aim and dont miss 1 shot?