View Single Post
  #3  
Old 01-10-2012, 08:03 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Can't work in your ScrimBase.cs
GamePlay.gpRemotePlayers() has no Army() - member.
If you use GamePlay.gpRemotePlayers() you get a player Array.

AiPlayer[] players = GamePlay.gpRemotePlayers();

so you can use foreach and if-clause to look for the players Army

or

you can copy it in a List

List<Player> players = new List<Player>();

if (GamePlay.gpPlayer() != null)
players.Add(GamePlay.gpPlayer()); // to get the host-player in single or normal hosted multiplayer or the server on dedicated server
if (GamePlay.gpRemotePlayers() != null)
players.AddRange(GamePlay.gpRemotePlayers());

then you can use
if (players.Exists(item => item.Army() == Army))
{


}

Last edited by FG28_Kodiak; 01-10-2012 at 08:16 AM.
Reply With Quote