fivem icon indicating copy to clipboard operation
fivem copied to clipboard

Doors created server side are falling trough the ground

Open BennoArnautovic opened this issue 3 months ago • 5 comments

What happened?

Hello,

When using CreateObjectNoOffset on the server side with the door flag set as "false" (doorFlag: False to create a door archetype (archetype flag bit 26 set) as a door. Required to be set to true to create door models in network mode.)

Code snippet below works as expected on cliend, but when creating on server, it falls trough the ground.

Expected result

For doors to be same as in client side.

Reproduction steps

--server side
RegisterCommand("door_test", function(source, args)
    local coords = GetEntityCoords(GetPlayerPed(source))
    local atm_object = CreateObjectNoOffset(1196685123, coords.x, coords.y, coords.z, true, true, false)
    Wait(1000)
end)

Importancy

Slight inconvenience

Area(s)

FiveM

Specific version(s)

Fivem: 20550 Server: b19826/Win

Additional information

No response

BennoArnautovic avatar Oct 07 '25 14:10 BennoArnautovic

do you have discord i want to ask you something can i

nthdev1110 avatar Oct 08 '25 04:10 nthdev1110

Have you tried setting game_enableDynamicDoorCreation to true in server.cfg? Ideally you just setr game_enableDynamicDoorCreation true

colistro123 avatar Oct 08 '25 09:10 colistro123

Have you tried setting game_enableDynamicDoorCreation to true in server.cfg? Ideally you just setr game_enableDynamicDoorCreation true

Yup, it is already in cfg. Client-side creation of doors works flawlessly, creating on the server, tho, does not work, regardless of what I do :D

BennoArnautovic avatar Oct 08 '25 09:10 BennoArnautovic

Have you tried setting game_enableDynamicDoorCreation to true in server.cfg? Ideally you just setr game_enableDynamicDoorCreation true

Yup, it is already in cfg. Client-side creation of doors works flawlessly, creating on the server, tho, does not work, regardless of what I do :D

If the initialized archetype doesn't have the door flag set, it won't be able to create the object as a door.

colistro123 avatar Oct 08 '25 10:10 colistro123

Have you tried setting game_enableDynamicDoorCreation to true in server.cfg? Ideally you just setr game_enableDynamicDoorCreation true

Yup, it is already in cfg. Client-side creation of doors works flawlessly, creating on the server, tho, does not work, regardless of what I do :D

If the initialized archetype doesn't have the door flag set, it won't be able to create the object as a door.

But, I assume that should already be covered by using CreateObjectNoOffset(1196685123, coords.x, coords.y, coords.z, true, true, false) (last bool determines if it is a door).

At least, that is covered when doing it client-side; it's the same native.

If it is not, then it defeats the purpose of creating objects server-side. If I have to do manual stuff with the owner client, then I might as well create a whole door object on the client side.

So, all in all, creating doors server-side does not set proper attributes for the object to be a door, which sounds to me like a bug :/

BennoArnautovic avatar Oct 08 '25 12:10 BennoArnautovic