| Author | Message | 
	
		| pixelsoft Seasoned Helper
 
  
 Age:39
 Gender:
  Joined: Apr 15 2003
 Posts: 154
 Location: Vienna
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sat May 24, 2003 10:26 am     Post subject: timer starting |  |   |  |  
				| 
 |  
				| hey, can u tell me the code, how to start a timer (i already have a countdown[0]...), when there are 2 players playing(not speccing!!)? _________________
 i don't have anything important to say
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Server Help Squatter
 
  
 Gender:
  Joined: Jan 11 2003
 Posts: 571
 Location: Germany
 Offline
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| pixelsoft Seasoned Helper
 
  
 Age:39
 Gender:
  Joined: Apr 15 2003
 Posts: 154
 Location: Vienna
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sat May 24, 2003 12:28 pm     Post subject: |  |   |  |  
				| 
 |  
				| thank you... but is this spawn.cpp or spawn.h ?
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| k0zy Server Help Squatter
 
  
 Gender:
  Joined: Jan 11 2003
 Posts: 571
 Location: Germany
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sat May 24, 2003 5:52 pm     Post subject: |  |   |  |  
				| 
 |  
				| Theres no such code in spawn.h   
 Bob Dole.. Bob Dole... Bob Dole...... bob dole.... bob... dole....
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| ExplodyThingy Server Help Squatter
 
 
 Age:38
 Gender:
  Joined: Dec 15 2002
 Posts: 528
 Location: Washington DC
 Offline
 
 | 
			
			  | 
				
					|  Posted: Sun May 25, 2003 8:55 pm     Post subject: |  |   |  |  
				| 
 |  
				| Or if you want, just do this, its how i would do it. 
 spawn.h;
 
 	| class botInfo
{
 int SpecPop;
 void CountSpec();
 }
 | 
 
 spawn.cpp;
 
 	| void botInfo::CountSpec()
{
 SpecPop=0;
 _listnode <Player> * parse = playerlist->head;
 Player *p = parse->item;
 while (parse)
 {
 if (p->ship == SHIP_Spectate)
 //Or, if you want to count the FREQ not SHIP
 //if(p->team == /*spec freq*/)
 //put em together to ignore staff like me who play on the spec freq to talk.
 SpecPop++;
 parse = parse->next;
 }
 }
 | 
 
 
 Call it on EVENT_PlayerShip, EVENT_PlayerSpec, EVENT_PlayerEnter, and EVENT_PlayerExit.  That would re-poll the entire arena every time, as a sort of double check.   And in the EVENT_ArenaEnter and EVENT_ArenaLeave, for when the bot moves/spawns.
 
 Added code tags -MGB
 _________________
 There are no stupid question, but there are many inquisitive idiots.
 Loot
 
 Dr Brain> I hate clean air and clean water. I'm a member of Evil Conservitive Industries
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  |