Example #1
0
 void BroadcastTeamChange(gclient_t client, team_t oldTeam)
 {
     switch (client.sess.sessionTeam)
     {
         case team_t.TEAM_FREE:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the battle.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_SPECTATOR:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the spectators.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_RED:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the ^1red^7 team.\n\"", client.pers.netname));
             break;
         case team_t.TEAM_BLUE:
             Server.Instance.SendServerCommand(null, string.Format("print \"{0}^7 joined the ^2blue^7 team.\n\"", client.pers.netname));
             break;
     }
 }
Example #2
0
 public void LocateGameData(sharedEntity[] gEnts, int entityCount, gclient_t[] clients)
 {
     sv.gentities = gEnts;
     //sv.gentities = new List<sharedEntity>();
     //for (int i = 0; i < gEnts.Count; i++)
     //{
     //    sv.gentities.Add(Game.Instance.GEntityToSharedEntity(gEnts[i]));
     //}
     sv.num_entities = entityCount;
     sv.gameClients = clients;
 }