SA-MP Forums Archive
[Ajuda]Comando errado - Printable Version

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



[Ajuda]Comando errado - rafa3dify - 07.10.2011

Meu comando funciona, mais toda vez que eu uso ele, aparece:
Quote:

SERVE:Unknown command.

Comando:

pawn Код:
if(!strcmp(cmd1, "/convidar", true))
        {
        new plid, Level2;
        if(org[playerid][Lider] == 0)
        {
            SendClientMessage(playerid, 0xFC4430AA, "Vocк nгo й lider de nenhuma organizaзгo!");
            return 0;
        }
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFF6F28AA, "Uso correto: /convidar [ID] [org]");
            return 0;
        }
        plid = strval(tmp);
        tmp = strtok(cmdtext, idx);
        if(!strlen(tmp))
        {
            SendClientMessage(playerid, 0xFF6F28AA, "Uso correto: /convidar [ID] [org]");
            return 0;
        }
       
        if(org[plid][Membro] !=0)
        {
            SendClientMessage(playerid, 0xFF6F28AA, "Esse jogador jб pertence б alguma organizaзгo!");
            return 0;
        }
       
        Level2 = strval(tmp);
        format(stryng, 170, "O lнder %s estб lhe convidando\npara fazer parte da organizaзгo %s.\nVocк deseja participar?", nome,organizacao(playerid));
        ShowPlayerDialog(plid, Convite, 0, "Convite", stryng, "Sim","Nгo");
        SetPVarInt(plid, "Org1", Level2);
        SetPVarInt(plid, "Playerorigem", playerid);
        return 1;
    }
O que tem de errado com ele?


Re: Comando errado - Jason` - 07.10.2011

Nao tenho certeza, mas tenta tirar o
pawn Код:
!
antes do
pawn Код:
strcmp



Re: Comando errado - Josma_cmd - 07.10.2011

Muda pra return true; ou return 1;


Re: Comando errado - WLSF - 07.10.2011

"Returning 0 in this callback will pass the command to another script or display 'SERVER: Unknown command' if there are no scripts to pass it on to"

usa return 1; nos comandos..