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

I look forward to more releases from you, thanks for sharing it.

1 Like

Great job buddy. Really awesome resource. I got one slight issue.

I have set Config.StartMissionsOnSpawn to false in missions.lua file. However it still spawns a mission as soon as you join. How can I disable this?

Edit: one other thing I forgot to mention is that when a mission also starts, the player is not able to walk around. he is stuck in his place. Any idea how to resolve this too?

Many thanks

@Sir_Smog1:
This sounds like esx base is conflicting with what this resource is trying to do.
My first suggestion is to turn that feature off in base esx, if possible, if not, then
What you can try is

In the doTeleportToSafeHouse function, maybe use the setinvicincible native (cant remember the full name) to make the ped and any vehicle invincible, then when they have teleported, turn invincibility off with the the native (when they get to the safehouse), together with increasing the time to teleport from 2 seconds to a big enough value to teleport them to the safe house after esx base has moved them to previous position, whereby they will be invincible until they get to the safe house. This workaround should work.

Also in the function doTeleportToSafeHouse in client.lua
The lines where FreezeEntityPosition is called, one sets it to true. Then 3 seconds later after teleport, it is called again to unfreeze.
You can try removing FreezeEntityPosition OR better yet, calling it twice right after each other, first to freeze and then unfreeze (which should stop momentum) before teleport, then 3 seconds later, after teleport, to call it again to freeze and then unfreeze, to stop any fall momentum if in air after 3 seconds. In case you are getting funkiness still with esx base.

@Kosar: Thank you. Please see my answer to Sir_Smog1

2 Likes

I will try the suggested solutions. How about the problem with mission starting automatically straight after spawning? as I mentioned earlier, I have set Config.StartMissionsOnSpawn to false in missions.lua file but the problem still persists.

In Server.lua, set the below value to a large value. Note, this will increase the time for the server to start the next mission as well, once one mission is over.


--This is in minutes. How long to wait, when there are players online 
--for the server to find the host and trigger a new mission
local ExtraTimeToWaitToStartNextMission = 2
1 Like

fyi…StartMissionsOnSpawn was created before code was added to the server to automatically start missions after ExtraTimeToWaitToStartNextMission minutes. So the later is superseding the former. The server is counting down once it starts to start a mission, and when the first player joins even thoughStartMissionsOnSpawn is false, the server is ready to start a mission after 2 minutes (the default)

1 Like

I believe this resource would make alot more sense if it was opt in by default. Currently it seems to need alot of modifications just to adapt it for that purpose. Some of those suggested fixes will also alter some other functionalities of the script. It would help greatly if you could sort those fixes :slight_smile:

1 Like

Hi Kosar, thanks for the feedback.

This resource mutated (greatly) over time , and was developed as a military/combat game mode, rather than purely for a public server (rp/free roam), but with support for it, so yeah I understand.

Saying that though, setting optin to true should demarcate mission players from non-mission players well enough. I take it that you read the readme.md (you mentioned suggested fixes), and how to use the mrpoptin/mroptout decor checks to implement more demarcation, but that will require code changes to tweak it obviously. I play as a competitive/co-op game mode, so its sort of out of scope for me, but if I ever get the motivation to do it in the future, I will. To be honest, it would be cool if someone did a re-write or something similar from the ground up for public servers and using even more native gtao mission functionality.

1 Like

I hope either yourself or someone else make those modifications so it can align with the general RP servers’s purposes :slight_smile:

How do i change enemy squad weapons?

The squads spawned like for bounty hunt missions will use the random mission weapons that the main npcs spawn will use.

1 Like

Hello! Great work! I am wanting to modify your scripts to a two team variation. Say cops and criminals, for example. I am still new to all this I am sorry, but should I just run two versions of this script, one for cops, and one for criminals, then just add a job check (I am using ESX) to certain server/client scripts? Or could I use one script and create teams essentially?

1 Like

It would be more Ideal if I could get two teams on one script so they could compete against each other to complete the mission. But for example, could I get a player of the cop team to defend an objective while a player from the criminal team attacks it?

You would need to play about with the relationship groups and have 2 new groups instead of PLAYER, for each group to start with. You would then need to make alterations checking for relationship group in the code for objectives etc… to determine cops from robbers and probably any money payouts etc… That should get you started…It was not designed for PVP, so ou will definitely need to make changes for it.

2 Likes

Thanks for the help! <3

1 Like

Hello @ddraigcymraeg, your work is really awesome, its very fun to have this resource on our server. Thanks to you.
How ever i have some question

  1. Some mission that require underground area, missing teleport marker, such as on mision 35, we go to bunker exact location on red start marker but couldnt find any openable door or teleport marker
  2. do we need specific ipls loader such as bob’s to?

many thanks, keep up the good work

1 Like

use the fivem-ipl and doombunkers resources in the shadowstate-missionpack.zip here: https://github.com/ddraigcymraeg/mrp-missions

1 Like

many thanks, just realized that you have already write the instruction in readme.md, my bad :sweat_smile:

i have searched and cant seem to get it to NOT start a mission when you first load in the server (very first person to join) and its causing them to get stuck and have to teleport to a new spot (like literally right in front of them by like 2 feet) and then they can walk normal and do stuff…any idea?

No sure why the player is getting stuck? Stuck where? You may be running a resource I am not running. I would look into why that is happening, since I have not encountered that myself. I would look into that.

Saying that…

Yeah, the server is is using ExtraTimeToWaitToStartNextMission in server.lua which is 2 minutes by default. You can make this a larger value, like 5 minutes or more, but it will still count down even if no players on the server. So if the server is up for 5 minutes, and a player joins then it will launch a mission. If you set this to a large value, it will also affect other missions. So this may not work…

If you look at line 406 in server lua onwards below:

		if (not ActiveMission and not blInSpaceTime and ((tick) >= TimeLeft)) and doPlayersExist() then
				
				Wait(10000)
				
				if not ActiveMission then 
					print("Server Start Mission")
					TriggerClientEvent("mt:checkIfIAmHost", -1)
				end
		end

Try changing it to:

		if (not ActiveMission and not blInSpaceTime and ((tick) >= TimeLeft)) and doPlayersExist() then
				local onlinePlayers = GetNumPlayerIndices() 
                if onlinePlayers > 1 then 
				    Wait(10000)
                elseif onlinePlayers == 1 then 
                    Wait(60000) --first or 1 player wait 1 minute or whatever you want to change it to
                end
				
				if not ActiveMission then 
					print("Server Start Mission")
					TriggerClientEvent("mt:checkIfIAmHost", -1)
				end
		end

This will put in an extra delay of 1 minute (rather than 10 seconds) when first player joins… see if that workaround helps

1 Like