[Ajuda] Comando
#1

alguem poderia mim ajuda

quando eu do /alista id so vai pra org "0"

quando vou olhar a log Mosta Isso

pawn Код:
sscanf warning: Format specifier does not match parameter count.
Cmd: "/alistar"

pawn Код:
if(strcmp("/alistar", cmd, true) == 0)
    {
        if(lider[playerid] == 1 || sublider[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.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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: PIR.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x666666, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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: Mar.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
            }
        }

        return 1;
    }
Reply
#2


Troque:
PHP код:
if(sscanf(cmdtext"s[12]ud"cmdplid))
{
   
SendClientMessage(playeridVermelho"Digite: /alistar [id]");
   return 
1;

Por:
PHP код:
if(sscanf(cmdtext"s[12]d"cmdplid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]"); 
Ou:
PHP код:
if(sscanf(cmdtext"s[12]d"cmdtextplid)) return SendClientMessage(playeridVermelho"Digite: /alistar [id]"); 
Reply
#3

As strings na sscanf devem sempre ser usadas em ultimo lugar em casos como este.
Reply
#4

Como Assim PT pode da uma dica por favor?
@edit
Reply
#5

pawn Код:
if(sscanf(cmdtext, "i", plid))return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
tenta assim .
Reply
#6

Quote:
Originally Posted by Netiinho
Посмотреть сообщение
Como Assim PT pode da uma dica por favor?
@edit
Quote:
Originally Posted by mau.tito
Посмотреть сообщение
pawn Код:
if(sscanf(cmdtext, "i", plid))return SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
tenta assim .
msm coisa
Reply
#7

Quote:
Originally Posted by Netiinho
Посмотреть сообщение
Como Assim PT pode da uma dica por favor?
@edit
me basei no comentario do cara para responder, porem eu estava errado voce esta a usar strcmp.
Isso alem de ser antigo e o mais antigo metodo de criacao de comandos, recomendo a estudar sobre processadores de comandos.

recomendo este: https://sampforum.blast.hk/showthread.php?tid=460056

porem existem muitos mais.

pawn Код:
if(strcmp("/alistar", cmd, true) == 0)
    {
        if(lider[playerid] == 1 || sublider[playerid] == 1)
        {
            new plid;

            if(sscanf(cmdtext, "s[8]u", 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.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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: PIR.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x666666, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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: Mar.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
            }
        }

        return 1;
    }
quanto ao seu problema acredito que resolva.
Reply
#8

Quote:
Originally Posted by PT
Посмотреть сообщение
me basei no comentario do cara para responder, porem eu estava errado voce esta a usar strcmp.
Isso alem de ser antigo e o mais antigo metodo de criacao de comandos, recomendo a estudar sobre processadores de comandos.

recomendo este: https://sampforum.blast.hk/showthread.php?tid=460056

porem existem muitos mais.

pawn Код:
if(strcmp("/alistar", cmd, true) == 0)
    {
        if(lider[playerid] == 1 || sublider[playerid] == 1)
        {
            new plid;

            if(sscanf(cmdtext, "s[8]u", 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.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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: PIR.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x666666, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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: Mar.", GetPlayerNameEx(playerid));
                    SendClientMessage(playerid, COLOR_GREEN, "Comando efetuado com sucesso.");
                    SendClientMessage(plid, 0x33CCFFAA, string);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
                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);
                }
            }
            else
            {
                SendClientMessage(playerid, Vermelho, "Jogador nгo conectado!");
            }
        }

        return 1;
    }
quanto ao seu problema acredito que resolva.
msm coisa ai deu isso na log

sscanf warning: String buffer overflow.
Reply
#9

pawn Код:
if(sscanf(cmdtext, "s[10]u", cmd, plid))
{
    SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
    return 1;
}
Reply
#10

Quote:
Originally Posted by PT
Посмотреть сообщение
pawn Код:
if(sscanf(cmdtext, "s[10]u", cmd, plid))
{
    SendClientMessage(playerid, Vermelho, "Digite: /alistar [id]");
    return 1;
}
continua msm coisa '-'
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)