[Ajuda] Comando /Alistar ID
#1

Bom Queria Pedir a Ajuda de alguem Que Entenda Bem Script

bom e o seguinte eu sou da PRF org 10 dai eu vou alistar um membro e so vai pra org 0 :/ Alguem ajuda ae Por Favor?

pawn Код:
if(strcmp(cmd,"/alistar", true)==0)
    {
        if(lider[playerid] == 1)
        {
            new plid;
            if(sscanf(cmdtext, "s[12]ud", cmd, plid))
            {
                SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
                return 1;
            }
            if(IsPlayerConnected(plid))
            {
                if(PlayerInfo[playerid][_Profissao] == 0)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 0);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 1)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 1);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: swat.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 2)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 2);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: PIRATAS.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x666666, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 3)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 3);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Exercito.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 4)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 4);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Elite Aerea.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 5)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 5);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 6)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 6);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 7)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 7);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Yakuza.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 8)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 8);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Bope.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 9)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 9);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Marinha.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 10)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 10);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x0069D2FF, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 11)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 11);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: FBI.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0xB0B000AA, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 12)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 12);
                    format(string, sizeof(string), "%s te alistou para a organizaзгo: AQ.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x989758FF, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 13)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 13);
                    format(string, sizeof(string), "%s te alistou para A TV: Panico Na Bande.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x989758FF, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 14)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 14);
                    format(string, sizeof(string), "%s te alistou para o: Gate.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x989758FF, string);
                    Logarprof(plid);
                    return 1;
                }
                if(PlayerInfo[playerid][_Profissao] == 15)
                {
                    format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
                    dini_IntSet(file2, "Profissao", 15);
                    format(string, sizeof(string), "%s te alistou para: G.F.S.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x989758FF, string);
                    Logarprof(plid);
                    return 1;
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
            }
        }
        else
        {
            SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem permissгo.");
        }
        return 1;
    }
Reply
#2

tente.
pawn Код:
if(strcmp(cmd,"/alistar", true)==0)
{
    if(!lider[playerid]) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem permissгo.");
    new plid;
    if(sscanf(cmdtext, "u",plid)) return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
    if(!IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
    if(PlayerInfo[playerid][_Profissao] == 0)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 0);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 1)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 1);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: swat.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 2)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 2);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: PIRATAS.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x666666, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 3)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 3);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Exercito.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 4)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 4);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Elite Aerea.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    if(PlayerInfo[playerid][_Profissao] == 5)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 5);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 6)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 6);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 7)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 7);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Yakuza.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 8)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 8);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Bope.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 9)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 9);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Marinha.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 10)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 10);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x0069D2FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 11)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 11);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: FBI.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0xB0B000AA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 12)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 12);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: AQ.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 13)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 13);
        format(string, sizeof(string), "%s te alistou para A TV: Panico Na Bande.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 14)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 14);
        format(string, sizeof(string), "%s te alistou para o: Gate.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 15)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 15);
        format(string, sizeof(string), "%s te alistou para: G.F.S.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    return 1;
}
Reply
#3

Espero ter ajudado!

PHP код:
if(strcmp(cmd,"/alistar"true)==0)
{
    new 
plid;
    if(!
lider[playerid]) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo.");
    if(
sscanf(cmd"i",plid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]");
    if(!
IsPlayerConnected(plid)) return SendClientMessage(playeridVermelho"Jogador nгo conectado!");
    
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid));
    if(
PlayerInfo[playerid][_Profissao] == 0)
    {
        
dini_IntSet(file2"Profissao"0);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 1)
    {
        
dini_IntSet(file2"Profissao"1);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 2)
    {
        
dini_IntSet(file2"Profissao"2);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x666666string);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 3)
    {
        
dini_IntSet(file2"Profissao"3);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 4)
    {
        
dini_IntSet(file2"Profissao"4);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 5)
    {
        
dini_IntSet(file2"Profissao"5);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 6)
    {
        
dini_IntSet(file2"Profissao"6);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 7)
    {
        
dini_IntSet(file2"Profissao"7);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 8)
    {
        
dini_IntSet(file2"Profissao"8);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 9)
    {
        
dini_IntSet(file2"Profissao"9);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 10)
    {
        
dini_IntSet(file2"Profissao"10);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x0069D2FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 11)
    {
        
dini_IntSet(file2"Profissao"11);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0xB0B000AAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 12)
    {
        
dini_IntSet(file2"Profissao"12);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 13)
    {
        
dini_IntSet(file2"Profissao"13);
        
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 14)
    {
        
dini_IntSet(file2"Profissao"14);
        
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 15)
    {
        
dini_IntSet(file2"Profissao"15);
        
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    return 
1;

Reply
#4

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Espero ter ajudado!

PHP код:
if(strcmp(cmd,"/alistar"true)==0)
{
    new 
plid;
    if(!
lider[playerid]) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo.");
    if(
sscanf(cmd"i",plid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]");
    if(!
IsPlayerConnected(plid)) return SendClientMessage(playeridVermelho"Jogador nгo conectado!");
    
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid));
    if(
PlayerInfo[playerid][_Profissao] == 0)
    {
        
dini_IntSet(file2"Profissao"0);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 1)
    {
        
dini_IntSet(file2"Profissao"1);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 2)
    {
        
dini_IntSet(file2"Profissao"2);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x666666string);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 3)
    {
        
dini_IntSet(file2"Profissao"3);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 4)
    {
        
dini_IntSet(file2"Profissao"4);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 5)
    {
        
dini_IntSet(file2"Profissao"5);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 6)
    {
        
dini_IntSet(file2"Profissao"6);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 7)
    {
        
dini_IntSet(file2"Profissao"7);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 8)
    {
        
dini_IntSet(file2"Profissao"8);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 9)
    {
        
dini_IntSet(file2"Profissao"9);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x33CCFFAAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 10)
    {
        
dini_IntSet(file2"Profissao"10);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x0069D2FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 11)
    {
        
dini_IntSet(file2"Profissao"11);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0xB0B000AAstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 12)
    {
        
dini_IntSet(file2"Profissao"12);
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 13)
    {
        
dini_IntSet(file2"Profissao"13);
        
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 14)
    {
        
dini_IntSet(file2"Profissao"14);
        
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    else if(
PlayerInfo[playerid][_Profissao] == 15)
    {
        
dini_IntSet(file2"Profissao"15);
        
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid));
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
        
SendClientMessage(plid0x989758FFstring);
        
Logarprof(plid);
        return 
1;
    }
    return 
1;

bem fica dando isso Digite: /alistar [id]
Reply
#5

Quote:
Originally Posted by WendeLKILL
Посмотреть сообщение
tente.
pawn Код:
if(strcmp(cmd,"/alistar", true)==0)
{
    if(!lider[playerid]) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem permissгo.");
    new plid;
    if(sscanf(cmdtext, "u",plid)) return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
    if(!IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
    if(PlayerInfo[playerid][_Profissao] == 0)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 0);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 1)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 1);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: swat.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 2)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 2);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: PIRATAS.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x666666, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 3)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 3);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Exercito.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 4)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 4);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Elite Aerea.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    if(PlayerInfo[playerid][_Profissao] == 5)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 5);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 6)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 6);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 7)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 7);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Yakuza.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 8)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 8);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Bope.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 9)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 9);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Marinha.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 10)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 10);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x0069D2FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 11)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 11);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: FBI.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0xB0B000AA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 12)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 12);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: AQ.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 13)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 13);
        format(string, sizeof(string), "%s te alistou para A TV: Panico Na Bande.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 14)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 14);
        format(string, sizeof(string), "%s te alistou para o: Gate.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 15)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 15);
        format(string, sizeof(string), "%s te alistou para: G.F.S.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    return 1;
}
Jogador nгo conectado
Reply
#6

Maus nгo tinha visto um erro, porem й sу testar ai. Espero ter ajudado.

PHP код:
if(strcmp(cmd,"/alistar"true)==0

    new 
plid
    if(!
lider[playerid]) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo."); 
    if(
sscanf(cmdtext"i",plid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]"); 
    if(!
IsPlayerConnected(plid)) return SendClientMessage(playeridVermelho"Jogador nгo conectado!"); 
    
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid)); 
    if(
PlayerInfo[playerid][_Profissao] == 0
    { 
        
dini_IntSet(file2"Profissao"0); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 1
    { 
        
dini_IntSet(file2"Profissao"1); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 2
    { 
        
dini_IntSet(file2"Profissao"2); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x666666string); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 3
    { 
        
dini_IntSet(file2"Profissao"3); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 4
    { 
        
dini_IntSet(file2"Profissao"4); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 5
    { 
        
dini_IntSet(file2"Profissao"5); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 6
    { 
        
dini_IntSet(file2"Profissao"6); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 7
    { 
        
dini_IntSet(file2"Profissao"7); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 8
    { 
        
dini_IntSet(file2"Profissao"8); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 9
    { 
        
dini_IntSet(file2"Profissao"9); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 10
    { 
        
dini_IntSet(file2"Profissao"10); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x0069D2FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 11
    { 
        
dini_IntSet(file2"Profissao"11); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0xB0B000AAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 12
    { 
        
dini_IntSet(file2"Profissao"12); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 13
    { 
        
dini_IntSet(file2"Profissao"13); 
        
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 14
    { 
        
dini_IntSet(file2"Profissao"14); 
        
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 15
    { 
        
dini_IntSet(file2"Profissao"15); 
        
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    return 
1

Reply
#7

Quote:
Originally Posted by WendeLKILL
Посмотреть сообщение
tente.
pawn Код:
if(strcmp(cmd,"/alistar", true)==0)
{
    if(!lider[playerid]) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem permissгo.");
    new plid;
    if(sscanf(cmdtext, "u",plid)) return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
    if(!IsPlayerConnected(plid)) return SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
    if(PlayerInfo[playerid][_Profissao] == 0)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 0);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 1)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 1);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: swat.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 2)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 2);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: PIRATAS.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x666666, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 3)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 3);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Exercito.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 4)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 4);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Elite Aerea.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    if(PlayerInfo[playerid][_Profissao] == 5)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 5);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 6)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 6);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 7)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 7);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Yakuza.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 8)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 8);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Bope.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 9)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 9);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Marinha.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 10)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 10);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x0069D2FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 11)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 11);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: FBI.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0xB0B000AA, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 12)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 12);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: AQ.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 13)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 13);
        format(string, sizeof(string), "%s te alistou para A TV: Panico Na Bande.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 14)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 14);
        format(string, sizeof(string), "%s te alistou para o: Gate.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    else if(PlayerInfo[playerid][_Profissao] == 15)
    {
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", 15);
        format(string, sizeof(string), "%s te alistou para: G.F.S.", GetPlayerNameEx(playerid));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x989758FF, string);
        Logarprof(plid);
        return 1;
    }
    return 1;
}
Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Maus nгo tinha visto um erro, porem й sу testar ai. Espero ter ajudado.

PHP код:
if(strcmp(cmd,"/alistar"true)==0

    new 
plid
    if(!
lider[playerid]) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo."); 
    if(
sscanf(cmdtext"i",plid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]"); 
    if(!
IsPlayerConnected(plid)) return SendClientMessage(playeridVermelho"Jogador nгo conectado!"); 
    
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid)); 
    if(
PlayerInfo[playerid][_Profissao] == 0
    { 
        
dini_IntSet(file2"Profissao"0); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 1
    { 
        
dini_IntSet(file2"Profissao"1); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 2
    { 
        
dini_IntSet(file2"Profissao"2); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x666666string); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 3
    { 
        
dini_IntSet(file2"Profissao"3); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 4
    { 
        
dini_IntSet(file2"Profissao"4); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 5
    { 
        
dini_IntSet(file2"Profissao"5); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 6
    { 
        
dini_IntSet(file2"Profissao"6); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 7
    { 
        
dini_IntSet(file2"Profissao"7); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 8
    { 
        
dini_IntSet(file2"Profissao"8); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 9
    { 
        
dini_IntSet(file2"Profissao"9); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x33CCFFAAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 10
    { 
        
dini_IntSet(file2"Profissao"10); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x0069D2FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 11
    { 
        
dini_IntSet(file2"Profissao"11); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0xB0B000AAstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 12
    { 
        
dini_IntSet(file2"Profissao"12); 
        
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 13
    { 
        
dini_IntSet(file2"Profissao"13); 
        
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 14
    { 
        
dini_IntSet(file2"Profissao"14); 
        
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    else if(
PlayerInfo[playerid][_Profissao] == 15
    { 
        
dini_IntSet(file2"Profissao"15); 
        
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid)); 
        
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso."); 
        
SendClientMessage(plid0x989758FFstring); 
        
Logarprof(plid); 
        return 
1
    } 
    return 
1

msm coisa ainda '-'
Reply
#8

Tenta assim.

PHP код:
    if( strcmpcmd"/alistar"true )  == )
    {
        new 
plid;
        new 
tmp 256 ];
        
tmp strtokcmdtextidx ) ;
        if( !
strlentmp ) ) return SendClientMessageplayerid, -1"[ x ] {FF0000}use: /alistar  [ id ]" ) ;
        if( !
liderplayerid ] ) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo.");
        
plid strvaltmp ) ;
        if(!
IsPlayerConnectedplid ) ) return SendClientMessage(playeridVermelho"Jogador nгo conectado!");
        
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid));
        if(
PlayerInfo[playerid][_Profissao] == 0)
        {
            
dini_IntSet(file2"Profissao"0);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 1)
        {
            
dini_IntSet(file2"Profissao"1);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 2)
        {
            
dini_IntSet(file2"Profissao"2);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x666666string);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 3)
        {
            
dini_IntSet(file2"Profissao"3);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 4)
        {
            
dini_IntSet(file2"Profissao"4);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 5)
        {
            
dini_IntSet(file2"Profissao"5);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 6)
        {
            
dini_IntSet(file2"Profissao"6);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 7)
        {
            
dini_IntSet(file2"Profissao"7);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 8)
        {
            
dini_IntSet(file2"Profissao"8);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 9)
        {
            
dini_IntSet(file2"Profissao"9);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 10)
        {
            
dini_IntSet(file2"Profissao"10);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x0069D2FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 11)
        {
            
dini_IntSet(file2"Profissao"11);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0xB0B000AAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 12)
        {
            
dini_IntSet(file2"Profissao"12);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 13)
        {
            
dini_IntSet(file2"Profissao"13);
            
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 14)
        {
            
dini_IntSet(file2"Profissao"14);
            
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 15)
        {
            
dini_IntSet(file2"Profissao"15);
            
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        return 
1;
    } 
Reply
#9

Quote:
Originally Posted by [BOPE]Seu._.Madruga
Посмотреть сообщение
Tenta assim.

PHP код:
    if( strcmpcmd"/alistar"true )  == )
    {
        new 
plid;
        new 
tmp 256 ];
        
tmp strtokcmdtextidx ) ;
        if( !
strlentmp ) ) return SendClientMessageplayerid, -1"[ x ] {FF0000}use: /alistar  [ id ]" ) ;
        if( !
liderplayerid ] ) return SendClientMessage(playeridVermelho"(ERRO) Vocк nгo tem permissгo.");
        
plid strvaltmp ) ;
        if(!
IsPlayerConnectedplid ) ) return SendClientMessage(playeridVermelho"Jogador nгo conectado!");
        
format(file2sizeof(file2), PASTA_CONTASGetPlayerNameEx(plid));
        if(
PlayerInfo[playerid][_Profissao] == 0)
        {
            
dini_IntSet(file2"Profissao"0);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Forзa Aerea Brasileira."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 1)
        {
            
dini_IntSet(file2"Profissao"1);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: swat."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 2)
        {
            
dini_IntSet(file2"Profissao"2);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: PIRATAS."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x666666string);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 3)
        {
            
dini_IntSet(file2"Profissao"3);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Exercito."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 4)
        {
            
dini_IntSet(file2"Profissao"4);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Elite Aerea."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 5)
        {
            
dini_IntSet(file2"Profissao"5);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Comando Vermelho."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 6)
        {
            
dini_IntSet(file2"Profissao"6);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: La Cosa Nostra."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 7)
        {
            
dini_IntSet(file2"Profissao"7);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Yakuza."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 8)
        {
            
dini_IntSet(file2"Profissao"8);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Bope."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 9)
        {
            
dini_IntSet(file2"Profissao"9);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Marinha."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x33CCFFAAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 10)
        {
            
dini_IntSet(file2"Profissao"10);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: Policia Rodoviaria Federal."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x0069D2FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 11)
        {
            
dini_IntSet(file2"Profissao"11);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: FBI."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0xB0B000AAstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 12)
        {
            
dini_IntSet(file2"Profissao"12);
            
format(stringsizeof(string), "%s te alistou para a organizaзгo: AQ."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 13)
        {
            
dini_IntSet(file2"Profissao"13);
            
format(stringsizeof(string), "%s te alistou para A TV: Panico Na Bande."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 14)
        {
            
dini_IntSet(file2"Profissao"14);
            
format(stringsizeof(string), "%s te alistou para o: Gate."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        else if(
PlayerInfo[playerid][_Profissao] == 15)
        {
            
dini_IntSet(file2"Profissao"15);
            
format(stringsizeof(string), "%s te alistou para: G.F.S."GetPlayerNameEx(playerid));
            
SendClientMessage(playeridCOLOR_GREEN"Comando efetuado com sucesso.");
            
SendClientMessage(plid0x989758FFstring);
            
Logarprof(plid);
            return 
1;
        }
        return 
1;
    } 
so vai pra org 0 agora '-'
Reply
#10

pawn Код:
if( strcmp(cmdtext, "/alistar", true )  == 0 )
    {
        new plid;
        if( !lider[ playerid ] ) return SendClientMessage(playerid, Vermelho, "(ERRO) Vocк nгo tem permissгo.");
        if(sscanf(cmdtext, "u", plid)) return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
        if(!IsPlayerConnected( plid ) ) return SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
        format(file2, sizeof(file2), PASTA_CONTAS, GetPlayerNameEx(plid));
        dini_IntSet(file2, "Profissao", PlayerInfo[playerid][Profissao] == 0 : 0 ? PlayerInfo[playerid][Profissao] == 1 ? 1 : PlayerInfo[playerid][Profissao] == 2 ? 2 : PlayerInfo[playerid][Profissao] == 3 ? 3 : PlayerInfo[playerid][Profissao] == 4 ? 4 : PlayerInfo[playerid][Profissao] == 5 ? 5 : PlayerInfo[playerid][Profissao] == 6 ? 6 : PlayerInfo[playerid][Profissao] == 7 ? 7 : PlayerInfo[playerid][Profissao] == 8 ? 8 : PlayerInfo[playerid][Profissao] == 9 ? 9 : PlayerInfo[playerid][Profissao] == 10 ? 10 : PlayerInfo[playerid][Profissao] == 11 ? 11 : PlayerInfo[playerid][Profissao] == 12 ? 12 : PlayerInfo[playerid][Profissao] == 13 ? 13 : PlayerInfo[playerid][Profissao] == 14 ? 14 : PlayerInfo[playerid][Profissao] == 15 ? 15 : 0);
        format(string, sizeof(string), "%s te alistou para a organizaзгo: %s", GetPlayerNameEx(playerid), PlayerInfo[playerid][Profissao] == 0 ? ("Forзa Aйrea Brasileira") : PlayerInfo[playerid][Profissao] == 1 ? ("Swat") : PlayerInfo[playerid][Profissao] == 2 ? ("PIRATAS") : PlayerInfo[playerid][Profissao] == ("Exйrcito") ? 3 : PlayerInfo[playerid][Profissao] == 4 ? ("Elite Aйrea") : PlayerInfo[playerid][Profissao] == 5 ? ("Comando Vermelho") : PlayerInfo[playerid][Profissao] == 6 ? ("La Cosa Nostra") : PlayerInfo[playerid][Profissao] == 7 ? ("Yakuza.") : PlayerInfo[playerid][Profissao] == 8 ? ("Bope.") : PlayerInfo[playerid][Profissao] == 9 ? ("Marinha.") : PlayerInfo[playerid][Profissao] == 10 ? ("Policia Rodoviaria Federal") : PlayerInfo[playerid][Profissao] == 11 ? ("FBI.") : PlayerInfo[playerid][Profissao] == 12 ? ("AQ.") : PlayerInfo[playerid][Profissao] == 13 ? ("Panico Na Bande.") : PlayerInfo[playerid][Profissao] == 14 ? ("Gate") : PlayerInfo[playerid][Profissao] == 15 ? ("G.F.S.") : ("DEFAULT"));
        SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
        SendClientMessage(plid, 0x33CCFFAA, string);
        Logarprof(plid);
        return 1;
    }
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)