Fivem Crackdown gamemode and mission generator/creator [BETA]
This resource is primarily a competitive co-operative game mode where players take on missions together against enemy NPCs for $ (uses native money by default). It is standalone, but will also support ESX money system. You can also use this bare bones as a (side-)mission/quest system for an RP server, it is almost entirely configurable. There are different types of missions:
- Capture the Objective, where a capture point needs to be secured to complete the mission.
Assassinate, where all enemy NPCs needs to be eliminated to complete the mission
Defend, where players need to defend a zone against invading enemy NPCs or lose the mission. The defend zone will show up as red area blip on the map.
- Defend Target, where players need to defend or rescue a friendly NPC target from being eliminated or lose the mission. The NPC will be a yellow blip.
There are also friendly hostages (green blips) where players walk up to and they will get $ when rescued. Money is given for eliminating enemies, capturing objectives and rescuing the any friendly NPCs targets as well.
Capture the Objective mission from the random mission generator:
Elimination mission from the random mission generator, also shows hostage rescue:
(In both videos above I have the ‘SafeHouseCrackDownMode’ turned on for extra health and abilities)
RC Bandito remote detonation added as well in missions:
Safe House, for health, armor, upgrade and supplies
Mission Map for random generated mission shows all $ rewards/costs
Combat during random generated mission (I’m in invuln mode )
More Mission Combat. Add turret vehicles to missions, turrets get auto-populated
Capturing an objective randomly generated mission.
Mission6 ‘Escape from Los Santos’, custom props can be added to missions
Scoreboard (use button/key for phone)
RC Bandito entry notification:
RC Bandito remote detonation just before the player rejoins their player pawn:
Stats notification at the end of each mission:
Intro notification at the start of the mission:
pounder2 upgraded and weaponized:
default loadout at safehouses/crate drops and on mission completion now use more powerful ammo types to combat more powerful enemies. Safe houses/crate drops now cost more, $2000 each. Safehouse vehicles are free:
Default ‘Crackdown’ mode upgrade notification at a safe house.
Harder ‘Bosses’ that give more reward to take on like the Juggernaut:
The default game mode has ‘safe houses’, where all players travel/teleport to when they spawn/respawn and also at the start of every new mission. This is where they will receive equipment, upgrades and vehicles to optionally use for the mission, at a $ cost. The players will get super run, super jump, super swim and 5000 health when upgrade at a safe house, which is why I decided to call it Crackdown. A player can claim (buy for $) up to 2 vehicles per mission at a ‘safe house’ as well, and cannot drive another player’s claimed vehicle, but can ride as passenger in other players claimed vehicles.There are 20 missions in total of various kinds. I have not thoroughly play-tested balance, but everything is configurable (see below).
NOTE: Primary Gamemode now uses Safe House crate drops as as well as safe houses, with teleportation/travel being disabled on new mission start (it can be turned back on via missions.lua), but players will spawn/respawn at the safe house if they are enabled. Players can now press the front 2 bumpers (LB & RB) of their gamepad or Q & E keys together, to call in an air drop of upgrades for a $ cost. Crate drops perform the same function as Safe Houses, but may cost more (or less). (All credit to Vechro whose crate drop script I used and adapted, see credits below)
Players will be rewarded weapons/ammo and health/armor at mission completion if they did something during the mission, like kill an enemy, capture an objective, rescue a hostage.
There is also a basic scoreboard showing all players total $ earned for the missions, as well as $ earned per mission, which you bring up with the phone button (DPAD UP on gamepad)… The concept is that $ represents the score and players will need to strategically weigh what they buy vs what they earn. Players who survive and participate in missions will not need the safe house either.
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 LB+DPAD-Right or A + D keys
Everything is pretty much changeable either globally or per mission in missions.lua, so you can remove/change safe houses, change money rewards, change NPC types/weapons, change/remove the Crackdown-esque super buffs, etc… etc… as well as make the gameplay more Arma-esque. It can be made to work as a side mission resource for an RP server say, rather than a game mode in and of itself.
Random Mission Generator and Mission Creation
The missions.lua file is where virtually everything is configured. I have a well documented paste here
detailing how to use the missions.lua to change game mode settings, change random mission generator settings and create your own missions. https://ghostbin.com/paste/j6zrt
Looking at the resource’s missions.lua file will help when looking at that the comments in that paste.
Mission12,Mission17, Mission18, Mission19 and Mission20 all use the resource’s random mission generator where you provide parameters to and it will generate random missions anywhere on the map, or at defined locations you provide it. See paste link above.
There are ‘regular’ missions as well where you can define exactly where each NPC/vehicle goes, where each prop goes, what each NPC’s behavior is etc… for more defined missions, See paste link above. All the other Missions in the resource are of this type.
There is a lot of potential I think in creating your own unique missions, using the random mission generator or not. random mission generator missions where you change parameters
mrp-missions-2.9.8h.zip (180.1 KB)
Like any other resource, put the mrp-missions-2.9.8h folder in the server’s resources folder (you can name the resource to something a lot shorter too). In server.cfg add a line: start mrp-missions-2.9.8h and it should auto-start a mission where the players get taken to the safehouse to start the mission.
Optionally do the same for the mrp-missions_spawn resource, which will give you the blackops/swat skins which the main resource will use. This is not required though.
In the chat you can use “/stop” to stop missions running. “/list” to list all available mission names. Then “/mission ‘MissionName’” to start the mission. NOTE: These commands can be run by any player, so you need to provide your own security/permissions. Again, you can configure the resource to not teleport players to the safe house on mission start, turn crate drops on/off etc… (see paste link above)
Players can create a ballot to cancel the the current mission using “/votefinish”. Players can then vote using /voteyes and /voteno See the bottom of server.lua to configure voting settings, if you run a public server you will need to configure it. (All credit to FAXES for his Vote-to-Kick voting system which I used and adapted, see credits below.)
You can also create a vote to cancel a mission to start a new one.
If you are on mission 12 and want to create a ballot for Mission9, you can type in chat:
‘/votefinish Mission9’ or just use ‘/votefinish’ to create a ballot to cancel the mission.
By default, the server will wait 10 seconds before starting a new mission if the vote passes.
For ESX money support, in client.lua and server.lua set UseESX=true
There is a missions_random.lua in the zip. Swap that in for missions.lua and the resource will play only random mission generator missions if the old regular missions get boring. Which I mostly prefer at the moment.
This is a branch of LanceGood’s Arma III missions resource, and retains his core concepts and code, so full credit to him. [Release] [ALPHA] "Arma III" Styled Missions He influenced me to work on this.
sixsens for extensive playtesting and feedback to get it more stable. He is using it for side missions on his RP server. Many others on this forum and GTA V modding community in general, which I learned from and took code they shared.
Loque for his help and guidance in allowing me to get some of the most important features in.
Vespura for sharing code on how to clean up vehicle generators
FAXES for his resource: [Release] Vote-to-Kick - Vote Players Out! [Fax-Vote2Kick] [1.0] which I used for my voting system.
Vechro for this Crate Drop resource [Release] Crate Drop which I used for my safe house crate drops.
To help with mission creation, the archive contains a resource called plotcoords. It will allow you to use the phone button to save the current player’s location to a file called positions.txt in the ‘plotcoods’ folder. Also, it will record the heading that the camera has as well, which I found easier than the player’s heading. These can be used to create NPC positions, and other positions etc… for the missions.lua file
mrp-utils.zip (3.7 KB)
This was built primarily for my local lan and server, where there is coordination between players and low player count. sixsens has been testing it for side missions on his online 24/7 server and has found it to be stable with larger player numbers. For him there is an issue where NPC blips only will get seen by non-host clients when they are within 300m - 500m of the mission/ NPCs, which is around collision range for the game. For my testing with 2 clients on my LAN, both can see all NPC blips from across the map. The host player (client who spawned the mission), is important. If they disconnect, according to sixsens, migration may not be handled properly all the time, so NPCs can disappear etc…, sometimes NPCs will stop during their assign tasks etc… The resource on the server side endeavors to find the current host and uses them to spawn the missions.
Making the code support migration when a host leaves may help with host disconnects better. There is a voting system in the resource to allow missions to be bypasses and started with a a new host.
Normal pickups can be generated on the ground besides NPC ped weapon drops (which can be disabled) and there can be some sync issues there, and is disabled by default. Use safe houses or turn on the option to give players weapons directly.
There is a mission ‘space time’ between missions, default is 30 seconds, where the server will wait that long before contacting the host player machine to spawn the next mission. Using /stop command etc… during then can cause some errors sometimes, and the resource may need to be restarted for clients, so wait until a mission has started before stopping the mission system, do not do it in the space time. There is probably a lot more jankiness as well, but seems stable enough to share as alpha early/beta.
It may not act nice with other resources not sure, not tested with others so you may need to edit this resource in certain ways, but the missions.lua is very configurable and should help.
vMenu for instance will do a ped replace by default which will cause the player ped to lose its scores and mission stats, so if you are playing for scores, disable vMenu. Saying that, there is a bug for the host when certain NPCs will ‘die’, the host player will be/can be sourced as the cause, due to some script/code running outside of my resource. I have not determed the cause, it seems to be something in the core FiveM code that it doing it
I do not plan to support this resource, since I will not have the time, but I will try and help others when I can. Use at your own risk. You are welcome to edit/change and develop the resource for your own purposes. The code is a little scruffy and needs some tidy up. If you do change it or use it for something else, give credit to LanceGood, like I did, its his own idea which I branched from and developed while I had the time.
Use ‘/votefinish missionname’ or wait for the server to start the next mission, rather than ‘/mission missioname’ if you are not sure who the host is. The most powerful PC should join the server first, to make usre they are the host, in that case using ‘/mission missioname’ is more recommended for the host machine.