-
Notifications
You must be signed in to change notification settings - Fork 2.5k
tweak(server/gamestate): CreatePed RPC & CreatePedServerSetter #3730
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
I think the ship has sailed on this one. We cannot change expected behavior, even if it's not obvious what this is doing, most users that use this know its not a RPC native, and switching it back to a RPC will lead to even more confusion. |
|
To add to Avarian's comment, this would very likely break compatibility for all existing scripts using CREATE_PED server-setters that depended on the ped creation to be done instantly and where the ped may not be assigned an owner yet as it has been since January 2021 4cbf129). It is also worth noting that it is documented that CREATE_PED and CREATE_OBJECT_NO_OFFSET RPC was deprecatedin favour of their equivalent server-setters. If you really need an CREATE_PED RPC, it would make more sense to make it a new native and clearly document that it is an RPC rather then being a server-setter, Along with removing the old fivem/ext/natives/rpc_spec_natives.lua Line 18 in 1c490ee
|
|
I agree with the points everyone has made. Changing the existing behavior now would definitely cause more problems than it solves, especially with so many scripts relying on the current server-setter behavior of CREATE_PED. My only concern was that there’s currently no alternative RPC native that uses a different name everything that exists is still tied to the original native names, so it felt inconsistent. But I understand why introducing breaking changes isn’t an option. How should I proceed? |
|
The answer is.. its complicated. You can add a new name to the entity_rpc but we would need a way to link it to the |
Can we just remove the CREATE_PED RPC since it's not used anymore? |
Goal of this PR
Allow the usage of CreatePed RPC and create CreatePedServerSetter. Currently, the documentation states that CreatePed is an RPC, but it actually is a server setter. By separating these natives, users gain finer control over which method they want to use for spawning peds.
How is this PR achieving the goal
This PR changes the ServerSetters code to separate 2 natives, the server setter and the RPC.
This PR applies to the following area(s)
FiveM, Server
Successfully tested on
Game builds: 3258
Platforms: Windows, Linux
Checklist
Fixes issues