SetPlayerColor when player select the class
#6

here you go. just fill in the color that you want on /*Put your color define here*/ i prefer to use enum than arrays so just convert all of your teams that uses that array to the enum that i gave you.

here you go
Compiling
pawn Код:
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase
Code
pawn Код:
enum
{
    TEAM_GROVE_STREET,
    TEAM_VAGOS,
    TEAM_BALLAS,
    TEAM_ITALIAN_MAFIA,
    TEAM_LSPD,
    TEAM_NATIONAL_GUARD
}
new pTeam[ MAX_PLAYERS ][ TEAM ];

   
stock SetPlayerToTeamColour(playerid)
{
    if(pTeam[ playerid ][   TEAM_GROVE_STREET ])
        return SetPlaColor(playerid, /*your color define here*/);
    if(pTeam[ playerid ][   TEAM_VAGOS ])
        return SetPlaColor(playerid, /*your color define here*/);  
    if(pTeam[ playerid ][   TEAM_BALLAS ])
        return SetPlaColor(playerid, /*your color define here*/);  
    if(pTeam[ playerid ][   TEAM_ITALIAN_MAFIA ])
        return SetPlaColor(playerid, /*your color define here*/);
    if(pTeam[ playerid ][   TEAM_LSPD ])
        return SetPlaColor(playerid, /*your color define here*/);
    if(pTeam[ playerid ][   TEAM_NATIONAL_GUARD ])
        return SetPlaColor(playerid, /*your color define here*/);          
    return 1;
}
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)