1. I am trying to the get the BasePlayer of a random player.

    The problem is not getting the BasePlayer, the problem is making it random.

    I thougt maybe something like this
    Code:
    int playeraleatorio;
                playeraleatorio = UnityEngine.Random.Range(0, BasePlayer.activePlayerList.Count);
                PrintToChat(playeraleatorio);
    But that will give a number. Maybe looping through all players, but I don't know.

    I am not asking for someone to make the code, I am asking for an idea.

    Thanks.
    [DOUBLEPOST=1465953696][/DOUBLEPOST]Solved.
    Code:
            BasePlayer GetRandomPlayer() => BasePlayer.activePlayerList[UnityEngine.Random.Range(0, BasePlayer.activePlayerList.Count - 1)];
    
    That code is from RGive. It works, but I don't know why there is a "-1" at the end.
     
  2. Because the first list entry's index number is 0 where as the count starts with 1