This example is good. The player who typed the command /lol set the value example to 10 for his ID.
-If I'm a player ID 9 and I type the command /lol, so example[9] = 10.
So when a player disconnect you need to reset the variable (by player's id).
I hope you understand this.