Hi,
I just got into Fivem, and have been looking for something like this to putz around with on a local server. Thanks LanceGood.
I played about with the code, and added some minor features (not committed to the GitHub repo), which seem to work OK.
Whats been added:
Missions now have types, the original mission type is “Objective”, I have added an “Assassinate” type as well.
See mission.lua for examples.
For assassinate you also add a target=true attribute to at least one mission ped, or to at least one vehicle (whereby the primary id2 ped which drives the vehicle becomes a target). When peds have target=true, they will show up as crosshair blips, to show that they need to be taken out to complete the mission. Target peds can now take off in cars etc or by foot which you may need to chase down to complete the mission. -Tip: You can define a ‘Weapon’ attribute for vehicles, but if you want to make sure the ped (‘id2’) drives, dont define a Weapon. Also, make sure there are plenty of ‘bodyguard’ Peds nearby that the player needs to fight before they can access the vehicles.
Added Features & Changes:
-added an ‘ExtraPeds’ attribute for Vehicles, whereby you can define peds from the Peds collection for the mission to be added as extra passengers into the vehicle. NOTE: for this to work, when you define the Peds, you need to start the id with 1, and increment by 1 in order.
-added an ‘armor’ attribute for Peds and Vehicles, whereby if it is set, will add armor of that amount to the ped. For vehicles, this will be added to the ‘id2’ ped defined, which is set to seat -1, and is typically the driver.
-The bug with the blip not disappearing for other players should be working now at mission end, but it’s not tested. I added a server event to send to all players.
-also made a change: attached blips to the “id2” peds driving the vehicles, not the vehicles themselves.
Thought I would share, if the author is OK with that. http://www.mediafire.com/file/2c30s264ez1que3/mrp-missions-2.3.zip/file
This is an ‘unofficial’ 2.3 version. I dont plan to support this. FYI, I noticed funkiness with the script not working (w.o. errors in the console), when I chose certain different models ( i.e. S_M_M_FIBOffice_01 & S_M_M_FIBOffice_02). So you need to experiment with different models to see which ones work in fivem.
EDIT: Made another fix for typos with removing the mission blip for other players, please re-download from her again if that is not working: http://www.mediafire.com/file/2c30s264ez1que3/mrp-missions-2.3.zip/file