HiddenID is not an id of a player. It is an index that you use in playersCT[] to get the id of the player.
Code:
a_players_id = playersCT[HiddenID]
is_user_connected(a_players_id)
etc.
Also, you can replace random_num(0, numCT-1) with random(numCT).
EDIT: I see that you did do it correctly in some places . . . did you copy paste this stuff?
__________________