20.03.2019, 05:56
Hello
these are my Teams Dialogs
& These are responses
And These are my problems
These are teams colors, Colors Don't Work in Game (Teams Have Same Colors)
anyone could help ?
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 == 1 && Logged[playerid] == 0)
{
SendClientMessage(playerid, COLOUR_RED, "You must login or register to spawn!");
return 0;
}else{
return 1;
}
return 1;
}
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;
These are teams colors, Colors Don't Work in Game (Teams Have Same Colors)
PHP Code:
public SetPlayerToTeamColor(playerid)
{
if(gTeam[playerid] == TEAM1)
{
SetPlayerColor(playerid, COLOR_YELLOW);
}
else if(gTeam[playerid] == TEAM2)
{
SetPlayerColor(playerid, COLOR_BLUE);
}
}
anyone could help ?