My Bad Found resource NoPlayerBlip bugs the new way you spawn those blip…
Sorry for all this.
im back to 2.8.9
My Bad Found resource NoPlayerBlip bugs the new way you spawn those blip…
Sorry for all this.
im back to 2.8.9
@Loque… That getwaterheight function seems to work perfectly for detecting water or not, so I am using that to generate completely random locations for missions now. If water, it will generate a boat mission (with potential aircraft support). works with inland water and sea… though rivers evidently do not work with it… which is fine.
@sixsens, no problem! Again, glad it is working for you man. Thank you for all the testing and feedback.
Ok 2.8.9 …
I have 2 others players…
Ill do a video … recording Autostart on fresh restart.
Testing Npc Blip
Testing Pickup (if clean after take once by a player)
Testing MissionPickup (if clean after take once by a player)
Testing when next mission start if:
A little earlier i did some test…
we were 2…
we are close to mission1 that is bot start yet
I start /mission Mission1
we both see npc blip
we had problem with pickup and missionpickup not clean after been take once. Meaning can be take more then once.
MissiomPickup didnt clean after mission finish and next mission start.
Next mission autostart…
i dont see blip npc… my friend do see them
then i /stop it and restart it /mission Mission2
Now i see npc Blip… he dont… i stop again…
i tp close to mission2 area with 2nd player.
I start it again… this time we both see npc blip…
i know its a lot of info. Thats why i retest everything recording it…
ill send the video in private in aboit 30 minute maybe 45m.
Thanks my dude
or maybe you want tk join us? in game
Ok thanks… this sounds similar to that thread I posted about, about distance between non-host player and NPCs. It sounded like he was the client who became the NPC spawner for the second mission, which is why he could see them. Are you using 18.104.22.168? That is setting the NPCs as mission entities, which I gather fixes this distance problem with the non-hosts.
Sure, I can pop in… I dont have a mic, but can talk via chat if needed.
As far as pickups… hmmn… did they even work in 2.8.8?
Im playtesting some stuff here atm, but send me a PM of the details, and I will swing by when I am done.
Also, with the pickups… I’m also wondering if it is network issue with non-hosts… since I’m not 100% sure if they are not fully affected by network. I just assumed that spawning them on each client would work.
Another pickup system, where a marker/blip can be set where if a player crosses into it, it just gives them a weapon/gadget directlty or something and/or restores health/armor might be easier.
yeah, I will check out the server… would be good to see what is happening.
my version is 2.8.9 ill do test with 22.214.171.124 in 10 minute… not sure if my 2.8.9 is already update… soo ill do again.
by now with 2.8.9
when close to mission 1 and start all 3 of us see’S npc blip… when next mission started only one see npc blip but next mission is a bit far now.
Also in 2.8.9 restart refresh server… mission didnt autostart…
that is the link for 126.96.36.199 I did see a bug for autorestarts in server.lua which I fixed, and will be in 2.9.0, not sure that is your problem. When that happens, let me know if you see an error in the console.
when next mission started only one see npc blip but next mission is a bit far now.
yeah, that makes some sense if that player spawned/hosted the NPCs I guess. Lets hope SetEntityAsMissionEntity fixes this.
If not, a workaround would be, to have a thread that runs continuously and would add blips when you get closer to the NPCs… or they get closer to you.
Everything the same
But i think my 2.8.9 was already updated to 188.8.131.52
if you can, can you do a search for ‘SetEntityAsMissionEntity’ in client.lua please. If it is there than I know I will need to try something else as well… thanks.
Basically any occurrence that does not have the two “–” characters in front of it…
Just want to be sure you are using 184.108.40.206 thanks.
I am close to having 2.9.0 done and will include my workaround for you to try. This will run a thread that continually checks for NPCs and will add blips… that should work… until a better solution can be found.
yes thats the one. Ok, I am finishing some playtesting, and will throw in the workaround for the blips. It will be 2.9.0
client.lua (147.7 KB)
Put that client.lua in, that has the workaround… basically NPC blips should now show properly for everyone when they are closer to NPCs.
i added to the file you sent me…
if they dont show… check your console when you are nearby the NPCs… there should be text saying looking for enemy peds… with a count.
This is a better solution, since I am still working on 2.9.0, and will include this if it works for you.
While I remember… the workaround I sent I need to improve.
I basically took the spawnpedblips fix and made the timeout (blForceCheckForBlipsTimeout) to be 1 hour.
My real workaround will be to have it called continuously in a separate
Citizen.CreateThread and also not blink for dead NPCs. The way it is called now… everytime a new mission starts it will create a new loop and another etc…
also, for pickups… when you place pickups… each client will have their own local version they will see in the same place. So you will pick up yours, and I will still see mine there until I pick my own one up. So they are working like I expected.
also the hostage rescue not working for me need to look into.
Thanks for yesterday night…
Pretty cool that you were there to test with me.
This way i think we saved a lot of time and misunderstanding.
I think you are close to a stable version.
And for people reading this, ddraigcymraeg is an awesome dev… This is close to be a game mode.
Im proud to be part of this project.
I did change icon blip to my own… Love it…
ill show you tonight.
Cheers my dude
is it possible to make ennemy want to kill
President inside limo… have to go to a destination… but some ennemie are hiding on is way to kill the president before he reach destination…
A mission were we have to protect a friendly npc on is way to a destination…
and if he reach destination… Mission done
if he die… mission failed
ennemy npc… dontmove=true
for sniper enemy
ennemy npc sleeping=true
doesnt see or react if you pass
but woke up if hit… or ear fire shoot…
or simple like doesnt react if not in a 5 meter area
A npc (friendly/ennemy) with a destination will wait til a player get close to… 10 meter area…
then i start is way to destination…
a kind of waitaplayer=true
Interesting – I like in particular the broad category of VIP escort and its opposite (variants of assassination or apprehension involving escorted target). It seems these are feasible with natives like TaskVehicleEscort, TaskVehicleFollow, TaskVehicleChase, and ped relationship groups.
Of course I don’t know how difficult these would be to implement, and I’m not the one doing the work here, and such great work it is!
These links may or may not be of any use should development go in this direction:
Will check those out. Very interesting.
sixsens has been helping a lot with testing on his server. We fixed a problem due to my code not taking account of decor values not syncing to all players from NPCs since the NPCs were probably not loaded for all players… and were returning 0 for those clients.
I have random missions at predefined locations as well as now completely random location missions working, where anywhere on a map a random mission can spawn, and if on water peds with boats will spawn. For completely random location missions, you can define the x range and y range on the map where missions can spawn.
We found some limitations, that non-host players will only see NPC blips when they get close enough… around 500m (sometimes less) close to the NPCs, even wen blip range is to be long range. It makes sense no,since the NPCs and their decor does not exist yet for the other clients who have not come within range With setting them to be mission entities (I think), the blips seem to stay across the map, once you have gotten close enough to load the NPCs. So I am working on adding an extra optional mission blip for certain types of missions, like IsDefend that will show start point as well as end point for NPCs, since non-host clients may not see the NPC blips right away.
I have 2.9.1 alpha out now also has mission counter/timeouts…
You will notice a ‘Time Left’ counter now.
There are 2 settings,
first in missions.lua:
Config.MissionLengthMinutes = 10
You can set MissionLengthMinutes per mission as well which overrides the global value.
Second in server.lua:
–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 = 5
So a mission will by default timeout in 10 minutes.
Then there is the Config.MissionSpaceTime =10000 (which is in milliseconds). which can also be set per mission, which is the space between the current mission ending (where reward pickups spawn and then should disappear) and the next mission starting.
So what happens is that the players can complete a mission, it can timeout etc… and now the client that competed the mission will tell the server to find the host and the server will/should have the host spawn the next mission, rather than the client who completed it. Same with timeouts.
The server will run in a loop and keep track of the time the last mission would timeout/end + spacetime. If there has not been mission activity since the last mission would of ended, it will wait an extra ExtraTimeToWaitToStartNextMission minutes past that time before checking the clients for the host and getting the host to spawn the next mission. If that makes sense.
This value is set to 5 minutes by default.
sixsens is going to do some more testing
Great work on the updates and testing.
Your story of decorators not getting recognized brings back some bad memories. I remember similar issues with decorators and networking on the heli spotlight mod I did some time ago. It might have been different in my case of decorators on vehicles, which sometimes a remote client needed to read but other times it needed to change. My memory is fuzzy but I think I recall, at least with changing a decorator on a remote client using the FiveM netcode that existed pre March 2018, I had to create function for the remote client to first (with repeated attempts) NetworkRequestControlOfEntity until it had control. Your situation of course sounds different but network control certainly was and maybe still is an issue for many instances where one client wants to effect a ped/prop/vehicle created by another client.
If your case of blips not networking if an NPC has not loaded on a remote client, it’s probably no big deal because it sounds like everything could still work perfectly well, but I’m curious if you tried either passing the NPC coords to the remote client for it to RequestCollisionAtCoord? Or even simpler if it worked the FiveM element’s solution from that blip thread, which if I understand would be something like… have the originating client apply to the NPC SetEntityAsMissionEntity + NetworkRegisterEntityAsNetworked + PedToNet + the previously unheard of SetNetworkIdSyncToPlayer to force sync the netID on all clients? Ha ha, that actually doesn’t sound that simple after all. Ignore me as I’m mostly just curious to unearth all that can be unearthed about the current netcode and syncing.
All the best as you continue to work on this!