Help! How do I get the index of a monoArray?

·҉ dollaz·҉. .

Approved iModder
Original poster
Approved iModder
Mar 26, 2021
159
1,819
193
Somewhere
I was trying to make an ImGui playerlist, and I have the player list printing. I just don't know how to get the index of an item in the array to select, so that whatever I do only happens to that one player.
 

DigitalKnight

Approved Modder
Approved Modder
Jul 31, 2018
185
11,011
1,193
23
Within the Heart
Maybe find a field inside the player instance that points to the particular player such as name or id etc. Then loop through the array and check each instance for the value till you find it, then return the index. You would need to create a custom function