Latest stable CitizenFxCore.Client nuget package issue

Latest stable version of citizenFXcore.Client nuget package for C# has playerList Class but it does not have default constructor with 0 arguments . However CitizenFxCore has this PlayerList class with required constructor.
Because of this mismatch I am not able to move forward. Can anyone provide workaround for this issue or fix the original Nuget Package.

same issue for me too

Not an ‘issue’, you’re not supposed to construct PlayerList from user code, use BaseScript's Players property.

Why isn’t Players a static property? It doesn’t seem to have have side effects since it’s just calling natives. It would be nice to access a single BaseScripts’s Players without making an instance of BaseScript for every class that interacts with Players.

Because changing this would break both source and binary compatibility, and nobody had this need initially.

You do know you can just expose a single BaseScript as a singleton somewhere, right?

Is it possible to create a BaseScpirt singleton to access the protected parameters (as Players, EventHandlers an more) by reference? It doesn’t work for me.

1 Like