Initial upload
Initial upload.
This commit is contained in:
56
_module/nss/eternal_inc.nss
Normal file
56
_module/nss/eternal_inc.nss
Normal file
@@ -0,0 +1,56 @@
|
||||
// good = 1, evil = 2
|
||||
|
||||
void AddPlayerToTeam( int nTeam, object oPlayer )
|
||||
{
|
||||
// int nNumPlayers, nCount;
|
||||
// string sAreaTag;
|
||||
// object oArea;
|
||||
//
|
||||
// nNumPlayers = GetTeamData(nTeam,TEAM_NUM_PLAYERS);
|
||||
//
|
||||
SetLocalInt(oPlayer,"m_nTeam",nTeam);
|
||||
//
|
||||
// SetTeamData(nTeam,TEAM_NUM_PLAYERS,nNumPlayers + 1);
|
||||
//
|
||||
// // Signal an event to each team's HQ to add a counter
|
||||
// // for the number of players on a team.
|
||||
// for ( nCount = 0; nCount < GetMaxTeams(); nCount++ )
|
||||
// {
|
||||
// sAreaTag = "Team_" + IntToString(nCount) + "_HQ";
|
||||
// oArea = GetObjectByTag(sAreaTag);
|
||||
//
|
||||
// if ( GetIsObjectValid(oArea) == TRUE )
|
||||
// {
|
||||
// SignalEvent(oArea,EventUserDefined(EVENT_ADD_PLAYER_TO_TEAM + nTeam));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// Loop through all other players in the game
|
||||
// and set up the likes/dislikes appropriately.
|
||||
object oPC;
|
||||
|
||||
oPC = GetFirstPC();
|
||||
while ( GetIsObjectValid(oPC) == TRUE )
|
||||
{
|
||||
if ( oPC != oPlayer )
|
||||
{
|
||||
if ( GetPlayerTeam(oPC) == nTeam )
|
||||
{
|
||||
SetPCLike(oPlayer,oPC);
|
||||
SetPCLike(oPC,oPlayer);
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// SetPCDislike(oPlayer,oPC);
|
||||
// SetPCDislike(oPC,oPlayer);
|
||||
// }
|
||||
}
|
||||
|
||||
oPC = GetNextPC();
|
||||
}
|
||||
}
|
||||
|
||||
int GetPlayerTeam( object oPlayer )
|
||||
{
|
||||
return GetLocalInt(oPlayer,"m_nTeam");
|
||||
}
|
||||
Reference in New Issue
Block a user