citizenfx / fivem

The source code for the Cfx.re modification frameworks, such as FiveM, RedM and LibertyM, as well as FXServer.
https://cfx.re/
3.56k stars 2.1k forks source link

Disable Entity Attach #2442

Open Yvelttt opened 7 months ago

Yvelttt commented 7 months ago

What happened?

Hello ! I wanted to know if there was a way to block the attachment of one entity to another? Let me explain. Malicious people with external software have fun attaching vehicles to players, (with the native ATTACH_ENTITY_TO_ENTITY) if they have the misfortune of being in a car, it makes them fly into the air. And if he's on foot, vehicles are just hanging off him. Do you have a solution for this? Thanks.

Expected result

https://docs.fivem.net/natives/?_0x6B9BBD38AB0796DF

Reproduction steps

https://docs.fivem.net/natives/?_0x6B9BBD38AB0796DF

Importancy

Security issue

Area(s)

FiveM

Specific version(s)

6464

Additional information

No response

tens0rfl0w commented 7 months ago

Isn't https://docs.fivem.net/docs/server-manual/server-commands/#sv_filterrequestcontrol-mode exactly what you're looking for?

FabianTerhorst commented 7 months ago

I think he wants to prevent attaching a vehicle to a player, even when the person triggering the attach is already the owner of the vehicle.

Yvelttt commented 7 months ago

I think he wants to prevent attaching a vehicle to a player, even when the person triggering the attach is already the owner of the vehicle.

I want to block the attachment of a vehicle yes. When he attaches the vehicle he has control, so there's no point in blocking that. I would like to block the act of attaching a vehicle. Or even have a trigger and then ban it regardless. just something to be able to protect my server against this

FabianTerhorst commented 7 months ago

Afaik there is no way yet to intercept the attach node update from the owner. But this is something we might look into in the future.

Yvelttt commented 7 months ago

Afaik there is no way yet to intercept the attach node update from the owner. But this is something we might look into in the future.

That would be great, because we make the servers do crazy things thanks to that, make people steal etc.. some people get kicked for anti noclip on my server for example, it's annoying