Player of edict_t instance?

All other Source.Python topics and issues.
Tuck
Global Moderator
Posts: 205
Joined: Sat Jul 14, 2012 9:35 pm
Location: Copenhagen

Player of edict_t instance?

Postby Tuck » Sun Dec 02, 2012 12:14 am

How would i retrieve playerinfo from edict_t instance

i know i can do:

Syntax: Select all

IPlayerInfo = Player.GetPlayerInfoManager().GetPlayerInfo(entity)


But i seems messy?
-Tuck
User avatar
satoon101
Project Leader
Posts: 2697
Joined: Sat Jul 07, 2012 1:59 am

Postby satoon101 » Sun Dec 02, 2012 1:36 am

You actually just help me realize there was a bug in my players.helpers module. Once I fix that, you should be able to use:

Syntax: Select all

from players.helpers import playerinfo_from_edict

player = playerinfo_from_edict(edict)
Not sure why you think that seems "messy", though...

Satoon

Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 19 guests