Before continuing, please make sure that your issue/crash has not been filed before on this forum. If it has, please provide additional information in the existing forum topic by filling out the template there.
To provide valuable feedback for OneSync issues or crashes, please fill out the following template as much as possible.
Client
Using canary? No.
Windows version: Microsoft Windows 10 Pro (Version 2004 Build 19041.1110)
System specifications:
Processor: AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz, 8 Core(s), 16 Logical Processor(s)
Memory: 32.0 GB
Graphics Card: NVIDIA GeForce GTX 1080 Ti
Server
Operating system: Microsoft Windows 10 Pro (Version 2004 Build 19041.1110)
Artifact version: FXServer-master SERVER v1.0.0.4262 win32 (onesync is ‘on’)
IP address: Local Test Server
Resources: All default resources and 1 test resource
System specifications:
Processor: AMD Ryzen 7 3700X 8-Core Processor, 3593 Mhz, 8 Core(s), 16 Logical Processor(s)
Memory: 32.0 GB
Incident
Summary:
Server is no-longer obtain entity owner when create mission entity from client-side script. (I can see it obtain once and pass it to another nearby player.) and entity get deleted if no player nearby.
But if it an vehicle that created server-side using CREATE_AUTOMOBILE
, The server will obtain entity owner even no player nearby.
Also, The entity that get created by client-side script and set as mission entity didn’t get culled and assign to server as well. It remain to my client as a owner until leaving the server (I didn’t know is this normal? Or I should set some cull radius manually).
Expected behavior:
I don’t know is this normal behavior? But assuming from OneSync server-side persistence Cookbook, Server must obtain owner from client-side script when no player nearby.
Actual behavior:
Mission entity that created from client-side script get deleted when no player nearby.
Steps to reproduce:
Client:
- Create vehicle using
CreateVehicle
- Set it as mission entity
- Quit the game. (Leave the area didn’t make entity assign to server or removed. It didn’t cull as well)
Server:
- Create vehicle using
CREATE_AUTOMOBILE
- Quit the game or leaves the area.
Any additional info:
My test resource (Download Link at the end)
Client
RegisterCommand("createVehicle", function(source, args, rawCommand)
RequestModel(`t20`);
while (not HasModelLoaded(`t20`)) do
Citizen.Wait(1);
end
local coords = GetEntityCoords(PlayerPedId());
local veh = CreateVehicle(`t20`, coords, 0.0, true, true);
SetEntityAsMissionEntity(veh, true);
print(IsEntityAMissionEntity(veh));
end, false)
Server
RegisterCommand("createAutoMobile", function(source, args, rawCommand)
local coords = GetEntityCoords(GetPlayerPed(source));
local veh = Citizen.InvokeNative(`CREATE_AUTOMOBILE`, `t20`, coords.x, coords.y, coords.z, 0.0, true, false);
end, false)
Video
Client
Server
Test Resource
test-entity.zip (1.4 KB)