Player Vehicles Randomly Despawning

Did you change your artifacts into 2903? and did the cars stays? I am also having this issue and I don’t know what to do? Players gets annoyed for paying impound when they cars went missing after they go far away or nobody around the vehicle.

I haven’t had the time to look around scripts for possible issues but in my server the vehicles despawn when a player joins or leaves and also players arrive in two different server instances when this happens. I don’t know how to better explain this but it’s like a parallel universe thingy happening inside the server :frowning:

yes, I think that all of us who have this problem is because we do not use zaphosting, I have it mounted on a local pc.

that’s complete nonsense, why would such a ‘problem’ happen ‘because you don’t use zap hosting’

I wouldn’t know how to tell you, but with everyone who has this problem, they mount their server on a local pc.

This is quite possibly the most stupid comment I have read.

I don’t use zap, but because our resources are coded correct we don’t have the problems you and “everyone” else has.

1 Like

I tried every possible way to Spawn a vehicle, and it still keeps disappearing with the recommended version.

Obviously you haven’t tried every possible way, or you wouldn’t be having the issue.

SetEntitiyAsMissionEntity() is one native that should help.

With the newest artifacts we have been having these issues. However 2903 was a best artifact for me as vehicles were never despawning even when leaving the server. I will be going back to that.

I’ve already tried it

Why wont you help others out and share your code that fixed this issue. Saying general things such as “you didnt do it right” is not helping anyone really. Especially if you know how to fix it and simply wont tell.

Obviously you haven't tried every possible way, or you wouldn't be having the issue.

SetEntitiyAsMissionEntity() is one native that should help

Where is any of that did I say “you didnt do this right” don’t put words into my mouth.

I gave you “code” I gave a native you need to help. I’m not going to write a full tutorial on how natives work or how to use them when there is tonne of documention already available for this, there is also the fact that every server is different so I can’t tailor a response to suit everyone.

For a fact this alone does not help. Unless you want to specify how you get the entity and the other steps. The usual “getvehiclepedisin” thing doesn’t work here. Or, well, at least it will not stop the despawns.

Game quickly forgets the entity, then when another players “takes control of it” but “doesn’t need it” anymore, it gets deleted. The best foolproof method is to get the same entity be set as mission entity on all clients. Then none will delete it.

If anyone is interested, i sent the networked entity to the server, and then to all the clients from there which then locally set it as mission entity.

Not sure if it is the best method, but nothing else worked for us before that, and cars were despawning real bad. After this fix, they no longer do.
Good idea is to store them in a table on the server side (just the id’s of the networked entities, so its as light as can be) and whenever a player joins or spawns, have their client add all these from the table as mission entities. Otherwise new people wont have it as such entity, and their client might try to delete the vehicle.

I would greatly appreciate if anyone has a better method for doing this tho, as it doesn’t seem to be the best performance-wise.

Similar fixes work with repairing vehicles etc - eliminates the need for the mechanics to always sit inside the cars when they are doing their stuff in order for it to sync to all the players around them.

I fixed mine by downgrading my server artifacts…

To which version?

“Fixed”

Downgrading isn’t a fix. The vehicle despawn is intentional and you to write your resources to accommodate that.

All you are doing by downgrading is limiting yourself to a single old artifact.