Issue requesting network control with some vehicles

Client

Using canary? No
Windows version: 10

Server

Operating system: Windows 10
Artifact version: 1150
IP address: 103.193.80.98:30130
Resources: 124

Incident

Summary: For this example we had a issue with a car seemingly teleporting around without a driver. When I went to delete it, the native NetworkRequestControlOfEntity(entity) does not work. This prevents me from deleting the entity. The command I used outputs information such as the net ID and owner. The owner was another player on the server.

Expected behavior: NetworkRequestControlOfEntity(entity) to give me control, and then the entity be deleted

Actual behavior: The vehicle remained in the control of ID 58, preventing me from setting it as a mission entity and deleting it

Steps to reproduce: Currently I have not found a reputable reproduction technique

Server/Client? Both?

Files for repro (if any): Not files for a repro, but I do have client onesync logs, timestamps and a recording. Unfortunately during the recording the vehicle did not display the desynced movement. I also have a server onesync log (on request)

migissue_1_client.log (3.4 MB)

Any additional info:
Timestamps:
8305390 (approx time of trying to delete the vehicle)
8310429 (approx time of prints to console)

NETID of problem car: 1030
ID of owner of problem car: 58

My ID: 94 (kn0pee)
Owner of problem cars ID: 58 (Riggsy)

Script I am using to delete vehicles. I am aware it has lots of stuff (a lot probably not required) but it is what works for 99% of the time and covers all the possible issues that seem to get thrown at it

if IsEntityAMissionEntity(entity) then
		Citizen.Trace("BEFORE: Entity IS a mission entity")
	else
		Citizen.Trace("BEFORE: Entity IS NOT a mission entity")
	end

    
    NetworkRequestControlOfEntity(entity)
	
    local timeout = 2000
	while timeout > 0 and not NetworkHasControlOfEntity(entity) do
		Wait(100)
		timeout = timeout - 100
	end

	SetEntityAsMissionEntity(entity, true, true)
	
	local timeout = 2000
	while timeout > 0 and not IsEntityAMissionEntity(entity) do
		Wait(100)
		timeout = timeout - 100
	end
	
	if IsEntityAMissionEntity(entity) then
		Citizen.Trace("Entity IS a mission entity")
	else
		Citizen.Trace("Entity IS NOT a mission entity")
	end
	
	Citizen.Trace("Owner of entity: "..GetPlayerServerId(NetworkGetEntityOwner(entity)))
	Citizen.Trace("NETID of entity: "..NetworkGetNetworkIdFromEntity(entity))
	
	if NetworkHasControlOfEntity(entity) then
		Citizen.Trace("Entity IS in my control")
	else
		Citizen.Trace("Entity IS NOT in my control")
	end

	Citizen.InvokeNative( 0xEA386986E786A54F, Citizen.PointerValueIntInitialized( entity ) )
	
    if ( DoesEntityExist( entity ) ) then 
        Citizen.Trace("Entity FAILED to delete! If you see this please contact a developer!")	
        DeleteEntity(entity)
        if ( DoesEntityExist( entity ) ) then 
            Citizen.Trace("Entity FAILED to delete on attempt 2! If you see this please contact a developer!")            
            return false
        else 
            return true
        end
    else 
        return true
    end 
1 Like

Still having issues with this? Cause I am :^)

This should be fixed
@Drifter update your server maybe

1 Like

I have the most up to date server files…

1 Like

This, along with any issues of not being able to access / delete vehicles is significantly benefited by using the new experimental OneSync flag.

onesync_distanceCullVehicles true

The issue, whilst sometimes still occuring is generally fixed very quick without needing to kick / reboot the server at all.

1 Like

Where do you put the " onesync_distanceCullVehicles true" ?

yeh where do we put this? onesync_distanceCullVehicles true

server.cfg?