How do I change color of a class?
#10

Quote:
Originally Posted by Twisted_Insane
Посмотреть сообщение
OMG, you just said you don't have it, but what the hell is this then?

pawn Код:
SetPlayerToTeamColour
Anyways, comparing with "else if" isn't a good idea, switch the cases here:

pawn Код:
SetPlayerToTeamColour(playerid)
{
    switch(gTeam[playerid])
    {
        case TEAM_COP:
        {
            SetPlayerColor(playerid, COLOR);
        }
        case TEAM_ARMY:
        {
            SetPlayerColor(playerid, COLOR);
        }
        case TEAM_ncis:
        {
            SetPlayerColor(playerid, COLOR);
        }
        case TEAM_MEDIC:
        {
            SetPlayerColor(playerid, COLOR);
        }
        case TEAM_CARFIX:
        {
            SetPlayerColor(playerid, COLOR);
        }
        case TEAM_DRIVER:
        {
            SetPlayerColor(playerid, COLOR);
        }
    }
}
You forgot to add the default case (team >= 9):
pawn Код:
default: SetPlayerColor(playerid,COLOR_WHITE);
Reply


Messages In This Thread
How do I change color of a class? - by Vasu99 - 04.03.2012, 16:07
Re: How do I change color of a class? - by mrskull42 - 04.03.2012, 16:10
Re: How do I change color of a class? - by Vasu99 - 04.03.2012, 16:22
Re: How do I change color of a class? - by mrskull42 - 04.03.2012, 16:25
Re: How do I change color of a class? - by Vasu99 - 04.03.2012, 16:37
Re: How do I change color of a class? - by mrskull42 - 04.03.2012, 16:39
Re: How do I change color of a class? - by Twisted_Insane - 04.03.2012, 16:46
Re: How do I change color of a class? - by Vasu99 - 04.03.2012, 17:13
Re: How do I change color of a class? - by Twisted_Insane - 04.03.2012, 17:18
Re: How do I change color of a class? - by Gamer_Z - 04.03.2012, 20:48

Forum Jump:


Users browsing this thread: 1 Guest(s)