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

FindByUserid function not working #3

Open
zurgerking091 opened this issue Aug 30, 2021 · 1 comment
Open

FindByUserid function not working #3

zurgerking091 opened this issue Aug 30, 2021 · 1 comment

Comments

@zurgerking091
Copy link

I've been working on trying to get this function to work for awhile now and still can't get it to work,
After passing userid from player_hurt, which seems to work, I get all the players and bots in the game and their scopes, but after lots of debugging I found out that this is the problem
if (("userid" in scope) && scope.userid == userid) { return ent; }
Neither of the statements passed through this if statement are true.

@birjj
Copy link
Owner

birjj commented Aug 30, 2021

Sounds like the user IDs are never being collected. Have you followed the instructions in the comment at the top of players.nut and added an event listener for player_use? If you change Log to printl in this line do you start seeing the message "[Players] Got player ... for userid ..." in console when a new player joins?

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