Team ???
#10

Quote:
Originally Posted by Berlovan
Посмотреть сообщение
pawn Код:
forward SetPlayerToTeamColor(playerid); // On the top.

// Between 2 public functions :

SetPlayerToTeamColor(playerid);
{
    if (gTeam[playerid] == TEAM_GROVE)
    {
        SetPlayerColor(playerid, TEAM_GROVE_COLOR);
    }
    else if (gTeam[playerid] == TEAM_BALLA)
    {
        SetPlayerColor(playerid, TEAM_BALLA_COLOR);
    }
    return 1;
}

// OnPlayerSpawn

public OnPlayerSpawn(playerid)
{
        SetPlayerToTeamColor(playerid);
    return 1;
}
:3
There is no need to call a function within another function! Especially when the arguments are only valid to the player.
Reply


Messages In This Thread
Team ??? - by ChromeHD - 27.09.2011, 19:40
Re: Team ??? - by Dripac - 27.09.2011, 19:42
Re: Team ??? - by sleepysnowflake - 27.09.2011, 19:46
Re: Team ??? - by ChromeHD - 27.09.2011, 19:46
Re: Team ??? - by sleepysnowflake - 27.09.2011, 19:51
Re: Team ??? - by ChromeHD - 27.09.2011, 19:51
Re: Team ??? - by ChromeHD - 27.09.2011, 19:53
Re: Team ??? - by sleepysnowflake - 27.09.2011, 20:04
Re: Team ??? - by Azzeto - 27.09.2011, 20:07
Re: Team ??? - by Kush - 27.09.2011, 20:20

Forum Jump:


Users browsing this thread: 2 Guest(s)