Teams Colors
#1

Hello

these are my Teams Dialogs

PHP Code:

new gTeam[MAX_PLAYERS];
public 
OnPlayerRequestSpawn(playerid)
{
    
    if(
Logged[playerid] == 1)
    {
        
ShowPlayerDialog(playerid,3323,DIALOG_STYLE_LIST"Choose Team","Team1\Team2","Choose","Exit");
        return 
0;
    }
    
    if(
lspawn == && Logged[playerid] == 0
    {
    
SendClientMessage(playeridCOLOUR_RED"You must login or register to spawn!");
    return 
0;
    }else{
    return 
1;
    }
    return 
1;

& These are responses

PHP Code:
if(dialogid == 3323)
    {
        if(
response)
        {
            switch(
listitem)
            {
                case 
0:
                {
                    
SendClientMessage(playerid, -1"You have choosen the Team 1");
                    
gTeam[playerid] = TEAM1;
                }
                case 
1:
                {
                    
SendClientMessage(playerid, -1"You have choosen the Team 2");
                    
gTeam[playerid] = TEAM2;
                }
            }
        }
        else if(!
response) return SendClientMessage(playerid, -1"You have to choose a team !") && ShowPlayerDialog(playerid,1,DIALOG_STYLE_LIST"Choose a Team","Team1\Team2","Choose","Exit");
    }
    return 
1
And These are my problems
These are teams colors, Colors Don't Work in Game (Teams Have Same Colors)

PHP Code:
public SetPlayerToTeamColor(playerid)
{
    if(
gTeam[playerid] == TEAM1)
    {
        
SetPlayerColor(playeridCOLOR_YELLOW);
    }
    else if(
gTeam[playerid] == TEAM2)
    {
        
SetPlayerColor(playeridCOLOR_BLUE);
    }



anyone could help ?
Reply
#2

anyone ?
Reply
#3

pawn Code:
SetPlayerToTeamColor(playerid);
Where do you put this code in the script?
Reply
#4

NoWhere :/
Reply
#5

Take it in listitem 0 and 1 after gTeam function or in OnPlayerSpawn..
Reply
#6

tnx !
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)