Search
Username:
Password:
Register or Reset Password
Remove the ads!
  
Search Threads:           Advanced
 
 
 
 
 
Creating teams
Help with creating teams
Posted 5 months ago
SHADOW- KILLER .
would saying "F*K YOU" be unprofesional?
0
Replies
148
Views
0
Favorites
Undefined
Class (?)
Closed
For my mod of hl2deathmatch mod i wanted to add teams so i follow a tutorial found here: http://developer.valvesoftware.com/wiki/Creating_teams

i followed it to every last point but in the end only 1 function give me the problem

bool CBasePlayer::ClientCommand(const char *cmd)
{
if ( stricmp( cmd, "jointeam" ) == 0 ) //start jointeam
{
if ( args.ArgC() < 2 )
return true;

int team = atoi( args.Arg(1) );

//don't do anything if you join your own team
if ( team == GetTeamNumber() )
return true;

//auto assign if you join team 0
if ( team == 0 )
{
if ( g_Teams[TEAM_COMBINE]->GetNumPlayers() > g_Teams[TEAM_REBELS]->GetNumPlayers() )
team = TEAM_REBELS;
else
team = TEAM_COMBINE;
}

if ( !IsDead() )
{
if ( GetTeamNumber() != TEAM_UNASSIGNED )
{
CommitSuicide();
IncrementFragCount(1); //adds 1 frag to balance out the 1 subtracted for killing yourself
}
}

ChangeTeam( team );

return true;
}



I get 7 errors from it found bellow

1>.\player.cpp(5612) : error C2065: 'args' : undeclared identifier
1>.\player.cpp(5612) : error C2228: left of '.ArgC' must have class/struct/union
1> type is ''unknown-type''
1>.\player.cpp(5615) : error C2228: left of '.Arg' must have class/struct/union
1> type is ''unknown-type''
1>.\player.cpp(5624) : error C2065: 'TEAM_COMBINE' : undeclared identifier
1>.\player.cpp(5624) : error C2227: left of '->GetNumPlayers' must point to class/struct/union/generic type
1>.\player.cpp(5624) : error C2065: 'TEAM_REBELS' : undeclared identifier
1>.\player.cpp(5624) : error C2227: left of '->GetNumPlayers' must point to class/struct/union/generic type
Image and video hosting by TinyPic
None Found
Assess Thread
This feature is unavailable because the page is locked
Stamps
No stamps recorded
StampIt
Is this thread particularly good or bad in one or more areas? Stamp it!
This feature is unavailable because the page is locked
Share It!
Get HTML Code
Get BBCode
Tell a Friend
Posters Summary
No posts found
Thread Stats on SHADOW- KILLER .
Submissions: 30
Total Views: 7,954
Total Feedback: 188 posts
Average Rating: -
Unrated Threads: 30
Total Favs: 1
First Submission: 2 years ago
Latest Submission: 1 month ago
Favorite Category: HL2 > Mods (10 threads)
Save It
This feature is unavailable because the page is locked