citizenfx / natives

GTA V Natives Documentation
https://docs.fivem.net/natives/
302 stars 1.92k forks source link

Server setters tagged as RPC #1155

Closed spacevx closed 3 months ago

spacevx commented 3 months ago

On the native website, CREATE_PED and CREATE_OBJECT_NO_OFFSET are tagged as RPC natives but those aren't RPC natives anymore, because of this a lot of people are not aware those server setters exist

AvarianKnight commented 3 months ago

While this should be considered a bug, this is done intentionally.

The server registers these as RPC natives, but will specifically exclude them from the RPC registration so they will get registered properly as server natives.

https://github.com/citizenfx/fivem/blob/ecd511b7f05629ff09765cd397ad2e15a69854de/ext/natives/rpc_spec_natives.lua#L86 https://github.com/citizenfx/fivem/blob/ecd511b7f05629ff09765cd397ad2e15a69854de/ext/natives/rpc_spec_natives.lua#L18

https://github.com/citizenfx/fivem/blob/ecd511b7f05629ff09765cd397ad2e15a69854de/code/components/citizen-server-impl/src/state/ServerRPC.cpp#L135-L138

Given this is outside the scope of the repository I'm going to close this, you should make a issue on the fivem repo for this.