Two gTeams
#1

is it possible to create another 'gTeam' ?? If so, how can i do it (create the team and define the 'subteams')
Reply
#2

Quote:
Originally Posted by Douglas_prt
Посмотреть сообщение
is it possible to create another 'gTeam' ?? If so, how can i do it (create the team and define the 'subteams')
The following is an example of the teams )

pawn Код:
#define TEAM_ONE    (1)
#define TEAM_TWO    (2)
#define TEAM_THREE  (3)

// and so on

SetPlayerTeam( playerid, TEAM_ONE ); // you can use TEAM_ONE, TEAM_TWO or TEAM_THREE as the team id

// now for getting the team name you can do somethign like this:

stock GetTeamName( teamid )
{
    new szStr[ 24 ];
    switch( teamid )
    {
        case TEAM_ONE:
        {
            format( szStr, sizeof( szStr ), "Team Name ONE" ); // change the name
        }
        case TEAM_TWO:
        {
            format( szStr, sizeof( szStr ), "Team Name TWO" ); // change the name
        }
        case TEAM_THREE:
        {
            format( szStr, sizeof( szStr ), "Team Name THREE" ); // change the name
        }
        // and so on
    }
    return szStr;
}

CMD:myteam( playerid, params[ ] ) // example of GetTeamName function
{
    new sz_bStr[ 30 ];
    format( sz_bStr, sizeof( sz_bStr ), "My team is: %s", GetTeamName( GetPlayerTeam( playerid ) ) );
    SendClientMessage( playerid, -1, sz_bStr );
    return 1;
}
I made what I understood, if that's not what you want then please explain well :/
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)