SA-MP Forums Archive
[AJUDA]Procurar - 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]Procurar (/showthread.php?tid=280594)



[AJUDA]Procurar - ProcessFail - 02.09.2011

Pessoal to com problema nesse sistema, eu utilizo ele apenas uma vez no servidor, depois ele fica bugado,e nгo funciona mais.

PHP код:
if(strcmp(cmd"/desprocurar"true) == 0)
if(
dini_Int(file"aAdmin") == 1){
new 
tmp[256];
tmp strtok(cmdtextidx);
new 
plid;
plid strval(tmp);
if(!
strlen(tmp))
{
SendClientMessage(playerid0xFFD39BAA"Use: /desprocurar [id]");
return 
1;
}
if(
IsPlayerConnected(plid))
{
    new 
str[128];
             new 
giveplayer[MAX_PLAYER_NAME];
             new 
sendername[MAX_PLAYER_NAME];
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
GetPlayerName(plidgiveplayersizeof(giveplayer));
            
format(strsizeof(str), "(INFO) Vocк foi retirado da lista de procurados pelo Juiz %s"sendername);
            
SendClientMessage(plid0xFFD39BAAstr);
            
format(strsizeof(str), "(INFO) Vocк retirou o jogador %s da lista de procurados!"giveplayer);
            
SendClientMessage(playerid0xFFD39BAAstr);
dini_IntSet(file"Procurado"0);
SetPlayerWantedLevel(plid0);
Procurados[plid]= 0;
return 
1;
}
else
{
SendClientMessage(playerid0xFFD39BAA"(ERRO) Jogador nгo conectado ou esse e seu id");
return 
1;
}
}
if(
strcmp(cmd"/procurar"true) == 0)
if(
dini_Int(file"aAdmin") == 1){
new 
tmp[256];
tmp strtok(cmdtextidx);
new 
plid;
plid strval(tmp);
if(!
strlen(tmp))
{
SendClientMessage(playerid0xFFD39BAA"Use: /procurar [id]");
return 
1;
}
if(
IsPlayerConnected(plid))
{
    new 
str[128];
             new 
giveplayer[MAX_PLAYER_NAME];
             new 
sendername[MAX_PLAYER_NAME];
            
GetPlayerName(playeridsendernamesizeof(sendername));
            
GetPlayerName(plidgiveplayersizeof(giveplayer));
            
format(strsizeof(str), "(INFO) Vocк foi colocado na lista de procurados pelo Juiz %s"sendername);
            
SendClientMessage(plid0xFFD39BAAstr);
            
format(strsizeof(str), "(INFO) Vocк coloco o jogador %s na lista de procurados!"giveplayer);
            
SendClientMessage(playerid0xFFD39BAAstr);
dini_IntSet(file"Procurado"1);
SetPlayerWantedLevel(playeridGetPlayerWantedLevel(playerid)+0);
Procurados[plid]= 1;
return 
1;
}
else
{
SendClientMessage(playerid0xFFD39BAA"(ERRO) Jogador nгo conectado ou esse e seu id");
return 
1;
}




Re: [AJUDA]Procurar - You_Tube - 02.09.2011

Aconselho Vc Pegar o Cod /Procurar do GM do BMG Dai Funfa Tranquilo


Re: [AJUDA]Procurar - StrondA_ - 02.09.2011

tenta:
pawn Код:
if(strcmp(cmd, "/desprocurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    new plid;
    plid = strval(tmp);
    if(!strlen(tmp)) {
        SendClientMessage(playerid, 0xFFD39BAA, "Use: /desprocurar [id]");
        return true;
    }
    if(IsPlayerConnected(plid)) {
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi retirado da lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк retirou o jogador %s da lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 0);
        SetPlayerWantedLevel(plid, 0);
        Procurados[plid]= 0;
        return true;
    }
    else {
        SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        return true;
    }
}

if(strcmp(cmd, "/procurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
{
    new tmp[256];
    tmp = strtok(cmdtext, idx);
    new plid;
    plid = strval(tmp);
    if(!strlen(tmp)) {
        SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id]");
        return true;
    }
    if(IsPlayerConnected(plid)) {
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi colocado na lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк coloco o jogador %s na lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 1);
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+0);
        Procurados[plid]= 1;
        return true;
    }
    else {
        SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        return true;
    }
}
Caso nгo funcionar, posta ai novamente!


Re: [AJUDA]Procurar - ProcessFail - 04.09.2011

Deu um problema, nгo sei se foi conflito ou oq

PHP код:
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol
D
:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint"
D:\SAMP\Gamemodes\BPG_atual2.pwn(1618) : error017undefined symbol "CPS_AddCheckpoint" 



Re: [AJUDA]Procurar - JonathanFeitosa - 04.09.2011

pawn Код:
if(strcmp(cmd, "/desprocurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /desprocurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi retirado da lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк retirou o jogador %s da lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 0);
        SetPlayerWantedLevel(plid, 0);
        Procurados[plid]= 0;
        return true;
    }
    return tre;
}

if(strcmp(cmd, "/procurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi colocado na lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк coloco o jogador %s na lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 1);
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+0);
        Procurados[plid]= 1;
        return true;
    }
    return true;
}



Re: [AJUDA]Procurar - ProcessFail - 04.09.2011

Quote:
Originally Posted by Jonathan_Feitosa
Посмотреть сообщение
pawn Код:
if(strcmp(cmd, "/desprocurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /desprocurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi retirado da lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк retirou o jogador %s da lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 0);
        SetPlayerWantedLevel(plid, 0);
        Procurados[plid]= 0;
        return true;
    }
    return tre;
}

if(strcmp(cmd, "/procurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[128];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi colocado na lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк coloco o jogador %s na lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 1);
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+0);
        Procurados[plid]= 1;
        return true;
    }
    return true;
}
agora deu isso aqui

PHP код:
D:\SAMP\Gamemodes\BPG_atual2.pwn(9134) : error047: array sizes do not match, or destination array is too small
D
:\SAMP\Gamemodes\BPG_atual2.pwn(9153) : error017undefined symbol "tre"
D:\SAMP\Gamemodes\BPG_atual2.pwn(9161) : error047: array sizes do not match, or destination array is too small 



Re: [AJUDA]Procurar - JonathanFeitosa - 04.09.2011

pawn Код:
if(strcmp(cmd, "/desprocurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[256];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /desprocurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi retirado da lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк retirou o jogador %s da lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 0);
        SetPlayerWantedLevel(plid, 0);
        Procurados[plid]= 0;
        return true;
    }
    return true;
}

if(strcmp(cmd, "/procurar", true) == 0)
{
    if(dini_Int(file, "aAdmin") == 1)
    {
        new tmp[256];
        tmp = strtok(cmdtext, idx);
        new plid;
        plid = strval(tmp);
        if(!strlen(tmp)) return SendClientMessage(playerid, 0xFFD39BAA, "Use: /procurar [id]");
        if(IsPlayerConnected(plid)) return SendClientMessage(playerid, 0xFFD39BAA, "(ERRO) Jogador nгo conectado ou esse e seu id");
        new str[128];
        new giveplayer[MAX_PLAYER_NAME];
        new sendername[MAX_PLAYER_NAME];
        GetPlayerName(playerid, sendername, sizeof(sendername));
        GetPlayerName(plid, giveplayer, sizeof(giveplayer));
        format(str, sizeof(str), "(INFO) Vocк foi colocado na lista de procurados pelo Juiz %s", sendername);
        SendClientMessage(plid, 0xFFD39BAA, str);
        format(str, sizeof(str), "(INFO) Vocк coloco o jogador %s na lista de procurados!", giveplayer);
        SendClientMessage(playerid, 0xFFD39BAA, str);
        dini_IntSet(file, "Procurado", 1);
        SetPlayerWantedLevel(playerid, GetPlayerWantedLevel(playerid)+0);
        Procurados[plid]= 1;
        return true;
    }
    return true;
}
Erro de digitaзгo kk.
Manda a Linha dos outros erros.


Re: [AJUDA]Procurar - ProcessFail - 04.09.2011

Agora nгo deu erro, mas sу diz que o jogador nгo esta conectado, nos 2 comandos


Re: [AJUDA]Procurar - ProcessFail - 04.09.2011

Sabem o que pode ser?


Re: [AJUDA]Procurar - JonathanFeitosa - 04.09.2011

Antes Dava Isso ?