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

Updated to 2.9.6r

mrp-missions-2.9.6r.zip (144.9 KB)

–fixed a bug where the ped in vehicle bonus kill amount was not getting applied all the time.
–Mission17 can now spawn boat/water missions
–micro-smg added to players by default as well when they use the safe house.

Really happy that NPCs are shooting from vehicles finally. Boat missions are more exciting now, since NPCs will fight back, rather than just give the middle finger. I removed the land battle only restriction on Mission17, so you can potentially have water/boat missions show up.

NPCs can now shoot/do drive bys when driving:


passengers as well…:

1 Like

another update to 2.9.6s:
mrp-missions-2.9.6s.zip (145.3 KB)

–Playtested with Mission19 with 100 NPCs and > 10 vehicles + my own. I have a fairly new PC (~ 1 year old), and I noticed a little bit of performance drop when everything came into collision range. Could be my settings could be changed in the fivem game config to support this, but want to keep it more vanilla. So made Mission19 50 ->75 NPCs and 150m radius vs 250m. This also makes it tighter for capture the object missions.
–Adds helicopters to the default missions. Added definitions to Config.VehicleTurretSeatIds in missions.lua
–tweaked NPC plane spawns some more.

Helicopters are also benefiting from NPCs being able to shoot from vehicles now. valkyrie and valkyrie2 turrets and the cannon works as well, valkyrie is a real beast. But I cant get NPCs to shoot the missiles in the savage or buzzard. If anyone knows how to get them to do that, let me know. I wonder if these vehicles just dont work for NPCs, since they should work like the cannon in the valkyrie2

passenger NPCs shooting from maverick:


valkyrie turret gunners:

valkyrie cannon:

2 Likes

im ready to update my max player to 64…
i did some test but The ressource is made for 32.
did try to chage the 0… 31 to 0… 255 or 0… 63

it break the script… and many bug happen.

Can you aim me what to change please?

Hi,
Look for the ‘GetPlayers’ function in client.lua

function GetPlayers()
_ local players = {}_

_ for i = 0, 31 do_
_ if NetworkIsPlayerActive(i) then_
_ table.insert(players, i)_
_ end_
_ end_

_ return players_
end

change the 31 to 63. also in scoreboard.lua if you are using it. That is the only place I can think where it is specifically referring ton 32 players.

yes thats is what i already did…
but in all mission every spawn was multiply by the number of player online.

so it does this when you have > 32 players?

hmmn… you probably know all this, I did read something about OneSync supporting more than 32 players…so something with fivem and the way the scripts are being used… maybe update the _resource manifest to the latest header and see if that helps. right now I cant think of anything. https://docs.fivem.net/scripting-reference/resource-manifest/resource-manifest/
(see bottom of page)
05cfa83c-a124-4cfa-a768-c24a5811d8f9

its curious that the script I used for get players only went to 32.

2 Likes

didnt think about this… thanks
the manifest is a good idea!
and by the way 32 player and no lag no error…
Smoooooth

Cheers my dude

2 Likes

great to hear. Good luck working that out. I’m pretty new to GTAO and fivem, so dont have a whole lot of experience with native server limitations etc…

no … not doing this when having more then 32 player…
it does this when set to 64 player … 0, 63

so if set to 64 player
and 3 online… on mission evrything is spawn multiply by 3…

ok. I see, very odd. Yeah, Im not sure if there is some limitation there underneath, maybe a server.cfg setting? I dont see anything else in the script limiting it to 32, besides what you changed. GetNumPlayerIndices is called on the server is the only other place dealing with different players, but there is no set player number in the script there.
When I get some time, I can double check the script again.

1 Like

is this by any chance relying on NetworkIsHost or similar natives to ‘lock’ spawning to one client? for 1s you’ll probably have to have your own logic to determine which client gets to spawn entities.

Yes, there is defintely logic using NetworkIsHost, as a way for the server to choose which client to spawn from after mission timeouts etc… rather than randomly choosing. What do you mean by “1s”? I’ve seen that phrase used before.

Shorthand for ‘OneSync’.

2 Likes

@sixsens Looking at the script, if you are not concerned with the scoreboard not showing more than 32 players, just keep the GetPlayers max count to be 0 to 31. The resource should still support > 32 players.
The only place I am using GetPlayers is when a player first spawns and I do a count of currently active players to see if the player is the only one on the server. It can be deprecated since I am doing a check on the server using a server check which overrides it. so I can remove that code on the client side.

So keep it as it is 0 to 31… the resource should support more than 32 players if your server can.

1 Like

make sense… ill do that tonight.
appreciate your time and work…
still the best…
thx

1 Like

Minor update to 2.9.6t. Added the technical2 to be used in boat missions by default. Mission17 by default can generate these types of missions. They are pretty cool, will come up onto land as well.
mrp-missions-2.9.6t.zip (145.5 KB)

the bug(s) with the safehouses mentioned in the Known Issues should be fixed now. Put in proper checks to make sure there is an active mission when using the safe house, so it should be much more stable.

Updated to 2.9.6u:
mrp-missions-2.9.6u.zip (145.5 KB)

Updated to 2.9.6v:
mrp-missions-2.9.6v.zip (145.9 KB)

–Added FIRING_PATTERN_BURST_FIRE_HELI firing pattern to NPC peds added as passengers to vehicles via ExtraPeds or VehicleTurretSeatIds This means that turrets and other guns on vehicles behave properly now and there will be a constant rate of fire from 30 to 50 bullets, instead of in spurts. This makes vehicle turrets much more formidable. The exception is the valkyrie cannon, which I made more like a tank for balance. You can override this for death from above with NerfValkyrieHelicopterCannon = false Also the APC turret is the other exception and stays the same.
--VehicleTurretSeatIds is where you can add extra passengers per vehicle type for seatids. This can be configured per mission now.
–Added akula helicopter for default random missions as well as a new default ped NPC type

When I added FIRING_PATTERN_BURST_FIRE_HELI to the valkyrie cannon NPC, it was insane, 30-50 cannon shots in a row :rofl:

updated to 2.9.6w:
mrp-missions-2.9.6w.zip (146.0 KB)

–Ped in Vehicle kill bonus only applicable to driver ped now, not passengers.
Changes to default Missions.lua:
–Added new vehicles to the random mission generator.
–All default vehicles are now loaded up with angry smg-toting NPCs so will pose more challenge, and will have a hail of bullets coming from them. Change/add vehicles via VehicleTurretSeatIds
–Mission4, Mission9 are more intense now.

vehicles in general are a bit more like ‘boss’ entities now.

1 Like

Big update after some playtesting over the last few days.

Updated to 2.9.7:
mrp-missions-2.9.7.zip (152.5 KB)

–Players can now see other players on the map as white blips to help with co-op. To disable this, in client.lua look for: START SHOW OTHER PLAYER BLIPS

–Default primary game mode changed. Players no longer teleport/travel to safe houses on new missions. Players can request a safe house crate drop by pressing LB & RB on gamepad or Q & E together on the keyboard. It performs the same role as a safe house. Made default crackdown mode health to be 5000 instead of 2000 for much harder NPC vehicles. You can also set default player health w.o. using crackdown mode (w. super jump/speed/swim) with Config.DefaultPlayerMaxHealthAmount. New mission.lua settings UseSafeHouseCrateDrop & SafeHouseCostCrate which can be used with or without regular safe houses (All credit to Vechro whose crate drop script I used and adapted, see credits in main post)

– Players can now use /votecancel to create a poll to cancel the current mission. Players can then use /voteyes or /voteno to vote. voting is configurable at the bottom of server.lua. By default the resource will start a new mission 10 seconds after a canceled mission. (All credit to FAXES for his Vote-to-Kick voting system which I used and adapted, see credits in main post)

–Relatedly players will still get money for what they did in the mission, even if it was cancelled or failed, they just will get no rewards (free ammo/equipment/health/armor)

–Can also optionally ‘nerf’ APC and rhino/khanjali turrets to fire slower like for valkyrie (search mission.lua for ‘Nerf’)

–new default vehicles like the caracara. Also motorbikes NPCs will use, now that they can do drive bys. All default vehicles in random missions and regular missions will be loaded to the hilt with smg toting NPCs as well as any turrets.

–Many other bug fixes and many tweaks. Also many tweaks to helicopter and plane spawns. I tried TaskPlaneMission & TaskHeliMission but could not get them to work like I wanted. The new algorithm spawns helicopters slightly differently and planes spawn better (thanks also to some code I saw Vechro use)

–Updated the missions.lua config guide to reflect additions: https://ghostbin.com/paste/o3v7s

The voting system I decided to add, since IsRandomAnywhere=true mission spawns work around 99.99% of the time, though on very few occasions there may be one NPC spawn where it shouldn’t (inside a building) and is inaccessible. I have seen this one time as well with a capture point. I’m not 100% if it is the map data is the problem or more my algorithm (probably the latter). So the voting system was put there to allow players to bypass the mission if that is the case rather than waiting for it to timeout. The new scoring system as well will award players whatever $ they earned during the canceled or failed mission, but they will not get the rewards (free ammo/equipment/health/armor) that completion optionally gives.

The old teleportation/travel system is good for competitive co-op where all the players are participating and start at a relatively equal place per mission. But I preferred the safe house crate drop approach since it is more neutral and gives players more freedom to participate or not and maneuver as well.

2 Likes