One more player in team?
#1

Hi!


I wounder if there are anyway to add

AddPlayerClass to a team I just have 1

AddPlayerClass in every team.. How could I add more to a team/class ??..

I'm not full sure how to do becuase I haven't workt with just this "team system"
Before..

Abit of a code:

pawn Код:
public OnPlayerRequestClass( playerid, classid ) //  This is called when a player is on class selection
{
    switch ( classid )
    {
        case 0:
        {
            GameTextForPlayer( playerid, "~p~TEAM Clowns", 300, 3 );
            SetPlayerTeam( playerid, TEAM_ClOWNS);
            gTeam[playerid] = TEAM_ClOWNS; // Sets the player's team to TEAM_CLOWNS
        }

        case 1: // If the classid is 1
        {
            GameTextForPlayer( playerid, "~I~TEAM Hobos", 300, 3 );
            SetPlayerTeam( playerid, TEAM_HOBOS ); // Sets the player's team to TEAM_HOBOS
            gTeam[playerid] = TEAM_HOBOS;
        }

As I don't remember exactily what this team system is named so posted some code ^^ ...

Well maybe it's a mess with the explain.. Pretty hard to explain.. But I will try better if you don't understand.
Reply
#2

You mean you want more than 1 skins in 1 team?
Reply
#3

Just add as many players/skins you want and then adjust the cases in onplayerrequestclass.

For example..


AddPlayerClass(0, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
AddPlayerClass(1, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
AddPlayerClass(2, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0);
AddPlayerClass(3, 1958.33, 1343.12, 15.36, 269.15, 26, 36, 28, 150, 0, 0); // Four skins

pawn Код:
public OnPlayerRequestClass( playerid, classid ) //  This is called when a player is on class selection
{
    switch ( classid )
    {
        case 0, 1: // Two skins in Clowns
        {
            GameTextForPlayer( playerid, "~p~TEAM Clowns", 300, 3 );
            SetPlayerTeam( playerid, TEAM_ClOWNS);
            gTeam[playerid] = TEAM_ClOWNS; // Sets the player's team to TEAM_CLOWNS
        }

        case 2, 3: // Two skins in Hobos
        {
            GameTextForPlayer( playerid, "~I~TEAM Hobos", 300, 3 );
            SetPlayerTeam( playerid, TEAM_HOBOS ); // Sets the player's team to TEAM_HOBOS
            gTeam[playerid] = TEAM_HOBOS;
        }
Reply
#4

Oh I see!, thanks alot!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)