OK, thanks for testing and the feedback.
blForceCheckForBlips = false
i did reinstall 2.8.9 fresh
i did change what you asking to change in client
i did put blForceCheckForBlips = false
But mission does finish and next mission start
thanks man, get some rest Have a good day.
sorry to come with bad result… I know you work hard for this.
when you get a chance, let me know if it works better when you start it with /mission command.
Its really odd, what you are getting, the blips do show… briefly…, so I think it is close. I take it that you were testing by yourself on a remote server, not locally? No hurry, these blips and pickups seem so simple… the code… but such a pain… lol
autostart or /mission
On a remote server right
A needle i know… lol
d0p3t’s response… re: blips and network clients… according to him and his testing… entity blips cannot be seen from across the map by other clients (not the host who spawned them), unless the clients are nearby the entities, even when working with more network aware code/resources. But you said, that blips have worked and been seen fine by all players in testing, even from across the map… hmmn… I am using decor which is supposed to be peer to peer, which he might not have tried, but what he writes makes complete sense.
Im going to try and run a second instance on sandboxie when I get time to work on this next to see what is going on, and to see if what I am trying to do ever going to work.
based on that article (and what loque suggested earlier), I set all the NPCs and vehicles to be mission entities…
When you get a chance please try again and see if it works…
Also, keep blForceCheckForBlips = true and teleport to where the NPCs are (before the 30 seconds) and see if they show up. I may be barking up the wrong tree, but its worth a shot. Sanboxie I guess is possible, but did not work for me.
I need to get some rest as well.
For water detection, I don’t have firsthand experience doing this. Depending on how you are going about it, it may or may not help first to GetNameOfZone to check if your chosen coordinates (your random mission area?) is one of the zones with water before looking for it specifically. But then I wonder if this native can be made to work:
If being in water returns true as per the note in the native reference guide then hopefully not being above water returns false, or something else consistent. The alternatives seem more challenging (raycast with water flag?): https://runtime.fivem.net/doc/natives/#_0x377906D8A31E5586.
As for host issues I’m not really certain. I think NetworkIsHost() works properly in the latest resource manifest but I’m not sure how you would structure what you are doing.
The blip thing may or may not pull you into all these complexities of managing persistent and global networked entities across clients. My understanding is it has improved since the March 2018 update. In the blip thread you linked the problem case was a prop, which I thought was handled somewhat differently than peds in the network code, and the solution posed by an element was to set mission entity and possibly use the ‘exotic’ native SetNetworkIdSyncToPlayer. I’m not sure if RequestCollisionAtCoord would also be useful in that case of a distant prop in a not yet loaded map point of a remote client who did not create the prop.
I don’t know if you will need all of that, especially if sixsens tested an earlier version with working blips? Maybe I’m confused on that with the back and forth of versions and testing. But yes, as far as I can gather, the current ‘best practice’ for creating persistent networked entities includes using SetEntityAsMissionEntity. If you plan on using netIDs, for instance to convert back and forth local entityIDs <-> global netIDs, which seemed to be the direction the ‘blip for everyone’ solution was heading, then you may need more.
As you see it’s advised to use NetworkRegisterEntityAsNetworked (unless that is redundant after SetEntityAsMissionEntity). SetNetworkIdCanMigrate can be used but whether you set it true or false depends upon your usage.
And again, some scripts appear to use RequestCollisionAtCoord in cases where a client may not yet have loaded distant map locations/entities. This is ALL a bit murky until there is complete FiveM documentation on networking or at least someone lays out clearly how the post-March 15 “more like GTA IV” networking actually works.
As for your Sandboxie experiement, I guess it didn’t work at all? I wish it were easier to test your own server and script with multiple connections. I’m not sure if someone has devised a way.
i think i will let him work on my server…
Same as yesterday. I did everything you said.
Before and after 30 seconde (same) Blip doesnt appear… They still appear and disapear right away.
Thanks Loque. There is a thread on to get fivem working with sandboxie, which is possible evidently. I may try again, or install on my laptop if necessary. Im curious enough.
Yeah, this may not even be a network issue at all, since the blips showed up albiet briefly, which makes me think it is something silly
sxens, I uploaded a ‘debug’ version that you can swap in… https://www.mediafire.com/file/sj5m37q505n637n/mrp-missions-126.96.36.199-TEST.zip/file
Basically, with that version, all I need is you to create a mission with just one enemy ped. Start it, or autostart it when you log in.
Keep blForceCheckForBlips = true, so it will look for peds for 30 seconds.
Let me know what the ped count is in the console after 30 seconds after you connect/start a mission and when the script gets to ‘found enemy peds…’
Also importantly, if it has any text with ‘ENEMY PED…’ in the console… you may need to scroll up. I need to know how many times approximately that gets printed in the console for one enemy NPC.
I also commented out these lines:
In case something was not right with the lookup there.
I basically just have this resource with a vanilla fivem server. Except for fivem-ipl resource loader and my own simple teleport resource. I am not running ESX etc… So I am wondering if disabling ESX etc… for the test then adding it back in if the test work may help. I imagine ESX, etc… are adding their own blips?
looking for enemy peds…1
found enemy peds…1
i did stop es_extended and essentialmode and some more esx core ressource
and start mission… samething.
so no 'ENEMY PED…" at all on the console? interesting… Did the blips flash for you this time? with esx and everything else off?
i did as you said create a mission with one enemy…
start mission and look how many time it looking for enemy peds…1 … 30 times…
and it found one… as it should… i did a mission with one enemy.
With esx core stop everything was the same… same appear disapear… this time only one little dot appear as a target and disapear right away… Normal i haved only one in this mission!!
With both last version nothing as change
with testing without esx core ressource nothing as change samething too
did you have target=true removed and also any other flags/properties like friendly=true removed?
So it is just a regular enemy (red blip)?
Also, the ped is not dead correct? Its alive when you go there… I think I may have found what might be happening…
i just try them all once…
target=true… apear disapear purple
friendly=true… apear disapear green
no flag… apear disapear red
they are not same blip icon as before… maybe what you choose as icon are not okey?
With Discord i could share my screen… and we could work together to make it work
and do those test live…
So the ped is definitely not dead when you go to where it is?
i have another debug version you can swap in to test for me…
i basically looked in my code where it removes a blip, and there is an aliveCheck() function that gets called and checks for this resource’s peds and if they are dead to remove the blips.
I disabled that . You should see blips now…
Once the script gets to found enemy peds…’ you will see a large number like 500… dont worry about that…
What I am interested in, is do the blips show now…and… when you go into the client console… are you seeing any ‘ENEMY PED…’ text, any “REMOVE PED BLIP” text, any “FOUND PED BLIP” text, and any “DONE REMOVE PEDS” text
yeah, I think connecting on discord would be beneficial… lets see how this test goes… thanks man.
already reply in private message