title.jpg (14569 bytes)

frags.gif (1518 bytes) Forcing Teams frags.gif (1518 bytes)

Up ] SplatFest News ] SplatFest Project ] Downloads ] Contacts ] Mapping Tutorials ] Texture Tutorials ] Other Site Links ] Free Web based E-Mail ] Send Us Feedback ] Home Page ]

Home
Adding A Timer
Adding trails to bullets
Air Blaster
Alternate Fire
Backpacks
Bindable +/- Aliases
Bouncing Plasma
Cluster Grenades
Creating Classes
Forcing Teams
Grapping Hook
How to Use the +/- Button Method
Looking Around After Death
Lowering Weapon Switch Time
Player Speeds Vs. Weapons
Railgun Colors
Remote Detonation Pipe Bombs
Renable the Save/Load Menu
Rocket Bounce
Sniper Zoom
Team Stats
Teleporting Plasma Gun
Vampire Mod
Vunlerable Missles

e_l.jpg (1811 bytes) e_r.jpg (1821 bytes)

Back ] Next ]

frags.gif (1518 bytes) Forcing Teams! frags.gif (1518 bytes)

   Tutorial by Gerbil!

This tutorial will make it so anyone joining a team or ctf game will automatically be assigned to the team with fewer players.

Open g_client.c and goto line 695 in the ClientConnect function. Add the following line of code:

  
int team;
 


Move down to about line 747 and change this function:

 
	if ( g_gametype.integer >= GT_TEAM &&
		client->sess.sessionTeam != TEAM_SPECTATOR ) {
		BroadcastTeamChange( client, -1 );
	}


so it looks like this:

  

	if ( g_gametype.integer >= GT_TEAM )
	{
		team = PickTeam(clientNum);
		client->sess.sessionTeam = team;
		BroadcastTeamChange(client, team);
	}
 


This calls the PickTeam function wich returns the team number of the team with fewer players. client->sess.sessionTeam = team; makes sure the player is assigned to the team returned by PickTeam;

e_l.jpg (1811 bytes) e_r.jpg (1821 bytes)

 

Quake III Arena is a trade mark of ID Software

Get ZZN