[hlcoders] Finding the entity based on the userid

2004-12-20 Thread Josh
This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I was just wondering how I can get an entity or an index of the entity that is fired. Meaning the player_hurt event is fired and I get a userid of 2. Will this is different than the IndexOfEdict

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Ronny Schedel
The UserID can be accessed through the IPlayerInfo and the IPlayerInfoManager interfaces. Greets Ronny This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I was just wondering how I can get an entity or an index of the entity that is fired. Meaning the

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Marcelo Bezerra
You can look from 1 to maxplayers, get the pEntity and use: engine-GetPlayerUserId(pEntity); Loop from Josh wrote: This is a multi-part message in MIME format. -- [ Picked text/plain from multipart/alternative ] I was just wondering how I can get an entity or an index of the entity that is fired.

RE: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Josh
. They are different. Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid You can look from 1 to maxplayers, get the pEntity

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Pavol Marko
] To: [EMAIL PROTECTED] Sent: Monday, December 20, 2004 7:16 PM Subject: RE: [hlcoders] Finding the entity based on the userid OK all I have is the playerid (userid). How do I get a pointer to the entity having this userid? And I CANNOT use IndexOfEdict b/c that is a different number. For example, I

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Marcelo Bezerra
] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid You can look from 1 to maxplayers, get the pEntity and use: engine-GetPlayerUserId(pEntity); Loop from Josh wrote: This is a multi-part message

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Roy Laurie
I'm putting together a Type Conversions list for such. Everyone's welcome to add / edit. http://hl2-dev.com/wiki/index.php?pagename=SdkTypeConversions -- Roy Kylratix Laurie On 20 Dec 2004 at 18:20, Ronny Schedel wrote: The UserID can be accessed through the IPlayerInfo and the

RE: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Josh
think valve could create an easier way? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 2:46 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid for(int i=1;i

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread tei
: [hlcoders] Finding the entity based on the userid for(int i=1;i=maxplayers;i++) { edict_t *pEntity = engine-PEntityOfEntIndex(i); if(!pEntity || pEntity-IsFree()) { continue; } int uid = engine-GetPlayerUserId(pEntity

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Marcelo Bezerra
valve could create an easier way? Josh -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 2:46 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid for(int i=1;i=maxplayers;i

Re: [hlcoders] Finding the entity based on the userid

2004-12-20 Thread Roy Laurie
PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Marcelo Bezerra Sent: Monday, December 20, 2004 12:36 PM To: [EMAIL PROTECTED] Subject: Re: [hlcoders] Finding the entity based on the userid You can look from 1 to maxplayers, get the pEntity and use: engine-GetPlayerUserId(pEntity); Loop