Re: [hlcoders] Respawning all players

2005-02-23 Thread Teddy
If you're using Andre's example code, the bit that freezes the player is:
player-SetMoveType(MOVETYPE_NONE);

either remove that, or once the player is spawned and you wanna
unfreeze them, use:
player-SetMoveType(MOVETYPE_WALK)


On Tue, 22 Feb 2005 16:08:41 -0800, Daniel Jennings [EMAIL PROTECTED] wrote:
 Do you ever unfreeze the player? Or is that something that's automatically
 done?

 Thank you,
 Daniel Jennings

 - Original Message -
 From: Andre Bandarra [EMAIL PROTECTED]
 To: hlcoders@list.valvesoftware.com
 Sent: Monday, February 21, 2005 5:22 AM
 Subject: Re: [hlcoders] Respawning all players

  I use this one
 
  for ( int i = 0 ; i = gpGlobals-maxClients ; i++ )
  {
  CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i);
  if ( player )
  {
  player-RemoveAllAmmo(); //Removes all ammo
  player-RemoveAllDecals();//Removes All decals from the player model
  player-Spawn(); //Spawns the player
  player-SetMoveType(MOVETYPE_NONE);//freezes the player
  //now we have to cycle through all the players weapons
  for ( int j = 0 ; jplayer-WeaponCount() ; j++)
  {
  CBaseCombatWeapon *pweapon = player-GetWeapon(j);
  if (pweapon)
  pweapon-Delete();//removes this weapon from the game;
  }
  }
  }
 
 
  On Sun, 20 Feb 2005 14:42:46 -0500, Lance Vorgin [EMAIL PROTECTED]
 wrote:
   static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ?
  
   ___
   To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
 
  ___
  To unsubscribe, edit your list preferences, or view the list archives,
 please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 
 

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Respawning all players

2005-02-23 Thread Andre Bandarra
I use this code because i am making a round based game which has a
intermission between rounds. So, i respawn the players at the
beginning of the intermission an freeze them. I unfreeze them once the
round starts.

André


On Wed, 23 Feb 2005 20:34:49 +1000, Teddy [EMAIL PROTECTED] wrote:
 If you're using Andre's example code, the bit that freezes the player is:
 player-SetMoveType(MOVETYPE_NONE);

 either remove that, or once the player is spawned and you wanna
 unfreeze them, use:
 player-SetMoveType(MOVETYPE_WALK)


 On Tue, 22 Feb 2005 16:08:41 -0800, Daniel Jennings [EMAIL PROTECTED] wrote:
  Do you ever unfreeze the player? Or is that something that's automatically
  done?
 
  Thank you,
  Daniel Jennings
 
  - Original Message -
  From: Andre Bandarra [EMAIL PROTECTED]
  To: hlcoders@list.valvesoftware.com
  Sent: Monday, February 21, 2005 5:22 AM
  Subject: Re: [hlcoders] Respawning all players
 
   I use this one
  
   for ( int i = 0 ; i = gpGlobals-maxClients ; i++ )
   {
   CBasePlayer *player = (CBasePlayer *)UTIL_PlayerByIndex(i);
   if ( player )
   {
   player-RemoveAllAmmo(); //Removes all ammo
   player-RemoveAllDecals();//Removes All decals from the player model
   player-Spawn(); //Spawns the player
   player-SetMoveType(MOVETYPE_NONE);//freezes the player
   //now we have to cycle through all the players weapons
   for ( int j = 0 ; jplayer-WeaponCount() ; j++)
   {
   CBaseCombatWeapon *pweapon = player-GetWeapon(j);
   if (pweapon)
   pweapon-Delete();//removes this weapon from the game;
   }
   }
   }
  
  
   On Sun, 20 Feb 2005 14:42:46 -0500, Lance Vorgin [EMAIL PROTECTED]
  wrote:
static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ?
   
___
To unsubscribe, edit your list preferences, or view the list archives,
  please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders
   
   
  
   ___
   To unsubscribe, edit your list preferences, or view the list archives,
  please visit:
   http://list.valvesoftware.com/mailman/listinfo/hlcoders
  
  
  
 
  ___
  To unsubscribe, edit your list preferences, or view the list archives, 
  please visit:
  http://list.valvesoftware.com/mailman/listinfo/hlcoders
 
 

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Respawning all players

2005-02-21 Thread Andre Bandarra
I use this one

for ( int i = 0 ; i = gpGlobals-maxClients ; i++ )
{
CBasePlayer *player = (CBasePlayer 
*)UTIL_PlayerByIndex(i);
if ( player )
{
player-RemoveAllAmmo(); //Removes all ammo
player-RemoveAllDecals();//Removes All decals 
from the player model
player-Spawn();
//Spawns the player
player-SetMoveType(MOVETYPE_NONE);//freezes 
the player
//now we have to cycle through all the players 
weapons
for ( int j = 0 ; jplayer-WeaponCount() ; j++)
{
CBaseCombatWeapon *pweapon = 
player-GetWeapon(j);
if (pweapon)
pweapon-Delete();//removes 
this weapon from the game;
}
}
}


On Sun, 20 Feb 2005 14:42:46 -0500, Lance Vorgin [EMAIL PROTECTED] wrote:
 static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ?

 ___
 To unsubscribe, edit your list preferences, or view the list archives, please 
 visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



[hlcoders] Respawning all players

2005-02-20 Thread Knifa
Hi all.
How would I go about respawning ALL of the players on a server?
I'm thinking I'd need to loop through them, but I don't know.
Thanks.
-Knifa
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


Re: [hlcoders] Respawning all players

2005-02-20 Thread Daniel Jennings
Which code are you working with? HL2MP blank, HL2DM, or a Server Plugin?

- Original Message -
From: Knifa [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Sunday, February 20, 2005 10:13 AM
Subject: [hlcoders] Respawning all players


 Hi all.

 How would I go about respawning ALL of the players on a server?
 I'm thinking I'd need to loop through them, but I don't know.

 Thanks.

 -Knifa

 ___
 To unsubscribe, edit your list preferences, or view the list archives,
please visit:
 http://list.valvesoftware.com/mailman/listinfo/hlcoders





___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



Re: [hlcoders] Respawning all players

2005-02-20 Thread Knifa
HL2DM:
Which code are you working with? HL2MP blank, HL2DM, or a Server Plugin?
- Original Message -
From: Knifa [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Sunday, February 20, 2005 10:13 AM
Subject: [hlcoders] Respawning all players


Hi all.
How would I go about respawning ALL of the players on a server?
I'm thinking I'd need to loop through them, but I don't know.
Thanks.
-Knifa
___
To unsubscribe, edit your list preferences, or view the list archives,

please visit:

http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



--
Knifa
Domino Mod
http://knd.org.uk/dominomod/
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


Re: [hlcoders] Respawning all players

2005-02-20 Thread Knifa
Nevermind. Got it now.
   CBaseEntity *pEntity = NULL;
   while ((pEntity = gEntList.FindEntityByClassname( pEntity, player
)) != NULL)
   {
   pEntity-Spawn();
   }
Like that.
How would I strip the weapons from the player?
HL2DM:
Which code are you working with? HL2MP blank, HL2DM, or a Server Plugin?
- Original Message -
From: Knifa [EMAIL PROTECTED]
To: hlcoders@list.valvesoftware.com
Sent: Sunday, February 20, 2005 10:13 AM
Subject: [hlcoders] Respawning all players


Hi all.
How would I go about respawning ALL of the players on a server?
I'm thinking I'd need to loop through them, but I don't know.
Thanks.
-Knifa
___
To unsubscribe, edit your list preferences, or view the list archives,

please visit:

http://list.valvesoftware.com/mailman/listinfo/hlcoders



___
To unsubscribe, edit your list preferences, or view the list
archives, please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders



--
Knifa
Domino Mod
http://knd.org.uk/dominomod/
___
To unsubscribe, edit your list preferences, or view the list archives,
please visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


--
Knifa
Domino Mod
http://knd.org.uk/dominomod/
___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders


Re: [hlcoders] Respawning all players

2005-02-20 Thread Lance Vorgin
static_castCBasePlayer*(pEntity)-RemoveAllItems(false); ?

___
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders