[Ajuda] comand com problema /prender
#1

ai galera olha se alguem acha um erro ai:
pawn Код:
if(!strcmp(cmd, "/prender", true))
{

    new nomes[MAX_PLAYER_NAME][2];
    GetPlayerName(playerid, nomes[0], MAX_PLAYER_NAME);
    format(file, sizeof(file), P_CONTAS, nomes[0]);
    if(dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol || dini_Int(file, "pAdm01") == 1)
    {
        new tmp[128];
        new plid;
        /*tmp = strtok(cmdtext, idx);*/
        if(!strlen(tmp))
            return SendClientMessage(playerid, Vermelho, "Digite: /prender [id] [motivo]");

        plid = strval(tmp);
        if(!IsPlayerConnected(plid) || plid == playerid) return 1;

        if(IsPlayerInAnyVehicle(plid) || IsPlayerInAnyVehicle(playerid)) return
            SendClientMessage(playerid, Vermelho, "(ERRO) Alguem estб dentro de um carro.");
         if(GetDistanceBetweenPlayers(plid,playerid) < 10) return SendClientMessage(playerid, -1, "Longe demais.");
        new length = strlen(cmdtext);
        while ((idx < length) && (cmdtext[idx] <= ' ')) {
            idx++;
        }
        new offset = idx, result[64];
        while ((idx < length) && ((idx - offset) < (sizeof(result) - 1))) {
            result[idx - offset] = cmdtext[idx];
            idx++;
        }
        result[idx - offset] = EOS;
        new aname[MAX_PLAYER_NAME];
        GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
        format(file, sizeof(file), P_CONTAS, aname);
       
            return SendClientMessage(playerid, Vermelho, "Uso: /prender [id] [motivo]");
        format(string, sizeof(string), "[x] O Oficial %s prendeu Vocк [Motivo: %s]", aname,result);//Linha 12408
        SendClientMessage(plid, outraadm, string); //linha 12409
        SetPlayerPos(plid, 263.8820,77.4002,1001.0391);
        SetPlayerInterior(plid, 6);
        SetPlayerHealth(plid, 99999);
        ResetPlayerWeapons(plid);
        dini_IntSet(file2, "Preso", 1);
        SendClientMessage(playerid, COLOR_GREEN, "(INFO) Preso com sucesso.");
        preso[plid] = 1;
        TogglePlayerControllable(plid, 1);
        if(Procurados[plid] == 1) {
            GivePlayerGrana(playerid,5000);
            Procurados[plid] = 0;
            SendClientMessage(playerid, Verde, "(INFO) Vocк prendeu um jogador procurado e ganhou 5 mil!");
            dini_IntSet(file2, "Procurado", 0);
        }
        return 1;
    }
    return 1;
}

pawn Код:
if(strcmp(cmd, "/algemar", true) == 0) {
new aname[MAX_PLAYER_NAME];
GetPlayerName(playerid, aname, MAX_PLAYER_NAME);
format(file, sizeof(file), P_CONTAS, aname);
if(dini_Int(file, "Profissao") == Policial_M || dini_Int(file, "Profissao") == Policial_C || dini_Int(file, "Profissao") == Policial_F || dini_Int(file, "Profissao") == Recruta || dini_Int(file, "Profissao") == Bope || dini_Int(file, "Profissao") == Swat || dini_Int(file, "Profissao") == Rotam || dini_Int(file, "Profissao") == FBI || dini_Int(file, "Profissao") == Interpol ||dini_Int(file, "Profissao") == LSPD || dini_Int(file, "pAdm01") == 1){
new tmp[256];
new plid;//=======================linha 12201===================
tmp = strtok(cmdtext, idx);
if(!strlen(tmp)){
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} Use: /algemar [id]");
return 1;
}
plid = strval(tmp);
if(IsPlayerInAnyVehicle(plid) == 1 || IsPlayerInAnyVehicle(playerid) == 1){
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} Alguem estб dentro de um carro.");
return 1 ;
}
if(plid == playerid){
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} Vocк nгo pode algemar vocк mesmo.");
return 1 ;//=======================linha 12214===================
}
if(!IsPlayerConnected(plid)){
SendClientMessage(playerid, Vermelho, "{0099FF}[x]{CCCCFF} O jogador nгo estб conectado");
return 1;
} else {
if(GetDistanceBetweenPlayers(plid,playerid) < 10){
format(string, sizeof(string), "{0099FF}(~){CCCCFF} O Policial %s te algemou.", aname);
SendClientMessage(plid, AzuL4, string);
TogglePlayerControllable(plid, 0);
SendClientMessage(playerid, COLOR_GREEN, "{0099FF}(~){CCCCFF} Algemado com sucesso.");
algemado[plid] = 1;
return 1;
} else {
SendClientMessage(playerid,Vermelho,"{0099FF}[x]{CCCCFF} Chegue mais perto para algemar.");
return 1;
}
}
} else {
SendClientMessage(playerid,Vermelho,"{0099FF}[x]{CCCCFF} Apenas policiais podem usar este comando.");
return 1;
}
}




O erro na hora de copilar.
Erro:
pawn Код:
D:\Meu servidor samp\gamemodes\GM.pwn(12408) : warning 225: unreachable code
D:\Meu servidor samp\gamemodes\GM.pwn(12409) : warning 202: number of arguments does not match definition
D:\Meu servidor samp\gamemodes\GM.pwn(14201) : warning 202: number of arguments does not match definition
D:\Meu servidor samp\gamemodes\GM.pwn(14214) : warning 202: number of arguments does not match definition
Pawn compiler 3.2.3664          Copyright (c) 1997-2006, ITB CompuPhase

Header size:           6456 bytes
Code size:           940676 bytes
Data size:          1132396 bytes
Stack/heap size:      16384 bytes; estimated max. usage: unknown, due to recursion
Total requirements: 2095912 bytes

4 Warnings.

Se alguem achar o erro comenta ai...
Reply


Messages In This Thread
comand com problema /prender - by costadd - 07.10.2013, 09:37
Re: comand com problema /prender - by JonathanFeitosa - 07.10.2013, 17:36
Re: comand com problema /prender - by Duduzinho - 07.10.2013, 17:54
Re: comand com problema /prender - by Zivo - 07.10.2013, 17:57
Re: comand com problema /prender - by Menor - 07.10.2013, 18:41
Re: comand com problema /prender - by PT - 07.10.2013, 18:56
Re: comand com problema /prender - by TheKoDaK - 07.10.2013, 19:13

Forum Jump:


Users browsing this thread: 1 Guest(s)