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

server.HasPlayerNamed() doesn't like certain names. #34

Open
Syntaxxor opened this issue Dec 19, 2021 · 2 comments
Open

server.HasPlayerNamed() doesn't like certain names. #34

Syntaxxor opened this issue Dec 19, 2021 · 2 comments

Comments

@Syntaxxor
Copy link

I'm using server.HasPlayerNamed() in my plugin. When a user named Hazmat used it, the result was always false. When I replaced it with a custom little loop over all the player controllers and their names, comparing the names and seeing if any matched, that worked. This does happen with other names too, though I'm waiting for feedback on what names do it there. I will edit this post to add any further names as I find them.

TO REPRODUCE:
Use server.HasPlayerNamed() to check if a player in the server is named Hazmat, and set your name to the same. It will return false.

KNOWN PROBLEM NAMES:

  • Hazmat
  • Legend
  • Raid (I think)
@Martinii89
Copy link

The internal game function it wraps might be broken. I suggest you rather iterate the PRIS and check their names yourself

@Syntaxxor
Copy link
Author

The internal game function it wraps might be broken. I suggest you rather iterate the PRIS and check their names yourself

That's what I ended up doing instead, but I figured I'd report it here as well in case there's some easy fix.

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

No branches or pull requests

2 participants