Fivem Crackdown gamemode and mission generator/creator [BETA]
NEW THREAD HERE: [Release] 'Crackdown' Missions System v3 & GitHub for your own missions
With the latest builds on github.
Description
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 (and you can configure/create) regular missions, which can be very specific, and randomly generated ones, as well as a hybrid of both. There are different types of missions:
- Capture the Objective(s), where capture points need 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, escort, transport or rescue a friendly NPC target from being eliminated or lose the mission. The NPC will be a yellow blip.
- Hostage Rescue, where friendly NPCs need to be rescued to complete the mission. If any die, the mission fails
- Boss Rush, where all enemy âBossâ NPCs need to be eliminated to complete the mission
- Bounty Hunt, target NPCs or hostages can be spawned all across the map in foot and in vehicles each having a squad of bodyguards protecting them. The target NPCs need to be eliminated to complete the mission. Adding this attribute to a mission will also allow NPC squads to spawn on roofs, (and in the countryside better) rather than being forced onto roads or onto the ground level. Can be used with any mission type.
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. It can be configured as well so players can opt-in or opt-out of missions.
Gameplay videos/footage:
New Features (in latest gitub version in first link above):
New features:
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:
Enemy Paradrops:
Ambient Peds can be made hostile for more challenge:
Test of the new objective/rescue/target marker system:
Players can toggle Night Vision and Thermal Vision easily if enabled for the mission:
Battles on Land, Air and Sea:
Screenshots:
Screenshots
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 )
Hostage rescue
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:
bruiser upgraded:
dominator upgraded:
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:
Ambient Peds can be made hostile for more challenge:
Play in DLC Areas:
Testing the new markers:
Here is an example of the EnableSafehouseOptIn turned on, players will need to go to the safehouse marker and press a button/key to participate. They will remain in the marker to receive supplies/upgrades if they so wish. This is more suited to public and RP servers where players can opt-in/opt-out of participating in missions:
Primary Gamemode
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 press (DPAD LEFT & RB) of their gamepad or Q key & SCROLLWHEEL UP together, to call in an air drop of weapons and 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.
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) (CROUCH/STEALTH + BEHIND VIEW) to toggle
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
Completely Configurable
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 commented guide here
detailing how to use the missions.lua to change game mode settings, change random mission generator settings and create your own missions. FiveM Crackdown Missions Config guide - Pastebin.com
See also Config_Guide.lua.txt which is a copy of the guide inside the resource
Looking at the resourceâs missions.lua file will help when looking at that the comments in that guide.
Also see here for a review of the features of list of default example missions to create your own: [RELEASE] FiveM Crackdown game mode and mission generator/creation [BETA] - #283 by ddraigcymraeg
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
Installation/Usage
Download:
mrp-missions-3.1.2.zip (326.2 KB)
Like any other resource, put the mrp-missions-v3 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-v3 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.
âmissions.luaâ has 20 example missions of various types.
âmissions_random.luaâ has 3 randomly generated missions that can be used as is. Re-name to missions.lua to use.
âshadowstate-missionpack.zipâ has everything needed to play a properly developed campaign of 12 missions. Its a mission pack called âShadow Stateâ and uses various DLC content (included in the zip file).
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 prefer the most at the moment, since replaying regular missions over and over can get boring.
Additionally, To increase difficulty for missions (for more players or more challenge) consider increasing SetPedMinAccuracy/SetPedMaxAccuracy first in missions.lua from 60 (default) to around 100 max
Other resources
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)
Known Issues
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
Also:
[The below issue has a workaround where the resource now shares mission money with all players or mission participants by default, which can be turned off, if so, follow this:]
If you are seriously giving money via ESX with this mission system, only consider giving money rewards for hostage rescues, objectives and limited targets in assassinate missions for now. There is a bug which I am not 100% sure yet is fixable, where code running somewhere on the client (looks to be outside my resource) can cause mission peds to âdieâ and the cause can be attributed to the player. So a player can be penalized or rewarded, who spawned the ped. So turn off kill penalties too in missions.lua. Here are the details:
Any help would be appreciated. I may need to take another look at the cause. The final problem worth mentioning, is for randomly generated missions, sometimes all the spawn checking will not work, like 1 in a 1000 it will not, so a ped may spawn somewhere inaccessible. So Assassinate missions may not be completeable once a great while for instance, so a vote or otherwise will be need to bypass the mission. I may revisit this to see if it is fixable, as it is possible it is due to âholesâ in the map, in which case it may not be.
Here are some tips on changing the resource so that enemy mission NPCs will only attack players involved in the missions, not all players they see:
Here are some tips on changing the resource so that only players playing as policemen can take missions:
Tips
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.
Support
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 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, as well as to myself.
Credits
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 - #337 by ddraigcymraeg 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.
VenomXL For his SMS wrapper: XNL-FiveM-Trains-U3/XNL-FiveM-Trains-U3/client.lua at master ¡ VenomXNL/XNL-FiveM-Trains-U3 ¡ GitHub
illusivee for this Scaleform Wrapper: Scaleform Wrapper - Use scaleforms neater and simpler!