number LT_player_index(number user)
|number||user||The user index (0 to LT_player_count()-1) to get entity index for|
SERVER This has no effect if performed on the client (but will work in single player)
Returns the entity index for one of the players in the current game. In single player the only valid user index is 0 and it will always return the current player's entity index. When running on the server, users 0 through one less than the value returned by LT_player_count() are valid. For example, if there are 5 players, you can pass the values 0 through 4 to this function. Passing 2 as the user index will get the third player's entity index. Remember, both user index and entity index values are only safe to use within the same frame, do not rely on saving any of these values.