21.09.2014, 19:48
I HAVE PROBLEM WHEN PLAYER REQUEST CLASS
class system but after team uk and before team afghanistan
bug is team selection freeze.
THIS IS CODES
HELP
pawn Код:
#define TEAM_AFGHANISTAN 0
#define TEAM_CHINA 1
#define TEAM_GERMANY 2
#define TEAM_RUSSIA 3
#define TEAM_USA 4
#define TEAM_AUS 5
#define TEAM_PAKISTAN 6
#define TEAM_INDIA 7
#define TEAM_BRAZIL 8
#define TEAM_FRANCE 9
#define TEAM_NETHERLANDS 10
#define TEAM_UK 11
#define TEAM_NONE 12
#define MAX_TEAMS 12
bug is team selection freeze.
THIS IS CODES
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
Update3DTextLabelText(Duty[playerid], 0xFFFFFFFF, " ");
Update3DTextLabelText(DM[playerid], 0xFFFFFFFF, " ");
SetPlayerPos(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraLookAt(playerid,220.3261,1822.9734,7.5368);
SetPlayerCameraPos(playerid,226.7491,1823.0441,7.4141);
SetPlayerFacingAngle(playerid, 270 );
{
if(classid == TEAM_AFGHANISTAN) {// AFGHANISTAN //
TextDrawShowForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_AFGHANISTAN;
SetPlayerTeam(playerid, 0);
SetPlayerSkin(playerid, 179);
SetPlayerColor(playerid, TEAM_AFGHANISTAN_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_CHINA) {// CHINA //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawShowForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_CHINA;
SetPlayerTeam(playerid, 1);
SetPlayerSkin(playerid, 123);
SetPlayerColor(playerid, TEAM_CHINA_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_GERMANY) {// GERMANY //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawShowForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_GERMANY;
SetPlayerTeam(playerid, 2);
SetPlayerSkin(playerid, 247);
SetPlayerColor(playerid, TEAM_GERMANY_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_RUSSIA) {// RUSSIA //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawShowForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_RUSSIA;
SetPlayerTeam(playerid, 3);
SetPlayerSkin(playerid, 285);
SetPlayerColor(playerid, TEAM_RUSSIA_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_USA) {// USA //
TextDrawHideForPlayer(playerid, AF);
TextDrawShowForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_USA;
SetPlayerTeam(playerid, 4);
SetPlayerSkin(playerid, 287);
SetPlayerColor(playerid, TEAM_USA_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_AUS) {// AUS //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawShowForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_AUS;
SetPlayerTeam(playerid, 5);
SetPlayerSkin(playerid, 206);
SetPlayerColor(playerid, TEAM_AUS_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_PAKISTAN) {// PAKISTAN //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawShowForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_PAKISTAN;
SetPlayerTeam(playerid, 6);
SetPlayerSkin(playerid, 21);
SetPlayerColor(playerid, TEAM_PAKISTAN_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_INDIA) {// INDIA :D //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawShowForPlayer(playerid, IN);
gTeam[playerid] = TEAM_INDIA;
SetPlayerTeam(playerid, 7);
SetPlayerSkin(playerid, 28);
SetPlayerColor(playerid, TEAM_INDIA_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_BRAZIL) {// BRAZIL //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawShowForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_BRAZIL;
SetPlayerTeam(playerid, 8);
SetPlayerSkin(playerid, 133);
SetPlayerColor(playerid, TEAM_BRAZIL_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_FRANCE) {// FRANCE //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawShowForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_FRANCE;
SetPlayerTeam(playerid, 9);
SetPlayerSkin(playerid, 108);
SetPlayerColor(playerid, TEAM_FRANCE_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_NETHERLANDS) {// NETHERLANDS//
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawShowForPlayer(playerid, NT);
TextDrawHideForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_NETHERLANDS;
SetPlayerTeam(playerid, 10);
SetPlayerSkin(playerid, 73);
SetPlayerColor(playerid, TEAM_NETHERLANDS_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
if(classid == TEAM_UK) {// UK //
TextDrawHideForPlayer(playerid, AF);
TextDrawHideForPlayer(playerid, US);
TextDrawHideForPlayer(playerid, AA);
TextDrawHideForPlayer(playerid, RS);
TextDrawHideForPlayer(playerid, CH);
TextDrawHideForPlayer(playerid, GR);
TextDrawHideForPlayer(playerid, BR);
TextDrawHideForPlayer(playerid, FR);
TextDrawHideForPlayer(playerid, NT);
TextDrawShowForPlayer(playerid, UK);
TextDrawHideForPlayer(playerid, PK);
TextDrawHideForPlayer(playerid, IN);
gTeam[playerid] = TEAM_UK;
SetPlayerTeam(playerid, 11);
SetPlayerSkin(playerid, 60);
SetPlayerColor(playerid, TEAM_UK_COLOR);
Update3DTextLabelText(RankLabel[playerid], 0xFFFFFFFF, " ");
}
} return true;
}