[Ajuda] Comando /procurados
#1

O comando abaixo tem 2 bugs:
1 - Quando o player procurado sai do server, seu nick continua ali;
2 - Veja o print abaixo:
[Image: procurados.png]

pawn Код:
CMD:procurados(playerid, params[])
{
    static arm[500]; arm[0] = '\0';
    static str[500];  str[0] = '\0';
    static Nome[24]; Nome[0] = '0';
    new count;
    new preso[32];
    for(new i=0;i<MAX_PLAYERS;i++) {
        if(procurado[i] > 0) {
            count++;
            GetPlayerName(i, Nome, sizeof(Nome));
            if(Prisao[i]==1)preso="{00FF00}Sim";
            if(Prisao[i]==0)preso="{FF0000}Nгo";
            format(str, sizeof(str),"{FFFFFF}Nome: {FF0000}%s {FFFFFF}[%i] {FF0000}(Nнvel: %d) {FFFFFF}| Preso: %s{FFFFFF}\n", Nome, i, GetPlayerWantedLevel(i), preso);
            strcat(arm, str);
        }
    }
    if(count<=0)return ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", "{00FF00}Nenhum suspeito online", "OK", "");
    if(count>0)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", arm, "OK", "");
    return 1;
}
Reply
#2

pawn Код:
CMD:procurados(playerid, params[])
{
    static arm[500]; arm[0] = '\0';
    static str[500];  str[0] = '\0';
    static Nome[24]; Nome[0] = '0';
    new count;
    new preso[32];
    for(new i=0;i<MAX_PLAYERS;i++) {
    if(IsPlayerConnected(i){
        if(procurado[i] > 0) {
            count++;
            GetPlayerName(i, Nome, sizeof(Nome));
            if(Prisao[i]==1)preso="{00FF00}Sim";
            if(Prisao[i]==0)preso="{FF0000}Nгo";
            format(str, sizeof(str),"{FFFFFF}Nome: {FF0000}%s {FFFFFF}[%i] {FF0000}(Nнvel: %d) {FFFFFF}| Preso: %s{FFFFFF}\n", Nome, i, GetPlayerWantedLevel(i), preso);
            strcat(arm, str);
        }
    }
    if(count<=0)return ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", "{00FF00}Nenhum suspeito online", "OK", "");
    if(count>0)ShowPlayerDialog(playerid, 10, DIALOG_STYLE_MSGBOX, "===== {FF0000}Procurados{FFFFFF} ======", arm, "OK", "");
    return 1;
}
Tenta aн
Reply
#3

gostei desse sisteminha, parabйns!
Reply
#4

Quote:
Originally Posted by Urubu_Rei
Посмотреть сообщение
gostei desse sisteminha, parabйns!
._. ok rs
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)