Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue setting properties on server side vehicles #2676

Open
CeebDev opened this issue Jul 27, 2024 · 3 comments
Open

Issue setting properties on server side vehicles #2676

CeebDev opened this issue Jul 27, 2024 · 3 comments
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action

Comments

@CeebDev
Copy link

CeebDev commented Jul 27, 2024

What happened?

I you try to set properties on a vehicles created with CreateVehicleServerSetter, it can be reset by server

Expected result

If you are the netowner, then it should set properties

Reproduction steps

  • Create a vehicle with CreateVehicleServerSetter
  • Set the plate text number server side after entity created, for example XXXXXXXX
  • Set the plate client side
  • Have a loop server side to detect when plate has changed from XXXXXXXX to another
  • Server detect the plate change
  • Now, create a loop to detect any other plate change
  • Sometime, it reset to XXXXXXXX and sometimes to a complete random plate number

This seems to be the case of all properties (color, engine, etc)

Importancy

Slight inconvenience

Area(s)

FiveM, OneSync, Natives

Specific version(s)

Last

Additional information

This is annoying and we can't use server side vehicles rn.
I have another issue with server side vehicles : #2623
The other issue can be detected so we can respawn the vehicle just after despawn, but this issue can't be handled because properties reset at random time

@CeebDev CeebDev added bug triage Needs a preliminary assessment to determine the urgency and required action labels Jul 27, 2024
@Korioz
Copy link
Contributor

Korioz commented Jul 27, 2024

I don't have any issue like that and i create every entity from server-side, make sure that the reproduction steps work in a clean environment with no other scripts that can affect vehicles properties.

Please provide more information such as server build, game build, a precise repro script to drag&drop for the Cfx.re team and such.

@Legacy-TacticalGamingInteractive

@CeebDev were your issues fixed

@Manason
Copy link

Manason commented Nov 13, 2024

This sounds related to Qbox-project/qbx_core#615

I noticed it started when I stopped teleporting the player into the driver seat before loading properties. This guarantees ownership, so the problem may have something to do with that.

Some things I've confirmed:

  • The entity owner is the same before and after setting properties
  • The server always thinks the plate is successfully set (meaning it gets the props update from the entity owner), but then sometimes a different process changes the plate. Other times the plate is set correctly, but other vehicle properties are not. I'm still trying to find out what the second process is that changes the plate.

Since this occurs infrequently I haven't been able to personally repro it. I'll see if I can test further later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Needs a preliminary assessment to determine the urgency and required action
Projects
None yet
Development

No branches or pull requests

4 participants