Skip to content

feat(es_extended): Add isNew state to Player stateBag on playerLoaded#1709

Merged
Kenshiin13 merged 3 commits intoesx-framework:devfrom
MrSne7aky:MrSne7aky-patch-1
Aug 23, 2025
Merged

feat(es_extended): Add isNew state to Player stateBag on playerLoaded#1709
Kenshiin13 merged 3 commits intoesx-framework:devfrom
MrSne7aky:MrSne7aky-patch-1

Conversation

@MrSne7aky
Copy link
Copy Markdown
Contributor

@MrSne7aky MrSne7aky commented Aug 22, 2025

Description

Add isNew state to Player stateBag on playerLoaded


Usage Example

local playerServerId = GetPlayerServerId(PlayerId())
print(Player(playerServerId).state.isNew)

PR Checklist

  • My commit messages and PR title follow the Conventional Commits standard.
  • My changes have been tested locally and function as expected.
  • My PR does not introduce any breaking changes.
  • I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.

Stores the isNew flag in the player's stateBag on server. 
On the client, you can get it like this:
```
 print(Player(source).state.isNew)
```

- [x]  My commit messages and PR title follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) standard.
- [x]  My changes have been tested locally and function as expected.
- [x]  My PR does not introduce any breaking changes.
- [x]  I have provided a clear explanation of what my PR does, including the reasoning behind the changes and any relevant context.
@Kenshiin13
Copy link
Copy Markdown
Contributor

I don't think this is something we should sync across players.

@MrSne7aky
Copy link
Copy Markdown
Contributor Author

I don't think this is something we should sync across players.

No problem, I set it to false

Copy link
Copy Markdown
Contributor

@Kenshiin13 Kenshiin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

Copy link
Copy Markdown
Contributor

@Kenshiin13 Kenshiin13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks

@Kenshiin13 Kenshiin13 changed the base branch from main to dev August 23, 2025 17:38
@Kenshiin13 Kenshiin13 merged commit 201043e into esx-framework:dev Aug 23, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants