Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

How to get user entity? #7

Closed
npabisz opened this issue Nov 30, 2016 · 2 comments
Closed

How to get user entity? #7

npabisz opened this issue Nov 30, 2016 · 2 comments

Comments

@npabisz
Copy link

npabisz commented Nov 30, 2016

So how can I get DT_BasePlayer based on userinfo table data? Is there corresponding field I should look for? Since I cant find steam id in DT_BasePlayer.

@saul
Copy link
Owner

saul commented Nov 30, 2016

What are you trying to do? Userinfo table has steam ID.

If you have a userinfo entry and want to get the player entity (DT_BasePlayer), do demo.entities.entities[userinfoIndex + 1]. It is always the case that the entity for a particular userinfo is the same index + 1. Userinfo 0 is the first player, entity index 1 is the first player.

The corollary is also true - if you want to get the userinfo for a player, look at the entity.index - 1 entry in the userinfo string table.

@npabisz
Copy link
Author

npabisz commented Dec 1, 2016

Thats great, just wanted to combine these two datas so I could identify player entities based on steam id since I'm making demo parser to extract some useful data :)

@npabisz npabisz closed this as completed Dec 1, 2016
@saul saul reopened this Feb 28, 2021
@saul saul closed this as completed Feb 28, 2021
Repository owner locked and limited conversation to collaborators Feb 28, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

2 participants