onplayerrequestclass bug..help :(
#1

I HAVE PROBLEM WHEN PLAYER REQUEST CLASS

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
class system but after team uk and before team afghanistan
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;
}
HELP
Reply
#2

try this,
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 1;
}
Reply
#3

no, still same problem!
nothing fixed
Reply
#4

u can try something like
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 );
    switch(classid)
   {
            case 0://if the class id is the first one like the first skin on addplayerclass
            {// AFGHANISTAN //
            gTeam[playerid] = TEAM_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 1;
}
change all the classid to cases.
Reply
#5

again not works
Reply
#6

show me ur new code.
Reply
#7

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 );
    switch(classid)
   {
            case 0://if the class id is the first one like the first skin on addplayerclass
            {// AFGHANISTAN //
            gTeam[playerid] = TEAM_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, " ");
            }
            case 1://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 2://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 3://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 4://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 5://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 6://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 7://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 8://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 9://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 10://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            }
            case 11://if the class id is the first one like the first skin on addplayerclass// 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 1;
}
Reply
#8

do you know what is the case: for?
example case:0 means the first addplayerclass you have, are you sure that you are doing it with the right way?
Reply
#9

yes i know that
Reply
#10

then try something like this:
pawn Код:
public OnPlayerRequestClass(playerid, classid)
{
    switch(classid)
   {
            case 0://if the class id is the first one like the first skin on addplayerclass
            {// AFGHANISTAN //
            gTeam[playerid] = TEAM_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, " ");
            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 );
            }
            case 1://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 2://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 3://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 4://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 5://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 6://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 7://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 8://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 9://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 10://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
            }
            case 11://if the class id is the first one like the first skin on addplayerclass// 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, " ");
            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 );
    }
}
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)