![]() |
#39
|
|||
|
|||
![]()
Can you test these please, i ve made some rework meanwhile:
Code:
private void sendScreenMessageTo(int army, string msg, params object[] args) { List<Player> Consignees = new List<Player>(); if (GamePlay.gpPlayer() != null) Consignees.Add(GamePlay.gpPlayer()); if (GamePlay.gpRemotePlayers() != null) Consignees.AddRange(GamePlay.gpRemotePlayers()); if (army == -1) GamePlay.gpHUDLogCenter(null, msg, args); else if (Consignees.Exists(item => item.Army() == army)) GamePlay.gpHUDLogCenter(Consignees.FindAll(item => item.Army() == army).ToArray(), msg, args); } private void sendChatMessageTo(int army, string msg, params object[] args) { List<Player> Consignees = new List<Player>(); if (GamePlay.gpPlayer() != null) Consignees.Add(GamePlay.gpPlayer()); if (GamePlay.gpRemotePlayers() != null) Consignees.AddRange(GamePlay.gpRemotePlayers()); if (army == -1) GamePlay.gpLogServer(null, msg, args); else if (Consignees.Exists(item => item.Army() == army)) GamePlay.gpLogServer(Consignees.FindAll(item => item.Army() == army).ToArray(), msg, args); } example int redpoints =10; int bluepoints =20; sendScreenMessageTo(-1, "Red have {0} Points / Blue: {1} Points", redpoints, bluepoints); or use it without sendScreenMessageTo(-1, "Welcome to our Server"); Last edited by FG28_Kodiak; 01-12-2012 at 01:10 PM. |
Thread Tools | |
Display Modes | |
|
|