SA-MP Forums Archive
[AJUDA] SKINS DE MEMBROS - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: Non-English (https://sampforum.blast.hk/forumdisplay.php?fid=9)
+--- Forum: Languages (https://sampforum.blast.hk/forumdisplay.php?fid=33)
+---- Forum: Português/Portuguese (https://sampforum.blast.hk/forumdisplay.php?fid=34)
+---- Thread: [AJUDA] SKINS DE MEMBROS (/showthread.php?tid=429113)



[AJUDA] SKINS DE MEMBROS - dansr - 08.04.2013

Olб meu servidor й RPG e ele tem ORGANIZAЗOES que variam entre 6 Cargos, cada organizaзгo tem seu numero especifico que vai de 1 a 24
(ex: POLICIA CIVIL 1, LADROES 2, MECANICOS 3 etc...)


Eu gostaria de um codigo que quando o jogador fosse tal cargo, ele teria tal skin, vou mostrar um exemplo abaixo:

pCargo й a variavel, criada no meu GM

pawn Код:
Organizaзгo 1
if PlayerInfo[playerid][pCargo] == 1 VAI TER A SKIN "EXEMPLO"
if PlayerInfo[playerid][pCargo] == 2 VAI TER A SKIN "EXEMPLO"
if PlayerInfo[playerid][pCargo] == 3 VAI TER A SKIN "EXEMPLO"
if PlayerInfo[playerid][pCargo] == 4 VAI TER A SKIN "EXEMPLO"
if PlayerInfo[playerid][pCargo] == 5 VAI TER A SKIN "EXEMPLO"
if PlayerInfo[playerid][pCargo] == 6 VAI TER A SKIN "EXEMPLO"
como fazer?


Re: [AJUDA] SKINS DE MEMBROS - Lуs - 08.04.2013

pawn Код:
public OnPlayerSpawn ( playerid )
{
    switch ( PlayerInfo [ playerid ] [ pCargo ] )
    {
        case 1:
            SetPlayerSkin ( playerid, /*Skin ID*/ );

        case 2:
            SetPlayerSkin ( playerid, /*Skin ID*/ );

        case 3:
            SetPlayerSkin ( playerid, /*Skin ID*/ );

        case 4:
            SetPlayerSkin ( playerid, /*Skin ID*/ );

        case 5:
            SetPlayerSkin ( playerid, /*Skin ID*/ );

        case 6:
            SetPlayerSkin ( playerid, /*Skin ID*/ );
    }

    return 1;
}



Re: [AJUDA] SKINS DE MEMBROS - dansr - 08.04.2013

Muito obrigado por me ajudar!

bom, nгo entendi nesse cуdigo como ele vai reconhecer os cargos se й 1 2 3 4 5 ou 6, poderia me explicar?

outra coisa, tenho 24 orgs no servidor, esse codigo sу serve pra uma...

e preciso colocar o codigo em um lugar do meu GameMode que garanta que o player nunca vб mudar de skin, seria no onplayerespawn mesmo?

no meu servidor tem um codigo que o player que escolhe qual ele quer ser... vou tirar, claro mas olha como que estб feito:

pawn Код:
if(SelectChar[playerid] == 255)
    {
        new idx;
        tmp = strtok(text, idx);
        if ((strcmp("Proximo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Proximo")))
        {
            switch (SelectCharID[playerid])
            {
                case 1: //Policia Militar
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 280); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 280; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 281); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 281; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 282); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 282; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 265); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 265; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 267); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 267; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 246; }
                }
                case 2: //B.O.P.E
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 285; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 298); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 298; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 285; }
                }
                case 3: //Exйrcito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 287); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 287; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 191); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 191; }
                }
                case 4: //SAMU
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 277); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 277; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 276); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 276; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 275); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 275; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 274); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 274; }
                }
                case 5: //Varrios Los Aztecas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 116); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 116; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 115); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 115; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 114); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 114; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 41); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 41; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 6: //Hamas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 122; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 272); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 272; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 131); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 131; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 128); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 128; }
                }
                case 7: //Prefeito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 164); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 164; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 163); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 163; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 141); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 141; }
                }
                case 8: //Hitman Agency
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 166); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 166; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 165); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 165; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 127); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 127; }
                }
                case 9: //Reporteres
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 188); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 188; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 187); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 187; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 10: //Taxistas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 255); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 255; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 219); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 219; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 253); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 253; }
                }
                case 11: //Policia federal
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 224); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 224; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 286); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 286; }
                }
                case 12: //Mafia CN
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 43); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 43; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 46); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 46; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 98); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 98; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 223); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 223; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 126); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 126; }
                }
                case 13: //Yakuza
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 203); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 203; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 204); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 204; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 118; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 169); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 169; }
                }
                case 14: //Groove
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 105); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 105; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 106); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 106; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 107); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 107; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 271); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 271; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 195; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 269); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 269; }
                }
                case 15: //Al'qaeda
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 30; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 47); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 47; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 48); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 48; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 192); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 192; }
                }
                case 16: //Policia Civil
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 124); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 124; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 76; }
                }
                case 17: //Ballas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 102); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 102; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 103); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 103; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 104); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 104; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 40; }
                }
                case 18: //Vagos
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 108); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 108; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 109); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 109; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 110); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 110; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 85); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 85; }
                }
                case 19: //Comando Vermelho
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 19); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 19; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 170); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 170; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 40; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 193); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 193; }
                }
                case 20: //Sons of Anarchy
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 247; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 248; }
                }
                case 21: //DRIFTERS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 101); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 101; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 293; }
                }
                case 22: //TRIADS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 118; }
                }
                case 23: //FARC
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 112); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 112; }
                }
            }
            return 0;



Re: [AJUDA] SKINS DE MEMBROS - Lуs - 08.04.2013

Quote:
Originally Posted by dansr
Посмотреть сообщение
Muito obrigado por me ajudar!

bom, nгo entendi nesse cуdigo como ele vai reconhecer os cargos se й 1 2 3 4 5 ou 6, poderia me explicar?

outra coisa, tenho 24 orgs no servidor, esse codigo sу serve pra uma...

e preciso colocar o codigo em um lugar do meu GameMode que garanta que o player nunca vб mudar de skin, seria no onplayerespawn mesmo?

no meu servidor tem um codigo que o player que escolhe qual ele quer ser... vou tirar, claro mas olha como que estб feito:

pawn Код:
if(SelectChar[playerid] == 255)
    {
        new idx;
        tmp = strtok(text, idx);
        if ((strcmp("Proximo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Proximo")))
        {
            switch (SelectCharID[playerid])
            {
                case 1: //Policia Militar
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 280); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 280; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 281); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 281; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 282); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 282; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 265); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 265; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 267); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 267; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 246; }
                }
                case 2: //B.O.P.E
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 285; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 298); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 298; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 285; }
                }
                case 3: //Exйrcito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 287); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 287; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 191); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 191; }
                }
                case 4: //SAMU
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 277); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 277; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 276); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 276; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 275); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 275; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 274); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 274; }
                }
                case 5: //Varrios Los Aztecas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 116); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 116; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 115); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 115; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 114); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 114; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 41); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 41; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 6: //Hamas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 122; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 272); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 272; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 131); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 131; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 128); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 128; }
                }
                case 7: //Prefeito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 164); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 164; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 163); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 163; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 141); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 141; }
                }
                case 8: //Hitman Agency
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 166); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 166; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 165); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 165; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 127); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 127; }
                }
                case 9: //Reporteres
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 188); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 188; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 187); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 187; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 10: //Taxistas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 255); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 255; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 219); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 219; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 253); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 253; }
                }
                case 11: //Policia federal
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 224); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 224; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 286); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 286; }
                }
                case 12: //Mafia CN
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 43); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 43; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 46); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 46; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 98); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 98; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 223); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 223; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 126); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 126; }
                }
                case 13: //Yakuza
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 203); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 203; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 204); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 204; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 118; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 169); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 169; }
                }
                case 14: //Groove
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 105); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 105; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 106); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 106; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 107); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 107; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 271); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 271; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 195; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 269); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 269; }
                }
                case 15: //Al'qaeda
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 30; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 47); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 47; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 48); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 48; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 192); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 192; }
                }
                case 16: //Policia Civil
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 124); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 124; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 76; }
                }
                case 17: //Ballas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 102); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 102; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 103); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 103; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 104); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 104; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 40; }
                }
                case 18: //Vagos
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 108); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 108; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 109); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 109; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 110); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 110; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 85); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 85; }
                }
                case 19: //Comando Vermelho
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 19); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 19; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 170); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 170; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 40; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 193); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 193; }
                }
                case 20: //Sons of Anarchy
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 247; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 248; }
                }
                case 21: //DRIFTERS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 101); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 101; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 293; }
                }
                case 22: //TRIADS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 118; }
                }
                case 23: //FARC
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 112); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 112; }
                }
            }
            return 0;
O cуdigo que postei nгo vai alterar sу de uma organizaзгo, pelo contrбrio, vai ser de todas, agora se vocк quer identificar 1 org de cada vez e alterar a skin separadamente, bem vocк vai ter que usar 2 switchs ao invйs de 1.

pawn Код:
public OnPlayerSpawn ( playerid )
{
    switch ( /*Var org player*/ )
    {
        case 1://1 = ID da ORG
        {
            switch ( PlayerInfo [ playerid ] [ pCargo ] )
            {
                case 1: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 2: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 3: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 4: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 5: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 6: SetPlayerSkin ( playerid, /*Skin ID*/ );
            }
        }
        case 2:
        {
            switch ( PlayerInfo [ playerid ] [ pCargo ] )
            {
                case 1: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 2: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 3: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 4: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 5: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 6: SetPlayerSkin ( playerid, /*Skin ID*/ );
            }
        }
        case 3:
        {
            switch ( PlayerInfo [ playerid ] [ pCargo ] )
            {
                case 1: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 2: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 3: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 4: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 5: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 6: SetPlayerSkin ( playerid, /*Skin ID*/ );
            }
        }
        case 4:
        {
            switch ( PlayerInfo [ playerid ] [ pCargo ] )
            {
                case 1: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 2: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 3: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 4: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 5: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 6: SetPlayerSkin ( playerid, /*Skin ID*/ );
            }
        }
        case 5:
        {
            switch ( PlayerInfo [ playerid ] [ pCargo ] )
            {
                case 1: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 2: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 3: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 4: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 5: SetPlayerSkin ( playerid, /*Skin ID*/ );
                case 6: SetPlayerSkin ( playerid, /*Skin ID*/ );
            }
        }
    }
    return 1;
}
============

Explicaзгo sobre switch.

O switch й um comparador como o if, porйm o switch й mais rбpido, fбcil e organizado de se utilizar.

Diferente do if, o switch nгo utiliza argumentos para a comparaзгo, no caso ele usa cases, entгo vamos assim:

pawn Код:
new var = 5;

switch ( var )
{
    case 5: SendClientMessage ( playerid, -1, "A variбvel tem valor de 5!" );
    default: SendClientMessage ( playerid, -1, "O valor da variбvel nгo й 5." );
}
Imagine assim:

pawn Код:
nova variбvel var com valor de 5;

selecionar ( nova variбvel )
{
    caso o valor for 5: EnviarMensagem ( iddojogador, cor, "A variбvel tem valor de 5!" );
    padrгo ( caso nгo for achado nenhum valor que vocк pediu usando case ): EnviarMessagem ( iddojogador, cor , "O valor da variбvel nгo й 5. ");
}
Й basicamente isso.


Re: [AJUDA] SKINS DE MEMBROS - dansr - 08.04.2013

entгo, mas agora pra funcionar o certo й eu remover esse que tem ai de escolher nй?


Re: [AJUDA] SKINS DE MEMBROS - Lуs - 08.04.2013

Quote:
Originally Posted by dansr
Посмотреть сообщение
entгo, mas agora pra funcionar o certo й eu remover esse que tem ai de escolher nй?
Creio que sim, mas nesse cуdigo seu existem mais coisas do que somente alterar a skin de um jogador.


Re: [AJUDA] SKINS DE MEMBROS - dansr - 08.04.2013

switch ( /*Var org player*/ )

coloco qual variavel dentro do paratenses nessa linha?


Re: [AJUDA] SKINS DE MEMBROS - Lуs - 08.04.2013

Aн й com vocк, nгo tenho como ver como vocк fez seu sistema de organizaзхes, mas provavelmente й algo do tipo:

pawn Код:
PlayerInfo [ playerid ] [ pOrg ]



Re: [AJUDA] SKINS DE MEMBROS - dansr - 08.04.2013

Eu jб achei, й o pTeam.

Obrigado amigo.

Agora estou com um probleminha basico...
Sу consigo compilar quando eu coloco o seu codigo sozinho no Onplayerspawn, se eu tento inserir o seu codigo no finalzinho do onplayerspawn ele nгo compila, jб tentei colocar no comeзo e no fim... ele sу vai se estiver sozinho e agora?

to tentando de varios jeitos, colocando { e } tirando mas nao vaii..


Respuesta: [AJUDA] SKINS DE MEMBROS - Pedro Pawno - 08.04.2013

Observe o return..

pawn Код:
if(SelectChar[playerid] == 255)
    {
        new idx;
        tmp = strtok(text, idx);
        if ((strcmp("Proximo", tmp, true, strlen(tmp)) == 0) && (strlen(tmp) == strlen("Proximo")))
        {
            switch (SelectCharID[playerid])
            {
                case 1: //Policia Militar
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 280); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 280; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 281); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 281; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 282); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 282; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 265); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 265; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 267); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 267; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 246); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 246; }
                }
                case 2: //B.O.P.E
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 285; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 298); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 298; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 285); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 285; }
                }
                case 3: //Exйrcito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 287); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 287; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 191); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 191; }
                }
                case 4: //SAMU
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 277); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 277; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 276); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 276; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 275); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 275; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 279); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 279; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 274); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 274; }
                }
                case 5: //Varrios Los Aztecas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 116); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 116; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 115); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 115; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 114); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 114; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 41); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 41; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 6: //Hamas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 122); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 122; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 272); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 272; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 131); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 131; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 128); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 128; }
                }
                case 7: //Prefeito
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 164); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 164; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 163); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 163; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 141); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 141; }
                }
                case 8: //Hitman Agency
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 166); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 166; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 165); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 165; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 127); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 127; }
                }
                case 9: //Reporteres
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 188); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 188; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 187); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 187; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 148); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 148; }
                }
                case 10: //Taxistas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 255); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 255; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 219); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 219; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 253); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 253; }
                }
                case 11: //Policia federal
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 224); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 224; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 286); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 286; }
                }
                case 12: //Mafia CN
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 17); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 17; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 43); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 43; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 46); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 46; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 98); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 98; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 223); SelectCharPlace[playerid] = 7; ChosenSkin[playerid] = 223; }
                    else if(SelectCharPlace[playerid] == 7) { SetPlayerSkin(playerid, 126); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 126; }
                }
                case 13: //Yakuza
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 203); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 203; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 204); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 204; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 118; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 169); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 169; }
                }
                case 14: //Groove
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 105); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 105; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 106); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 106; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 107); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 107; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 271); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 271; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 195); SelectCharPlace[playerid] = 6; ChosenSkin[playerid] = 195; }
                    else if(SelectCharPlace[playerid] == 6) { SetPlayerSkin(playerid, 269); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 269; }
                }
                case 15: //Al'qaeda
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 30); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 30; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 47); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 47; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 48); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 48; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 192); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 192; }
                }
                case 16: //Policia Civil
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 59); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 59; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 124); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 124; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 76); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 76; }
                }
                case 17: //Ballas
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 102); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 102; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 103); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 103; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 104); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 104; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 40; }
                }
                case 18: //Vagos
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 108); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 108; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 109); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 109; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 110); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 110; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 91); SelectCharPlace[playerid] = 5; ChosenSkin[playerid] = 91; }
                    else if(SelectCharPlace[playerid] == 5) { SetPlayerSkin(playerid, 85); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 85; }
                }
                case 19: //Comando Vermelho
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 19); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 19; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 170); SelectCharPlace[playerid] = 3; ChosenSkin[playerid] = 170; }
                    else if(SelectCharPlace[playerid] == 3) { SetPlayerSkin(playerid, 40); SelectCharPlace[playerid] = 4; ChosenSkin[playerid] = 40; }
                    else if(SelectCharPlace[playerid] == 4) { SetPlayerSkin(playerid, 193); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 193; }
                }
                case 20: //Sons of Anarchy
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 247); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 247; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 248); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 248; }
                }
                case 21: //DRIFTERS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 101); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 101; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 293); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 293; }
                }
                case 22: //TRIADS
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 117); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 117; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 118); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 118; }
                }
                case 23: //FARC
                {
                    if(SelectCharPlace[playerid] == 1) { SetPlayerSkin(playerid, 111); SelectCharPlace[playerid] = 2; ChosenSkin[playerid] = 111; }
                    else if(SelectCharPlace[playerid] == 2) { SetPlayerSkin(playerid, 112); SelectCharPlace[playerid] = 1; ChosenSkin[playerid] = 112; }
                }
            }
tente