TEAMS: Any team I choose sets me to the same color..
#1

Hello!

ANY team that I select on my server, makes my name the color Orange. I have no idea why as I have defined different colors for each team. Check out the code:

Код:
SetPlayerToTeamColour(playerid)
{
    if(gTeam[playerid] == UndeadEnemies)
    {
        SetPlayerColor(playerid,UndeadEnemiesGangColor);
    }
    else if(gTeam[playerid] == Cripz)
    {
        SetPlayerColor(playerid,CripzGangColor);
    }
	if(gTeam[playerid] == BloodBrothers)
	{
	    SetPlayerColor(playerid,BloodBrothersGangColor);
	}
	if(gTeam[playerid] == Maniacs)
	{
	    SetPlayerColor(playerid,ManiacsGangColor);
	}
}
  	SetPlayerToTeamColour(playerid); // calls the custom function

---------------------------------------------------------------------------------------------------------------
#define UndeadEnemies 0
#define Cripz 1
#define BloodBrothers 2
#define Maniacs 3

#define UndeadEnemiesGangColor 		0xFFFF0000
#define CripzGangColor 				0xFF0000FF
#define BloodBrothersGangColor 		0x008000C8
#define ManiacsGangColor            0xFFFF8040
---------------------------------------------------------------------------------------------------------------
public SetPlayerTeamFromClass(playerid, classid)
{
	if(classid == 0) //CHANGE GAMETEXTFORPLAYER TO SENDCLIENTMESSAGE -- finished
    {
        SendClientMessage(playerid, 0xFFFF0000, "Undead Enemies"); // This will show up an Text , when you select your class
    }
	else if(classid == 1) //CHANGE GAMETEXTFORPLAYER TO SENDCLIENTMESSAGE -- finished
    {
        SendClientMessage(playerid, 0xFF0000FF, "Cripz");
    }
	else if(classid == 2) //CHANGE GAMETEXTFORPLAYER TO SENDCLIENTMESSAGE -- finished
	{
        SendClientMessage(playerid, 0xFF00FF00, "Blood Brothers");
	}
	else if(classid == 3) //CHANGE GAMETEXTFORPLAYER TO SENDCLIENTMESSAGE -- finished
	{
        SendClientMessage(playerid, 0xFFFF8040, "Maniacs");
	}
	return 1;
}

I don't get any errors or warnings when compiling. Any help is appreciated!
Reply
#2

Well have you anywhere set that gTeam when he chooses a team ?
Reply
#3

Yes, but I took it out trying to fix the problem.
Reply
#4

You took it out , but as I see , there it checks the team.

pawn Код:
if(gTeam[playerid] == UndeadEnemies)
 {
Reply
#5

Yes. ^
Reply
#6

Bump
Reply
#7

Add OnPlayerSpawn,

SetPlayerToTeamColour(playerid);
Reply
#8

Quote:
Originally Posted by DerickClark
Посмотреть сообщение
Add OnPlayerSpawn,

SetPlayerToTeamColour(playerid);
I have that. :P
Reply
#9

Remove the color
and post up top gamemode

pawn Код:
#define UndeadEnemies 0
#define Cripz 1
#define BloodBrothers 2
#define Maniacs 3

#define UndeadEnemiesGangColor      0xFFFF0000
#define CripzGangColor              0xFF0000FF
#define BloodBrothersGangColor      0x008000C8
#define ManiacsGangColor            0xFFFF8040
Reply
#10

Done, nothing.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)