Skip to content
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

Merged
merged 4 commits into from
May 23, 2021
Merged

Fix: Player ready stuff #241

merged 4 commits into from
May 23, 2021

Conversation

itschip
Copy link
Member

@itschip itschip commented May 21, 2021

Please come with some input.

@itschip itschip requested review from TasoOneAsia, jfrader, erik-sn and RockySouthpaw and removed request for TasoOneAsia May 21, 2021 22:01
@RockySouthpaw
Copy link
Contributor

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

@RockySouthpaw RockySouthpaw added Awaiting Code Review Awaiting code review. Awaiting Testing Awaiting in-game testing. labels May 22, 2021
resources/server/players/player.controller.ts Outdated Show resolved Hide resolved
if (config.general.enableMultiChar) {
on('onServerResourceStart', async (resource: string) => {
if (resource === GetCurrentResourceName()) {
// Workaround till https://github.com/citizenfx/fivem/pull/682
Copy link
Collaborator

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 })
   }
}

Copy link
Contributor

@RockySouthpaw RockySouthpaw left a 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.

@AvarianKnight
Copy link
Collaborator

All works fine 👍

@itschip itschip merged commit e05f543 into master May 23, 2021
@itschip itschip deleted the fix/player-ready branch May 23, 2021 13:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Code Review Awaiting code review. Awaiting Testing Awaiting in-game testing.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants