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

Hey!

Ive got two Problems.

First. When somebody spawns or the server restarts: all mission gets activated an the last one stays active. I want No mission started as default.

second Problem: I want that missions can only be started from Markers around the map (like streetraces; walk in an press E eor smth)

Thanks for your help!

There is a variable in server.lua called TimeTillNextMission or something, set that to a bigger number.
This will stop server launching mission when first player logs in.

For the other question, use MissionTriggerRadius setting with a mission. That will set ra adius around an '‘M’ icon on the map where player needs to be within to start the mission. Race missions use markers, but not regular missions. You would need add Marker support yourself.

@VXF-t0et0e
Hopefully you sorted this out by now. Bandito can be disabled via Missions.lua
You need to go into client.lua for bindings. FiveM have a page for control bindings you can use to change.
You will need to find and replace or delete the bottom text pops, in client.lua

Hello, im still kind of new to making a server and Im working on a little project for my friends and I. I have tested the mod for a while and it seems to work just fine and I really like it so far, but I cant get money for a completed mission. (It substracts a sum when equipping things tho) The error I get says the following: “SCRIPT ERROR: @mrp-missions-v3/client.lua21302: attempt to concatenate a nil value (global ‘MISSIONSHAREMONEYAMOUNT’)”

Hey! Quick question: is the safehouse a mandatory part of the mission system? I’m trying to create a server that implements a mission system simarly to an RPG, where you approach a ped and trigger a mission to start which provides rewards upon completion. Would this system be able to serve that purpose?

Safehouses are not mandatory you can turn them off, and auto-give weapons to players when the mission starts, or drop pickups are certain locations. It’s in the config lua guide… You can use MissionTriggerRadius at the ped’s location to spawn a mission.

Have you changed any code in client.lua? If so does vanilla resource work OK?
It should.
If you are still having problems with vanilla…
The code just above the offending line you could try changing to a longer delay from 1000 to 5000 and see if that fixes it… i.e: GetGameTimer() - starttime >= 5000
If not, try removing this section:
if GetGameTimer() - starttime >= 1000 then
–print(“break”)
break
end

		if string.len(MISSIONSHOWTEXT) > 0 and MISSIONSHOWTEXT ~="WASTED" then
				
					local starttime= GetGameTimer()
					while not MISSIONSHAREMONEYAMOUNT do
						Wait(1)
						
						if GetGameTimer() - starttime >= 1000 then
							--print("break")
							break
						end
						
					end
					--MISSIONSHOWMESSAGE = MISSIONSHOWMESSAGE .. MISSIONSHAREMONEYAMOUNT	
					--MISSIONSHAREMONEYAMOUNT=nil
					Wait(1000)
					MISSIONSHOWMESSAGE = MISSIONSHOWMESSAGE .. MISSIONSHAREMONEYAMOUNT
					MISSIONSHAREMONEYAMOUNT=nil

If you dont care about players sharing mission money you can set MissionShareMoney = false in missions.lua. I recommend having it shared though on a lot of missions where kills have rewards, due to some flakiness on the host machine.

also, this is the main thread now, this one is outdated: [Release] 'Crackdown' Missions System v3 & GitHub for your own missions

Hello! I tried both of your options. The higher wait value doesnt change a thing, and with the deleted part of the code the error vanishes but nobody still gets money. I just would like it to count the money as a leaderboard of some sort, not to buy stuff. Are there other modifications I might be lacking that I need for that?

For future responses I will then go over to the updated thread.

Edit: It worked with disabling Shared Money, it now also counts earned amounts. I just cant seem to find a scoreboard. Pushing the mouse wheel in just displays “Name” “Mission Count” “Total Money earned” “Money per session” in a font that looks like Times New Roman ':smiley:

Its OK, since we are in this thread, we can stay here on this topic, since it will be easier.

First off, are you grabbing everything from: GitHub - ddraigcymraeg/mrp-missions: Crackdown Mission Resource for FiveM ?

So this is happening for you in the vanilla resource without any edits from you?
Could you see if it happens with this one below? Even though it says 2.9.9i it is the latest code that should be in the github repo. Let me know if the scoreboard is fixed as well. I dont have that issue either. I would also disable all other custom resources to test. Also disable OneSync if you are using it. I have a OneSync server.lua file near the bottom of the other thread that supports OneSync or should.

mrp-missions-2.9.9i.zip (1.7 MB)

How can you disable the Super Abilities when at safehouse? We just want to disable the super jump, super run, and super swim. Thx in advance

look for crackdownmode in missions.lua and turn it to false.

@ChanaskiChess you do realize there is a new version v3 on Github?

Let the comments I annotated right below the command do the talking…

ensure mrp-missions-v3
##Seriously, who thought it was a good idea to make the missions ten times HARDER then The Doomsday Scenario Act III Finale? This ragtag group of Ammu-nation workers, N. Yankton Triads, Cliffford Juggernauts, Russian Operatives, and… Lost MC Bikers… makes Cliffford look like a joke.
##Umm… the Aircraft, Tanks, and APCs don’t show as those respective icons, which makes preparing for them impossible, especially when they peg you from a mile away somehow. And when you take them down, you don’t take the people inside down with it, and apparently neither the guns on the aircraft’s corpse. And when the aircraft corpse despawns: congratulations, you softlocked the addon.
##Snipers and miniguns. Every enemy seems to have either. Miniguns will shred you from sniper rifle distances, and the snipers give Sinon a run for her money. Even SHE fears them, mainly how they outnumber her 10 to 1.
##Railguns?!? There’s a reason Rockstar Games doesn’t give the NPCs Railguns, much less than to a Juggernaut with aimbot.
##Up-N-Atomizers? Rockstar keeps these out of the hands of NPCs like how they do the Stun Gun, and probably for a good reason.

And when the aircraft corpse despawns: congratulations, you softlocked the addon.”
Never noticed or had that before, even after many hours of playtesting and gameplay. Could you give me an example.

As far as your other comments, out of the box , this resource and missions are NOT intended to be played exactly like regular GTAO missions (this is why its default game mode is called Crackdown). Hence the (optional but necessary) player buffs like higher heath, super jump and super swim/run, health regen etc… and the weapon loadout you get is more than enough to take on missions, even with 1 player if you play enough. The Crackdown game mode gameplay has been balanced this way, and the players need to discern if it is worth holding back (to regen or snipe ) and play defensively or going right in at any moment. This is meant to be a NEW experience, not a recreation of GTAO.

Its deliberately meant to be something different, than what you expected (sounds like). For example the Lost MC models added to the mission are merely mercenaries in the missions, there is no lore there with them as they fight with other mercenary looking models. All this is deliberately VERY customizable to make the resource more like normal GTA missions and even R.P. missions…Its been used and tested for this as well, which is really where the power of the resource comes from, its customizability.

railguns can be a pain in the ass now doubt, but only spawn on juggernauts, which are considered “Boss” level. Same with Up-N-Atomizers only spawn with Aliens (essentially “Boss” level as well), virtually always. Its hard to get back up if it is just you against an enemy blasting you with one until you are dead, this is more a problem with the railgun since it can shoot at range.

EDIT: Yeah, you are expecting something exactly like GTAO, which this is not meant to be with the default game mode. Its a similar but overall different playstyle, GTA mixed with Crackdown game and HALO. As far as miniguns hitting you from sniper rifle ranges, that is impossible. Each gun has a native range in GTA5, and the minigun does not have the range of a sniper rifle.
As far as plane icons etc… doesnt make sense since the blips are there to show where peds are, as well as giving vertical Z information. In assassination missions target ped blips need to be seen, which when in a vehicle would typically overwrite the vehicle icon anyway. Its very easy to distinguish between planes, helis, vehicles and walking peds just based on how they move. Also the player gets stacked with all kinds of weapons, to deal with them.

With the despawning plane yeah like I said let me know how that happens, since any mission vehicle is set as one, and will only despawn at the end of the mission, where it is carefully removed.
Also feel free to edit and use the resource for your liking, thats why it is on github :+1:

That red arrow is a Bombushka. The crew is still alive and in the Bombushka, which somehow is both despawned and still there at the same time (but still has the guns in a usable state). It happens to all aircraft that is indicated by a purple dot(s), and unless you know where the NPC is seated in the aircraft and if the seat is even in a position where you can peg the ped in the aircraft with a bullet, you’re not killing the ped and therefore softlocking the addon. It doesn’t happen to those indicated by red dots. I’m not even sure how this is even possible to pull off.

Ok cheers.
Odd, Have not seen this before. And yes, its very odd that it is only happening to vehicles with purple peds, since they spawn exactly the same as red peds, except with an extra decor value added to them.
So the plane is invisible? (I have seen peds and vehicles go invisible from time to time, which is glitching in GTAO netcode) But this sounds like something different.
What mission is this? This “despawning” happens for all missions and all vehicles that have purple dot peds in them, or just in planes? That bombushka spawned there, or crashed there?
Are these planes/helis spawning in the sky correctly?

Are you on OneSync? That might be it, very doubtful but worth a try. There is a test server.lua for OneSync you can try… or try with OneSync turned off. Its possible that it might be the server or client version acting up with the specific calls in the lua, very doubtful though, since purple and red peds spawn the same.

re: peds not taking environmental damage, like from plane crash, that was added for more difficulty to stop AI spamming each other with explosive damage. IIRC, using relationship group natives were not adequate for this. Thought there was a setting to turn this off or on,
2 Options to change this… add mission AI backup…
Config.MissionDoBackup=true in missions.lua
or in client.lua replace every instance of
SetEntityOnlyDamagedByPlayer with ‘false’ as the 2nd argument.

Yeah This will probably not make a difference in this case but removing all other custom resources to see if it still happens or not it’s always worth a try to see if there’s a conflicting resource.

Also looked through the client.lua code, and if it is only happening to all aircraft with targetted (purple) peds in them., the only other difference I see is that there are markers created on top of these peds by default. iirc, the marker(s) will be transferred to the vehicle they are in (which fivem/gtao natively does it seems, which was cool but kinda of odd to me, due to the way Im generating the markers dnamically based on position of the peds).
Im wondering if the code to generate the markers on the fly is causing this funkiness.

@mmethod
Go into Missions.lua and set Config.DrawTargetMarker = false and see if that helps, if not set all the below to false and see if that fixes it.

Config.DrawText3D = true

Config.DrawTargetMarker = true

Config.DrawRescueMarker = true

Config.DrawIsDefendTargetMarker = true

Config.DrawObjectiveRescueMarker = true

Config.DrawObjectiveMarker = true

Config.DrawIsDefendMarker = true

Also are there any server errors or clients errors associated with this behavior?
Let me v know how you get on. :+1:

EDIT: Also this was the wrong thread to post in. Here is the current thread with the link to the GitHub repo with the latest code:

@mmethod I had some time to playtest in MP, and tried Mission3 which has all purple dots (peds to target). random helicopter spawn and 2 plane spawns. Took out all the aircraft, but enemies died. both players could see aircraft as well as the wreckage afterwards. This is a bit different than what you said, since there are times when the aircraft will crash suffer damage and not explode. With enemies in the seats still. Which sounds like what you are referring to. This happens occasionally, but I dont recall seeing the plane (and peds?) invisible in MP in this situation. Its certainly possible, for instance players at a certain range away can possibly cause this “despawning”, the engine does a lot of optimizing and some glitchy things can happen. But again this doesnt sound like what you are seeing.
Also, I have seen a lot of different behaviors depending on what other resources are on the server, how many players (bandwidth) are on the server, as well as what manifest is being used with a resource. What works on a local tester server with 2 players, may behave differently sometimes on other servers, due to server/engine optimizations required, as I mentioned before.
Just puzzled why you are seeing this, and presumably not in just one mission. Anyways, if you have anymore specific info to add regarding this (like what mission and how to reproduce), let me know. My workarounds should help that I provided (at least to allow the peds to be killed). Will keep an eye out for this reported issue, now that I have some time to play over the holidays.

Hello I have a question about SetPedCombatAttributes what do flags 16 and 26 do? thanks in advance for your answer

Hi,
Great question. I cant remember, took a poke at the code and quick online search, but I didnt see any definitions for them, so I dont remember why/what they do off the top of my head, or where I got the infotmation, has to be somewhere.

Main thread is here:

Have a new release 3.2.7, that has some better documentation and a change to Mission60.