[Release] 'Crackdown' Missions System v3 & GitHub for your own missions (OUT OF DATE but still somewhat playable)

mrp-missions (OUT OF DATE but still somewhat playable)

This resource is glitchy with more than 1 player for some missions. Only recommended for playing on a server just to play these missions.

I am not longer supporting this, but after some playtesting added some fixes and tips to for anyone wanting to play. Best for a server that is set up to run this and coordinated players.

WORKAROUND FIXES ADDED in release 3.2.8.8. If you see mission A.I. etc… acting wierd not responding etc… A workaround fix can be enabled globally for all missions or per mission. See ‘IgnoreMissionStarterFix’ at the top of Missions.lua file).

STEPS

NOTE: whether the workaround is enabled or not, following the STEPS below will minimize/remove glitches and should make all 62 missions playable:

1. players should always stick together as much as possible. I added a teleport resource where players can teleport to a waypoint set near another player (wihtin 300m) using right stick down and dpad up simultaneously (or keyboard equivalents) Control Indexes 26 & 27. Controls - Cfx.re Docs

also a /tp command where players can teleport anywhere on the map regardless where any other player is. With both if a player is in a vehicle they will teleport in the vehicle.

Mission resource drops for fast travel can be used too see in-game help and README.TXT.

2. It’s REQUIRED that the first player to join the server use ‘/mission missionname’ (i.e. /mission Mission1). to start a mission (they become the MISSIONSTARTER in the code). The first player to join should also trigger the mission (spawns mission entities). This is when a player comes within a certain amount of distance from the mission blip.

3. If mission and mission A.I. is still janky set IgnoreMissionStarterFix=false, for the mission. and restart the resource and follow 1. and 2. above. This forces the first player '‘host’ to spawn entities on behalf of the other players. (except for indoorsMission=true mission types and mission events which should work fine)

4. Try restarting the server and reconnecting may fix it if that doesnt help (with IgnoreMissionStarterFix either false or true).

5. if you get crashes then try setting game build to1604 on server.

6. The resource will not work with regular onesync. set onesync to off or onesync set to legacy in server.cfg and txadmin. If onesync is set to legacy, copy the server.lua in the root of the repo/zip archive and put it into mrp-missions.v3 directory, backing up server.lua already there. Then at the top of Missions.lua set Config.UsingOneSync = true

NOTE: some missions get started and triggered at the same time just make sure FIRST player is starting it.

NOTE: :The main resource ‘mrp-missions-v3’ requires an non-supported out date manifest for it to work. resource_manifest_version ‘77731fab-63ca-442c-a67b-abc70f28dfa5’. using a newer manifest will break it and cause missions to not work at all.

Other notes: Make sure ‘start baseevents’ is in the server.cfg (as well as one sync set to off or set to legacy in server.cfg and txadmin). Also for this to work properly either comment out or remove ‘ensure basic-gamemode’ (default freeroam gametype) in server.cfg (if vanilla server). Else and also if you are using other gametypes, you will need to change the code and/or manifest in the mrp-missions-v3 resource to behave better with other gametypes.

This resource is OUT OF DATE. One issue with newer clients and servers is for missions that use long range NPC blips. For more than 1 player games, these blips can and probably will turn off until you are within streaming range of the NPC (300+meteres). This can make some of the missions more challenging.

See rest of README.md and README.TXT for installation instructions

What is the resource about?

Overview of what this resource is

A mission system with a default game mode, but everything is configurable, so it can be tailored to your own server, be it RP or any other. Create/edit your own missions as well. Missions can be standard (same everytime you play), random (different every time, like location and enemies), and hybrid/quasi-random, which is a mix of standard and random.

Default Game Mode Description

Basically, players cooperate and/or compete in missions to earn as much money as possible. $ penalties accrue for a player when a player uses a resource from the mission safehouse or dies (rejuvenation fee). Scoreboard shows total money for player and money per mission stats as well. There are 60 missions in total.
Safehouses exist for missions where players get weapons/ammo and super jump, fast run, fast swim and super health which regenerates (hence the name Crackdown), as well as vehicles. This is tailored for the enemies they will need to fight.
When a mission starts a help message in the upper LHS will give you a tutorial on controls etc… for the mission.

Mission types are basically:

Assassinate (kill all enemy targets)
Capture the Objective (self explanatory)
Secure the Objectives (multiple objectives)
Hostage Rescue (secure all hostages)
Defend (stop enemies reaching a zone)
Defend The Target (make sure enemies dont kill a ped target you are defending, they can be on foot or in a vehicle)
Escort the Target (Make sure the target in a vehicle makes it to the objective without being killed. The target may be driving/flying themselves, or a player will drive them)
Rescue the Target (Defend the target and rescue them like you would a hostage)
Race (Players race through checkpoints to the finish line, but enemies spawn at checkpoints and elsewhere on the map to stop players)

Note: hostages can show up in any mission type for extra $

Everytime you use a safehouse or a safehouse resource (see below), there is typically a 2 to 3 minute (depending on mission) delay until you can use the safehouse or a safehouse resource again. Exceptions are safehouse vehicles, mission AI backups, Rejuvenation, Jump to Target Vehicle and Mission Resource Drops. Mission Safehouse delays/timeouts can/do play a crucial role for gameplay, since players can utilize resources for $ (like repair their vehicle) but they may not be able to use another resource until the safehouse is back open.

Safehouse Resources which can cost money:

Safehouse (get all the weapons ammo and upgrades)
Safehouse Vehicles (claim a vehicle which only you can drive, but other players can be passengers. The amount of vehicles you can claim is limited per mission)
Mission Resource Drops (MRDs) (Probably the most important resource, drop an MRD during a mission, so that when you die/get killed and respawn back at the safehouse, you can quickly spawn at the MRD location, on foot or in a vehicle, to quickly get back into the action)

Call Mission Backup. Call in an AI comrade to help fight aside you, like taking a turret etc… One backup per player, no need for safehouse to be open… Backup can be dismissed, and you can select different types of backups to chose from with different weapons, at different safehouse costs. BACKUPS ARE TURNED ON BY DEFAULT, set Config.MissionDoBackup=false in Missions.lua to disnable.
Call in Air Drop (Drops a crate where you get everything a safehoue gives)
RC Bandito Remote Detonate (Call in an RC Bandito rigged with a bomb, which you can drive to enemies, and explode multiple times for around 3-5 seconds. This will cost a safehouse vehicle claim)
Repair Vehicle (Fix a vehicle you are driving or a passenger of or are near, which can be helpful especially in escort missions)
Heal Target (Heal a ped target you are near when defending them)
Jump to Target Vehicle (When in range, the player can jump to the vehicle the ped target they are defending is in [as a driver or passenger]. If driver seat is empty, player will go to that seat, else it will be the first empty turret seat, else it will be another seat. There is no $ cost for this.)
Target Ped Jump to Player Vehicle (The exact same controls as for Jump to Target Vehicle, but for cases when the target ped has fallen out of their vehicle and having trouble getting back in, or the vehicle is destroyed. As long as the player is in a vehicle as driver or passenger, they can grab the target ped they are protecting, if they are within range to get the target ped into their vehicle. When in range, the protected target asset willl jump to the vehicle the player is in [as a driver or passenger]. If a driver seat is empty, the ped target will go to that seat, else it will be the first empty seat. There is no $ cost for this.)
Rejuvenation (The cost it takes to respawn at the safehouse)
Switch seats with Backup AI no cost for this. Controls allows for the player to swap seats with their AI Backup, for instance you may want the backup to swap to a turret seat you are in. Np need for safehouse to be open obviously.

Hi,
The ‘Crackdown’ missions system recently had some major improvements in version 3, which includes:

  • much better AI, especially for defend, escort and transport missions, including randomized missions of these types that are different for each play.
  • more native feeling mission delivery and mission pass/fail events
  • many more options to create your own missions with complexity with simply editing a lua config file. Including linking missions together into multi-stage campaigns/missions
  • Very configurable to change it for servers of any type, RP, etc…, with simply editing a lua config file.
  • Now comes with 60 fleshed out missions of all different types, including 12 from the beta mission pack that take place in DLC areas. These are tailored to be played with the default settings/game mode. Worth playing them that way first to get a feel of what you can do, if you want to create/edit them and the settings for your own server/style.
  • ESX $ support as usual (Look for:
    local UseESX=false
    in client.lua and server.lua
    and set it to true.)

Development has basically finished, for the scope of what I wanted to achieve, so wanted to share with others who would like to use or adapt it for a mission system on their own servers…or to just play the default game mode etc…

To download Grab from GitHub.
Source is on github now:
Official Stable Release:
Read readme and other supporting documents for installation, troubleshooting and configuration. This post also should be read for related help and information.

recommended:

earlier release

Please read the README.md to get started. It also has advice on how to extend the resource in various ways that was out of scope for what I wanted.

ONESYNC SUPPORT:
This resource is meant to be played with onesync off. But onesync legacy mode apparently works OK too, which this is meant for. This resource will probably be unstable in regular onesync. So make sure in server.cfg to turn off onesync (preferable) or set onesync to be in legacy mode.
When using onesync legacy mode use the server.lua file below, instead of the default one in the resource.
Experimental ONESYNC support version below. Download the code from github and copy this server.lua over the old server.lua if you are on onesync legacy. Also when playing with onesync legacy, in missions.lua set Config.UsingOneSync = true

server.lua (37.4 KB)

The orginal thread for the resource when it was in beta is here: https://forum.cfx.re/t/release-fivem-crackdown-game-mode-and-mission-generator-creation-beta/
The first post has a ton of information, photos and videos, and the thread has basically all the archived builds uploaded and a lot of other info. All pertinent info is on Github as well.

You are welcome to use this resource as a reference for your own resource, just give credit to me and also to the people I credit in the fivem forum link above. As usual, I do not ‘officially’ support this, and it comes ‘as is’, its been well tested for bugs, but if any more are found I would consider creating patches.

Here is a short video of some new features that were recently added:

EDIT: Updated Missions.lua in the zip and on github to have Config.MissionShareMoney = true which is advised if you are giving out money for all enemy deaths for missions (rather than just a few targets in the mission), which the resource does by default.
If you are seriously giving money via ESX with this mission system, or taking the game mode $ seriously, and not having mission players share money, 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 whose machine spawned the ped. So a player can be penalized or rewarded, who spawned the ped. So turn off kill penalties too in missions.lua.
When you share money, all players participating in the mission will share whatever was made. Any penalties will be due to safe house equipment costs from losing weapons/upgrades on respawn and any penalty or death the player will get on the server.

EDIT3: 1/12/2020 12:05PM EST More bug fixes and and added a cool new feature for transport, escort and similar missions, also proper help text now.

Mission Reinforcement Drops how to use and what they are:

EDIT4: Added 2 new missions, Mission43 and Mission44 which are helicopter versions of Mission25 and Mission28, which have planes.

EDIT5: Safe house mission peds will have anims and will occasionally talk, all configurable and can be turned on/off.

EDIT6: A few more tweaks and bug fixes, also a new video showing one of the new helicopter missions, Mission43 and showing how to get into the mission vehicle as a turret gunner or regular passenger in escort/transport/defend/rescue missions.

EDIT7: You can now summon and dismiss AI teamates/allies for the mission, as well as select any number of AI types to spawn (default is 4), with various button/key combos (in-game help when a mission is active has the controls info).
Very configurable as well. AI will fight with player and follow them, including getting in vehicles, and picking most useful available seat based on vehicle (configurable). They will not earn money for players though. This is turned off by default. See EDIT11 below.

EDIT8:
New checkpoint racing missions where players race against the clock and against themselves for $ while enemies try to stop them. Also much more improved random mission spawns, enemies down spawn under or over the map and end up mainly on roads anymore.

EDIT9
There can now be 1 to N randomly generated events for any mission, which will add to events already added to the mission.See ExtraRandomEventsType and GenerateExtraRandomEventsNum config vars in missions.lua

EDIT10
upgraded the rcbandito to make it actually worthwhile to use and pay for.
Instead of the one off vehicle explosion pressing LB or E key (default), Pressing and holding or repeatedly pressing the button/key will allow continuous explosions for 5 seconds while the player controls the rcbandito, until it blows up after 5 seconds. Cost to use is 3 times that of a regular vehicle by default, and counts as a safehouse vehicle. Cannot deploy while safehouse is closed as well.

EDIT11
Vehicle repairs are now possible when near a vehicle or inside it at a $ cost when the safehouse is open. This can be very helpful in escort missions whereby the target vehicle can be repaired on the fly, even if the player is not the driver.

EDIT12
Added support for creating your own missions like this

EDIT13
Scoreboard now sorts players by Money per mission or Total Money.

see top of scoreboard.lua

--1 = By Total Money, 2 = Money per Mission
local sortType=2

Some things as well to point out.

  1. The resource supports friendly AI backups (See EDIT 7 above) 1 per player. Unfortunately I was not able to find a good way through relational groups to stop enemy AI from occasionally accidently killing themselves when friendly AI backup is turned on globally or per mission for that mission (MissionDoBackup=true)
    For the best experience its best to play with MissionDoBackup=false (which is now the default), so enemy A.I. are much more challenging and fun to play against. Saying that the friendly backup AI can be fun and great to player with, especially with lower player count.

  2. Also MissionShareMoney = true by default, where players share the mission $ rewards . This was added because the peer that spawned a ped or vehicle will get a kill reward even when the peds kill themselves via crashing or whatever, not making it fair to other players. Causes of death provided by the natives will not cover all cases either, sometimes the ped seems to vanish, which is scored as a kill for the host. Setting this to false will bring up the old $ scoring, where players score for themselves.
    For both, $ losses come from player deaths, or buying vehicles/weapons/upgrades or killing hostages/protect targets etc…

EDIT 14:

For IsDefendTarget missions players can now heal the ped they are defending when within 2m away. This costs $ and can only be done when the safehouse is open, and costs a safehouse turn, whereby they have to wait till it is open again before using this ability again. Similar to vehicle repair.

EDIT 15
Feature for the backup AI. You can swap seats with them now using LB + RB or Q+E key (default). This is great for swapping back and forth with a turret seat, as well as letting the AI drive during combat.

EDIT 16
Due to the amount of sniper ammo, many missions can result in snipe-fests, where players can sit back and snipe. The amount of ammo(s) for sniper rifles given at mission safehouse/mission start and mission completion reward can be limited. Same for RPG, Stinger and Grenade Launcher.
Sniper rifle ammo is now limited which will make many missions a bit harder. rpg and grenade launcher ammo given is now 10 instead of 20.
See SafeHouseSniperExplosiveRoundsGiven in missions.lua to set these values and to see defaults.

EDIT17 start
4 new missions. For a total of 59.
Hostile Ambient Mode has been expanded. Can now be set per mission. 2 new missions use this mode.

--START HOSTILE AMBIENT PEDS

--VALUES: 0: no hostiles, 1: hostiles have less infighting (most dangerous)
--2: a little more infighthing between hostiles.
--3: riot mode, virtually all peds hate each other as well. 
Config.HostileAmbientPeds = 0

Now in Defend Target missions, players in a vehicle within range, can pull the ped they are defending into their vehicle, if the ped is on foot. Uses the same controls which allow a player to auto-board the target ped’s vehicle when within range. (see more below)
Jump to Target Vehicle (When in range, the player can jump to the vehicle the ped target they are defending is in [as a driver or passenger]. If driver seat is empty, player will go to that seat, else it will be the first empty turret seat, else it will be another seat. There is no $ cost for this.)
Target Ped Jump to Player Vehicle (The exact same controls as for Jump to Target Vehicle, but for cases when the target ped has fallen out of their vehicle and having trouble getting back in, or the vehicle is destroyed. As long as the player is in a vehicle as driver or passenger, they can grab the target ped they are protecting, if they are within range to get the target ped into their vehicle. When in range, the protected target asset willl jump to the vehicle the player is in [as a driver or passenger]. If a driver seat is empty, the ped target will go to that seat, else it will be the first empty seat. There is no $ cost for this.)

EDIT17 end

35 Likes

Thank you

1 Like

Havent looked yet, but script looks promicing ! thank you

it is amazing!

1 Like

What is the difference: [RELEASE] FiveM Crackdown game mode and mission generator/creation [BETA]

Glad you like it. :slight_smile:

3.1.2 link on this thread is the most recent, and is what is in GitHub. Decided to announce it is out of beta as well as on github now. The info in the OP on the beta thread still (mostly) applies to this version, since I had maintained that post till this announcement was created.

1 Like

can this be used in normal fx servers?

It should be fine, did you read the readme.md on github?
Im not sure what you mean by “normal fx server”.

Sixsens who helped me QA this has ran it fine on his public RP server. There were some issues, (that he was able to resolve), when he went to OneSync. I mention this in the readme.md. I have tried to develop it, and QA it with public server in mind as well (at least the core functionality), with his help.
readme.md talks about how to extend the resource if the config changes are not enough, but you would need to be comfortable with editing in lua.

EDIT: There are settings in Missions.lua: EnableOptIn and EnableSafeHouseOptIn that will help demarcate mission players who want to play the missions from other players. Readme.md talks more about it too, as well as the other docs.

EDIT2: Merged a couple more changes into github from my local game mode dev branch, that I decided last minute to add. This adds a mission rejuvenation fee that acts as a $ penalty for when a mission player dies during a mission. Its turned on when MissionRejuvenationFee config var is > 0 , turned off by default. Im my game mode players compete for $ earned vs lost due to mission equipment costs and rejuvenation (respawn) costs.

Also a % chance per mission player death, that the mission contact will encourage/harrass the mission player when they respawn, when MissionRejuvenationSMS=true (turned off by default). There is SMS_RejuvenationSubjects and SMS_RejuvenationMessages that will randomly be selected.

Mission Blips have improved icons and titles as well.

virtually all config vars are in Missions.lua

What it looks like:

What the encouragement/harassment sms looks like:

Added some bug fixes and also added a cool new feature for transport, escort and similar missions, also proper help text now.

1 Like

Very good work, a great contribution to the community. I hope to see your work continues…

1 Like

Some more updates that were not too bothersome to add, (one which I wanted to add for some time)

  • Much improved Help Text.
  • Mission Reinforcement Drops (MRDs). This is something the player can drop/toggle anywhere on map where they are. This creates a marker as well as a blip on the map. After the player respawns, they can optionally fast travel to that location (with an optional $ fee). This will allow players get back into the mission quicker. This will support players in vehicles too.

EDIT: bug fixes & enhancements
GitHub updated.

Mission Reinforcement Drops how to use and what they are:

1 Like

Made an update to the readme.md on GitHub re: public servers (vs ‘local’/private servers), which is worth checking out if you want to run this on a public server.

For public servers, You will probably want to spawn mission entities near to the player triggering the mission, so having/setting MissionTriggerRadius < 300. Probably Mission20 & Mission21 (which spawns entities all across the map) and other missions with very large amounts of entities, or spawning entities well away from players, may not be ideal for a public server. I would tone those down if they are causing problems. You can also set IndoorsMission=true for a mission, even if it is outside, which will spawn entities dynamically near players (within IndoorsMissionSpawnRadius, which you can change in Missions.lua)

EDIT: Added 2 new missions, Mission43 and Mission44 which are helicopter versions of Mission25 and Mission28, which have planes.

EDIT2: Safe house mission peds will have anims and will occasionally talk, all configurable and can be turned on/off.

EDIT3: A few more tweaks and bug fixes, also a new video showing one of the new helicopter missions, Mission43 and showing how to get into the mission vehicle as a turret gunner or regular passenger in escort/transport/defend/rescue missions.

1 Like

You can now summon and dismiss AI teamates/allies for the mission, as well as select any number of AI types to spawn (default is 4), with various button/key combos (in-game help when a mission is active has the controls info).
Very configurable as well. AI will fight with player and follow them, including getting in vehicles, and picking most useful available seat based on vehicle (configurable). They will not earn money for players though.

I may release the AI allies as a separate resource to use or build from.

This is the last major feature I wanted to add to this resource , so besides patches for any game breaking bugs, this will be the last update planned. (famous last words :yum:)

2 Likes

I haven’t had time to check out recent updates but the AI backup looks just amazing!

This is such a phenomenal project you’ve built up. Thanks again!

1 Like

how to activate ESX money ?

Look for:
local UseESX=false
in client.lua and server.lua
and set it to true.

1 Like

its work fine very nice work

1 Like

its possible to reactivate de PED police and the wanted level ?

Thanks.

Yes, its possible, remove/comment out this code:

--remove wanted level
Citizen.CreateThread(function()

   for i = 1, 32 do
        Citizen.InvokeNative(0xDC0F817884CDD856, i, false)
    end
    while true do
        Citizen.Wait(0)
        if GetPlayerWantedLevel(PlayerId()) ~= 0 then
            ClearPlayerWantedLevel(PlayerId())
        end
    end
	
end)
1 Like

thank you very much for the quick response
this is very appreciated

I really like your script I am trying to implement it on my server
but I face a problem I explain to you

I use the ESX base so the player position save
when the player this connect your script tries to freeze it
and put it in a safehouse.
but the ESX base use leaves disconnection location of player but
however it is freeze well

so I deactivate this option
Config.TeleportToSafeHouseOnSpawn = false

which fixed my problem but
when the player is on a mission and dies he does not return anymore
in the safehouse he dies and respawn on the battlefield and looses a lot of money xD

do you have a solution or tip to help me with this problem?