-
-
Notifications
You must be signed in to change notification settings - Fork 274
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
Fix: Player ready stuff #241
Conversation
How exactly would you like this tested? I see there is esx code to be commented out. I can test on a non multichar/non esx build, plume and then plume + kash if these are all needed. will be some hours though |
if (config.general.enableMultiChar) { | ||
on('onServerResourceStart', async (resource: string) => { | ||
if (resource === GetCurrentResourceName()) { | ||
// Workaround till https://github.com/citizenfx/fivem/pull/682 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe do a export here (though I don't know if this is valid in TS/JS
const framework: {} = exp[config.framework.name].[config.framework.getter]()
const onlinePlayers: string[] = getPlayers()
for (const id of onlinePlayers) {
const source: Number = parseInt(id)
const Player = framework.[config.framework.playerGetter](parseInt(id))
if (Player) {
const identifier = Player.[config.framework.identifierGetter]()
const firstname = Player.[config.framework.nameGetter]()
await PlayerService.handleNewPlayerEvent({ source, identifier, firstname })
}
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested with config set to false and on a non esx server. Worked fine.
Tested with config set to false and plume esx. Worked fine.
Tested with config set to true and plume esx. Worked fine.
All works fine 👍 |
Please come with some input.