[Release] [ALPHA] "Arma III" Styled Missions


#122

I really like what you guys are working on here and when I get time one of these days to get back to FiveM I will install and test it out.

Above you have asked a few questions about FiveM/lua resources although I’m not sure which questions remain unanswered. For the teleport question I can’t offer much because I have not paid much attention to it, but I do recall resources posted in the forums here which you will no doubt find if you just search the word interiors.

For props, I did once find this resource claiming to be a prop viewer with a massive list of props:

I haven’t tried it. There are probably many basic lists of props such as https://gist.github.com/leonardosnt/53faac01a38fc94505e9 but being able to view them all is another matter. Hopefully that viewer script works or can be made workable.

Earlier you also mentioned trying to implement a cleanup script. Assuming you meant for mission entities, you could look at what ghermans has done in his venemous mode freemode script using decorators to tag and then later clean up mission entities: see the cleanUpEntities() function and related code in the individual missions at https://github.com/FiveM-Scripts/venomous-freemode/tree/master/vf_mtest/missions.

There are probably many useful tips and ideas in that venemous mode script and some of gherman’s previous work collected at the above FiveM-Scripts github site. I am always looking for mission scripts and, apart from MRP-Missions and the above, I have come across only a few other developers who have done this kind of work: scammer’s freemode-remix with assassination and other missions, the PIS script callouts (WIP), as well as this script which may not have finished: https://github.com/Bluethefurry/Fivem-FR.

Good luck!


#123

updated to v.2.8.1 alpha… http://www.mediafire.com/file/7k11ig5g8rgsc6g/mrp-missions-2.8.1.zip/file
Changes:
The 0 ->1 players problem should be fixed now.
Pickups get cleared up as well, if they are set to be cleaned up in the config. Cannot set decor values on pickups, so had to do a workaround to ensure pickups are always cleaned up.
If you see the mission system halting, due to players disconnecting, there is a new setting in server.lua you can try called blHelpWithDisconnects. Set that to true if you have this problem or other problems.
Was going to add something else as well, but blips are the wierdest things to work, adding extra colored blips etc… makes the enemy blips not work properly.

@Loque Thank you for the information.Will check it out.

I may create a few example missions with some props as well. I ended up blowing through the Map Editor Prop viewer and found a few I can use.


#124

Im not sure about that info and im testing it right now on new version if mission pickup can be seen and take by other player or not…
Cause yesterday in a test the other player couldnt see mission pickup and couldnt take it either.

Testing new version
Be right back


#125

Ok tested live again with another player with me…
test on v2.8.1
Mission Start Manually
MissionPickup can be seen only by me… other player dont see them and cant pickup


#126

Is this a new problem? Could they see pickups in previous builds? Pickups seem to behave a lot differently than objects and peds on the network. I may need to have them spawn on each client.


#127

No i test with many version its always the same… Mission Pickup apear only for the one who start the mission…

Pickup Stay still and someone came 5 minute after the mission end and he see the weapon and could take it.
Seem to work if we are close to it… but if someone came after the weapon is available.
sorry wasnt a good news… seems… :frowning:

From what ive test soo far tonight… only the MissionPickup and Pickup dont work properly and appear only for the one who start the mission…
Didnt have the chance to test when the script start by itself cause i have more then 10 people online right now.


#128

Spawn for everyone but if a pickup id is taken… should disapear for everyone too…


#129

just want to repeat myself because ther is a difference…
pickup and mission pickup
pickup… after the mission my pickup appear… if i take it… other player still can take it…
when next mission begin they disapear… for me they disapear fir someone close they disapear… but if someone coming from nowhere after… he can see and take the pickup even after another mission as start.
its confusing cause first it look like they really disapear… but for other or new comer… the pickup apear for them.

and now mission pickup… on mission i see them i can take them. But other cant see them or take them.


#130

Updated to v.2.8.3 alpha
http://www.mediafire.com/file/7b81irj9w7sxud7/mrp-missions-2.8.3.zip/file

Features:
-This should fix mission pickups not spawning for other players.
-Friendly NPCs can now spawn, these can be hostages say. See Mission2 in missions.lua. you add a friendly=true for the ped definition. These peds will show up with special green icons. If a player kills one, they will receive a money penalty, configurable via Config.HostageKillPenalty. This can also be defined per mission as well.
-Backed out what I thought was a better workaround for floating placeables that was actually making things worse.

I have a workaround for spawned props floating, which involved calling PlaceObjectOnGroundProperly repeatedly every second, to ensure that placeables stay on the ground. When I started enumerating over all objects to handle all cases, this caused problems. Let me know if you see floating placeables in v.2.8.3. This would be Mission2, with the 2 ammo boxes. You shouldnt, but I think it can happen in some cases.

Yeah I can see that pickups are not like npcs or objects. It looks like each client needs to spawn its own pickups. I can see that the reward pickups were spawning for every client, whereas the mission pickups only on one client in the code. So for the reward pickup, that makes sense, you will both have your own ‘local’ pickup at mission end. the cleanup script also runs on all clients via server and will clean all the pickups up. But it is odd how the new person joining in can take the pickup.
Will need to revisit this if/when I get time. Anyways, Mission Pickups should spawn for everyone now at least, since they now spawn like the reward pickups

You mention how with pickups, that it depends if the other play is nearby or not. This is the same case with the floating props and why I had to run a loop. If I started a mission from far away and teleported in, one call to PlaceObjectOnGroundProperly when the prop spawned would not suffice, since I was far away, its like the object was not really loaded (that makes some sense).

EDIT: Just re-uploaded with another change with one line, that was part of the mission pickups spawn fix to spawn for all players. So make sure to re-download if you are having problems with pickups


#131

Awesome…
The Hostage such a good idea and well done. it work perfect
Now MissionPickup are seen and pick… Once per Players… (should Disapear after being take once) but i can live whit it…

Just see that you re upload your script…
What line… ill edit it myself… please


#132

About floating props: Are you sure it’s not a problem of the prop coordinates? Or a particularly glitchy prop (does it happen with all props)?

An alternative method is to find the ground Z coordinate instead of relying on that native, as for example in the prop spawning functions here:

AFAIK you should not have to spawn a prop on each client. I believe SetEntityAsMissionEntity is supposed to make the object persistent and networked, although some scripts additionally use networking natives to try to share the object network id and such. However you may be on to something regarding player distance and object spawning. You may want to check the RequestCollisionAtCoord native, as used in the spike strip spawning function of the Cops script above, as it seems to have solved some similar problems encountered by others:

Networked entities are a challenge in FiveM currently and the forum is full of threads with complicated questions and test cases and overall the situation seems incomplete or unresolved. If nothing else solves your networked object problem, you might try to use an updated resource manifest version in your resource lua – update to latest version 05cfa83c-a124-4cfa-a768-c24a5811d8f9 which added networking features.

https://docs.fivem.net/scripting-reference/resource-manifest/resource-manifest/


#133

Thank you Loque. The first method I have been using. I needed to use it on the few props I have used.
Cool, will look into the 2nd script, that looks more reliable from what I can see. I have gone back to spawning peds and objects only on one client, which works. Pickups seem to behave differently. But, we seem to have it working better now, or more consistent at least.

@sixsens:
In ‘SpawnPed’ event handler, comment out the SpawnMissionPickups line. Its already being called elsewhere now. This might fix the lack of disappearing for you.
Also, some extraneous code gets called which shouldnt

remove this near the bottom, above the comment:

for obj in EnumerateObjects() do
_ if(DecorGetInt(obj,“mrppropid”)) > 0 then _
_ _
_ DeleteObject(obj)_
_ _
_ end_
_ end_

–Keeping props on the ground

This change is in this version:
http://www.mediafire.com/file/38ub30tpfdtm1vf/mrp-missions-2.8.3.1.zip/file

Do you mind sharing your esx money changes? I can maybe incorporate them into the resource to be used optionally, and you will not need to edit the client.lua every time if/when I make a change.


#134

i finish my work around 4pm… as soon as im home and sit …ill send you instruction…
no worry


#135

client.lua
On top i add:

ESX = nil

Citizen.CreateThread(function()
while ESX == nil do
TriggerEvent(‘esx:getSharedObject’, function(obj) ESX = obj end)
Citizen.Wait(1)
end
end)
RegisterNetEvent(‘esx:playerLoaded’)
AddEventHandler(‘esx:playerLoaded’, function(xPlayer)
PlayerData = xPlayer
end)

and this:

TriggerServerEvent(‘paytheplayer’, totalmoney)
TriggerServerEvent(‘UpdateUserMoney’, totalmoney)

replace this:

StatSetInt(‘MP0_WALLET_BALANCE’,totalmoney, true)

add in server.lua:

TriggerEvent(‘esx:getSharedObject’, function(obj)
ESX = obj
end)

RegisterServerEvent(‘paytheplayer’)
AddEventHandler(‘paytheplayer’,function(totalmoney)

local _source = source
local xPlayer = ESX.GetPlayerFromId(_source)
xPlayer.addMoney(totalmoney)

end)

Here the change i made for ESX

I have a little favor to ask, after a mission… i would like to built mission that i can pick an item.
Would like to use PICKUP_PORTABLE_PACKAGE and when pick it give an item to the player.

here is an exemple that add a item (esx)
defib is the item… and 1 is how many
server side:

xPlayer.addInventoryItem(‘defib’, 1)

If you know a way to pick a pickup and give an item
Thanks


#136

Awesome work you did on last version.
Didnt notice any bug so far.
Love the friendly npc or hostage.

Did notice that if i put melle weapon on ennemie npc… they dont attack… they flee… cause they fear us… If you have a solution to make them no fear and attack.

on a fresh restart Script autostart mission1…

Mission pickup appear for everyone
Didnt have time to test is pickup after missikn when pick if still available for new comers

finally … just found that i can set mission 1 ennemy as target… now i see target blip on map…

Also pretty nice that i can set armor for ennemy.
Love all your work. You are a masterchief my dude.


little problem with esx change i post
every .
` as to change for ’
sorry was a copy paste lost of character


#137

I love this script and how fast you update it!
There is a problem with the money for the completed missions for fivem VRP though, it’s the generic money from GTA soloplayer you get – so what do I need to write for rewards to go to my bankaccount or just to my wallet when using “banking” script from dunkos?


#138

add to stop the script…
When running it… players goes in instance most of the time, myself too
Not sure why…
Meaning players are alone in session most of the time… they mostly cant reach the group session.

im investigating but i stop the ressource and thing get back to normal


#139

When running it… players goes in instance most of the time, myself too
Not sure why…
Meaning players are alone in session most of the time… they mostly cant reach the group session.

Hi, What do you mean? You mean players are disconnected?


#140

when connecring to a server if 0 player you became the host of the session then next player get sync with you and if a sync problem happen the new commers doesnt came into server session and get in a solo session.

Sometime they pass sometime not…

this is a common problem and happen for everyone one once in a while…

but now with mission on… it happen most of the time.

There is not a lot of subject on forum about this kind of issue and i try to seek the problem…
as i read its seem ti be about citizen wait
and info from client that doesnt reach host at a certain time.

Info from client to client doesnt reach each other and then new commers fall into solo session.

in solo session they are in the server but alone with themself…

this is what i know…

Now when i stop mission ressource, solo session doesnt happen.

finding why, this is what im on for now.
sorry if its not understandable…
2 words… Im French


#141

No problem. :slight_smile:
What version did you first notice that this was more of a problem?
I have an update 2.8.5 alpha I will upload today, but not sure it will fix that (but it may, I made some tweaks), but I do have some suggestions on how to try to fix, since I learned a lot more of what was possible with the current codebase of this resource and NPCs with Fivem.

I think it could be a couple of things, if you noticed it happening recently. I may have a fix for one, and workaround for the other for you to try. Will post back with the update and other information.