AFAIK, the userid increments with every player joined. So after 2 maps, a player might have userid 60 or something. If there isn't a function to get the entity index from the userid, you could loop from 1 to maxplayers (passed to ServerActivate), call the function that gets userid from player entity index (it's in the engine interface), and compare the result of the function to your userid. Then, you can call PEntFromIndex on it.
I may be wrong though :)
PM ----- Original Message ----- From: "Roy Laurie" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 19, 2004 2:59 AM Subject: [hlcoders] (from Plugin) Retrieving a edict_t* from UserID
I had assumed that IVGameEngine::PEntFromIndex(int) would do the trick. However, when debugging, even as the userid is currently valid, the formentioned function returns what would seem a blank entity. So two questions arise...
1) Are not the userid and engine entity index the same?
2) Most importantly, what other options are there for retrieving the associated edict_t* - without- doing the obvious and storing it for later use from whichever function might provide it.
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders
_______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders

