case 5:
{
if(g_Antarctica > g_Europe || g_America || g_Asia || g_Australia || g_Africa)
{
SendClientMessage(playerid, COLOR_RED, "This team is full. Please choose a different one.");
ShowPlayerDialog(playerid, DIALOG_CHOOSE_TEAM, DIALOG_STYLE_LIST, "Choose A Team", "Europe\nAmerica\nAfrica\nAsia\nAustralia\nAntarctica\n", "Join", "Quit");
}
else
{
if(pInfo[playerid][Team] == EUROPE)
{
g_Europe--;
pInfo[playerid][LastTeam] = EUROPE;
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
else if(pInfo[playerid][Team] == AMERICA)
{
g_America--;
pInfo[playerid][LastTeam] = AMERICA;
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
else if(pInfo[playerid][Team] == AFRICA)
{
g_Africa--;
pInfo[playerid][LastTeam] = AFRICA;
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
else if(pInfo[playerid][Team] == ASIA)
{
g_Asia--;
pInfo[playerid][LastTeam] = ASIA;
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
else if(pInfo[playerid][Team] == AUSTRALIA)
{
g_Australia--;
pInfo[playerid][LastTeam] = AUSTRALIA;
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
else if(pInfo[playerid][Team] == ANTARCTICA)
{
SendClientMessage(playerid, COLOR_RED, "You are already in the Antarctica team. To change class write /ChangeClass.");
}
else
{
pInfo[playerid][Team] = ANTARCTICA;
g_Antarctica++;
ShowPlayerDialog(playerid, DIALOG_CHOOSE_CLASS, DIALOG_STYLE_LIST, "Choose A Class", "Private\nOfficer\nEngineer\nSergeant\nRecon\nLieutenant\nPilot\n\n", "Choose", "Quit");
}
}
}
}
}
printf("There are currently %d members in europe", g_Europe);
printf("There are currently %d members in america", g_America);
printf("There are currently %d members in africa", g_Africa);
printf("There are currently %d members in asia", g_Asia);
printf("There are currently %d members in australia", g_Australia);
printf("There are currently %d members in Antarctica", g_Antarctica);
printf("user %s is currently in team %d", GetName(playerid), pInfo[playerid][Team]);
return 1;
}
return 0;
}
if(g_Antarctica > g_Europe || g_America || g_Asia || g_Australia || g_Africa)
if(g_Antarctica > (g_Europe | g_America | g_Asia | g_Australia | g_Africa))
I didn't understand what your problem is? if a player goes in and out the team being full?
However, I do see something wrong is your code. This: PHP код:
PHP код:
|
Alright, just came back home gonna try both of your guys' comments.
Thanks bro, your thing worked like magic! Appereciate it brother! |