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

Outstanding!! Love the looks of that office scenario.

1 Like

Thanks man!

I took another stab at paradrops, and had much more success this time, also thanks to the ‘Melee Riot’ asi mod where the author shared his code. Thats a GREAT resource for some interesting AI functions.
Also credit to vehcro and his crate drop resource, where I am re-using some of that code, as well as my own of course.

You can add multiple ‘paradrop’ mission points anywhere on the map for a mission, and if a player is within the defined radius of the paradrop point (100m default), it will kick off a paradrop attack one time for that position for the mission.

I’m watching the other test player kick off the attack. This will be in the next update as well.

Oh, nice paradrop!

You’re right that mod has interesting stuff. I should look for more open source things at GTA5-Mods.

1 Like

yeah, that mod was a mutation from 2 previous mods and authors over the years.

HUGE update and improvements. I should be calling this release 3.x beta, but its just a label with this project, so I’m calling it 2.9.8u :stuck_out_tongue:
mrp-missions-2.9.8u.zip (278.9 KB)

-3 new mission types: ObjectiveRescue (multiple objective missions), Hostage Rescue, and Boss Rush. Hostage rescue is where you need to rescue all hostages to complete the missions, if a hostage dies, the mission is failed. Boss Rush is like Assassination, except only “Boss” peds are the targets, this mode is more for random mission generator missions. Objective Rescue sort of takes over from Objective missions, in that it support multiple objectives to finish the mission instead of one main objective.
-Paradrops are working now, added as part of the new Events. Credit to vehcro, whose crate drop code I based it off of, and some of alphazolam’s Melee Riot asi mod (itself based on 2 previous mods)
-‘Events’, these are triggers you add to missions with a radius added to them whereby any player coming into the area will trigger the event. 5 types of events: Paradrop (multiple enemy peds), Squad (multiple enemy peds), Vehicle, Aircraft and Boat. Very configurable, and you can very quickly build large missions with them, with randomized (or not) content. This allows for missions that can be randomized as well as having specific peds and vehicles etc… It also solves the problem I had with aircraft all attacking at the beginning of missions.
-‘Ped Accuracy Settings’ Finally, min/max ped accuracy settings are added in missions.lua to make missions more/less challenging
-‘Better Mission Markers’, objectives, hostage sand enemy targets have markers now to visually help players. Can all be turned off/on. Hostage Rescue and Objective Rescue missions both have counters on the HUD as well showing how many objectives/hostages left.
-‘Hostage Rescue Improvements’- Rescuing hostages now takes 5 seconds similar to objectives.
-‘Objective $ reward for all mission types’ Just like you can add hostages and targets to any other type of mission for extra side $ rewards, you can add objectives (via Props) for extra side $ as well, using isObjective=true attribute
-‘Support for unlimited mission blips’ --Use ‘Blips’ instead see mission 7 of SHADOW STATE mission pack
-‘SHADOW STATE Mission Pack Update’, All missions updated and improved with more enemies and Events and using the ObectiveRescue mission type, with missions having multiple objectives and multiple locations across San Andreas . 2 whole new missions added, for a total of 7 missions.
-‘Many other bug fixes and enhancements’ Spent a lot of time testing and fixing older and newer features. For instance, “Boss” peds can be given certain weapons in regular missions now, rather than using the just minigun, or ray minigun/railgun for juggernaut

Besides that, the default earlier missions.lua missions have had some face lifts using the new Events and mission type features. Mission1 for instance has a paradrop Event, mission2 has a Squad event and now is a HostageRescue mission. Mission 6 is an ObjectiveRescue mission now with 3 objectives, as well as multiple Events added, making it much more challenging etc…

Another new feature is that random missions (12,17,19) in the missions.lua file as well as all missions in the missions_random.lua will by default (via IsRandomEvent=true) have a chance to spawn a random Event of either paradrop, vehicle, aircraft or squad when players get close enough.

If you are using this resource on an RP server say, and ‘seriously’ want to make sure that the money via ESX support is calculated correctly, follow the default settings I set in the missions.lua for cash rewards. Rewards should only be given for objectives and hostages. Money for kills should only be given for enemy targets, where only a few of them exist (or are made targets in the config), and make the other mass of enemies regular enemies (henchmen) with 0 cash reward. Also hostage kill penalties should be set to 0. The reason is, there is a problem somewhere, which seems to be outside of my resource whereby peds can “die” w.o. any player interaction and the player on the client that spawned them can be (unjustly) the source of death. I will probably revisit this in the future to see what is really causing it, to see if I can fix it.

This is at a point where I am not going to add any more features or enhancements, but will spend some time improving/adding some proper documentation to help others who may want to utilize this resource. For now there is a well commented psuedo config file at the link below with virtually all the settings available and how to use them, that should be cross referenced with the main missions.lua files in the resource: https://ghostbin.com/paste/85hza

Paradrops. Watching another player trigger the attack Event:

New markers testing, during multiple objective test ‘mission’ highlighting objectives, hostage rescue and enemy target vs henchman:

1 Like

as per usual, missed some settings, so this is a minor update of the last release to 2.9.8v:
mrp-missions-2.9.8v.zip (277.3 KB)

removes some extraneous weather code in client.lua,
for SHADOW STATE mission pack: ‘fixes’ mission 4, and turns on teleport to safehouse on mission start as well.

1 Like

it ‘fixes’ mission 4 by making it an “ObjectiveRescue” mission instead of “Objective” mission (so all objectives are required in order to complete)

another patch update for the major 2.9.8u release:
mrp-missions-2.9.8w.zip (279.3 KB)

This fixes errors in the PutPedsIntoTurrets function due to a typo.
Random missions in the default missions.lua file (12, 17, & 19) were fixed, along with the missions in missions_random.lua:
Random missions only use ‘Type’ as a placeholder, you need to set ‘RandomMissionTypes’ for them to actually set the mission type. You can have Objective and Assassinate missions added to this array to randomize the mission, but HostageRescue and BossRush should be on their own in the ‘RandomMissionTypes’ array for a mission.
Other fixes for Events to (i) make sure all “Boss” peds spawned for BossRush are targets, and (ii) all peds spawned for random Assassinate missions are spawned as targets.

Looks like a big update. This has really become a major release with incredible potential for others to expand or customize. Very inpressive.

Just a quick quesiton: in the config file for some missions, there are commented lines adding extra peds. Are these somewhat tested/working and there to add difficulty if a server admin chooses to enablle them?

1 Like

Loved it and also our members … I tried it and works perfectly … thank you …

I will try the new update later … :slight_smile:

1 Like

Glad you are enjoying it! :smiley:
Thanks for the feedback, that it is working well as well.

@Loque: Most of the time, no, I think these were just copy pastes when creating new missions, which I need to tidy up. So uncommenting the bulk lua comments may have those peds spawn elsewhere.

But sometimes yes. I believe you may need to make sure the id & id2 increments by 1 for each line in these cases when re-adding them. Like for mission2 in the mission pack I had to comment out some lines near the end for the Peds, since the shear amount of peds that can be in one area can cause a client to crash. There is a limit with fivem/gtao with how many npcs can be on one client it seems, so it will try to cull ambient peds first, if it isnt able to do that due to too many mission/spawned peds, it may crash. Saying that, in my recent testing with the mission pack mission2, I was running through the mission not killing anyone, so I think that may of caused it. I did more testing and it worked fine when I played normally and killed peds on the way. Also with other clients spawning peds as well in a true MP manner, it may be fine actually to increase the amount of peds in that mission. I just wanted to be conservative.

Events are really the way to go now when creating missions, so you do not need to add a ton of Peds individually one by one. You can mix and match that style with Events, where you can also set an event at one coordinate to spawn say 30 peds in a radius of 100m and it will do groundz checking etc… to spawn them properly in that area, its a lot quicker and can also add more randomness/re-playable for missions too, so you can have a hybrid of the regular/specific missions along with some randomization everytime you re-play the mission.

1 Like

I have 1 small problem … is there any chance can be as an event in RP server … I know it is a mission and I have to run it but I can /stop and and remove the start mission from server.cfg … but the problem is the player who was in mission the still have all kinda of weapons and gear and I have to rest all their loud out via DB … well any idea for that since I’m running it on RP server as I said and I make the mission as an Event so they enjoying their time :slight_smile:

everyone should store their weapons in cars or bag… and then remove all weapons from the players after the event

initially no weapons. And there’s no gun shop. I did not understand. Can you help me? which files should I run ?

@Dr_RuthLess111 @Heady20006
You can configure missions.lua to not give reward weapons or upgrades after completing the mission. also, In the ‘DONE’ event you could add code to remove all weapons the local player has and set playerUpgraded=false and remove the player speed buffs as well if you are using Crackdown mode. But this would happen for all players including players not interested in the mission, unless you somehow determine who is in the mission and who is not.

@Black_Eagles
There should be a green house icon that is the safehouse, you go there to get your weapons and upgrades. In missions.lua you can turn safehouses off/on or you can choose to just give weapons to the player at mission start. Its all configurable. You can also create pickups that spawn at locations. If you look at the description in the first post, by default: Players can press the front 2 bumpers (LB & RB) of their gamepad or Q & E keys together, to call in an air drop of weapons and upgrades for a $ cost.

2 Likes

This might be a good time as well to tidy up the code and add it to a repo so people can branch and share esx versions etc or enhancements. I had someone ask me how to tie this in with esx extended jobs, but the only esx suport this is has is with the money. I think something that allows players somehow to opt in/out of missions would be cool, but this would probably require a little work to add conditionals in certain functions/events.
Places to add code to filter players not included in the mission would be MissionBlips event, SpawnPedBlips, calcMissionStats, SecureObj and BuyObj to start off with.

thank you bro.

1 Like

RE: to allow players to opt in/out of missions.

A quick and easier way to get this to work w.o changing a ton of code, might be to set a couple of decor values on the players. Have a loop thread running that checks if a player has an opt-in value set, which gets set when they do a key/gamepad combo. If they do not have it set, the loop sets an opt out decor value, but soon as they have the opt in set, it removes the opt out decor value.
There can be a message on the HUD as well in the loop when they have opt out set saying they are not in the mission and to press key/gamepad combo to join.

That way the opt out player will see some things mission wise, and fewer functions, like calcmissionstats and SecureObj can have code to check for player opt out, which means they will not be able to make any money, but can see things show up in the map/radar. BuyObj, and also the supplies paradrop script, rcbandito deploy and safehouse vehicle check code should also have it as well to stop opt out players.

You could take it further too and add the opt out check to remove global mission messages also in mt:missiontext2 client event, and also in the mission HUD thread to remove the mission display.
If you have teleport to safehouse turned on, you would need to do a check in doTeleportToSafeHouse for opt out players.

When players choose to opt in via the key/gamepad combo you would need to do something exactly like the bottom of the playerspawned event and trigger the sv:checkmission event handler on the server, which would start the mission for them where it currently is at.

To remove all radar map blips, the opt out check should be added to MissionBlips and SpawnPedBlips.
Finally to stop any end of mission notifications and other notifications showing, the opt out check should be added to parts of the DONE event and mt:UpdateEvents event. That should be close to dissociating opt out players from seeing anything related to the ongoing mission, unless they physically chance upon a massive shootout with tanks and planes :rofl:. Of course the opt-in message will on their HUD to let them know. But it might be good to have opt-out players see mission blips etc… so they know what event is going on and where to avoid.

Conversely, to opt out after opting in, they could do the same key/gamepad combo or another one to flip the values back.

I added a test version of the 2.9.8w build that allows players to opt in or out of a mission dynamically. Im not going to support this “officially”, but it may work fine for you. If it works or doesnt, please let me know, if it is stable I will add it to the main build.

mrp-missions-2.9.8w_Opt-In_test.zip (280.4 KB)

Players press ’ Q ’ + ’ ] ’ keys or RB + DPAD UP to join a mission, and to leave a mission they press ’ Q ’ + ’ [ ’ keys or RB + DPAD DOWN.

It behaves (or should) pretty much exactly how I described in my previous post, and is coded the same way.
There are 2 decor values used as toggles which are applied to the player altenatively:
DecorRegister(“mrpoptin”,1)
DecorRegister(“mrpoptout”,1)

Once a player has opted in for a mission, but leaves, they will still see enemy and mission blips for the remainder of the mission, but everything else should disappear. Marker for the safehouse will be there as well for them but not functional. Everytime a new mission starts, opted out players will (or should) see the following notification:

but nothing else should show for them. The first joining player will always start a mission and see everything, unless that setting is turned off, or they leave the mission.
The stable build this is built off is here:
mrp-missions-2.9.8w.zip (279.3 KB)

1 Like

I really love this modification I would like to add it to my roleplay server, could you tell me what I could do so that when I entered the server I did not get directly into the mission and that it could start at a cost at some point? I give a thousand thanks in advance and also for creating this kind of incredible missions @ddraigcymraeg

1 Like