SA-MP Forums Archive
No se ejecuta el loop - 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: Español/Spanish (https://sampforum.blast.hk/forumdisplay.php?fid=29)
+---- Thread: No se ejecuta el loop (/showthread.php?tid=480299)



No se ejecuta el loop - ForTrezZ - 09.12.2013

Bueno, estoy haciendo un comando en el cual aparescan los admins OnLine, pero al ejecutar el comando las variables "c" y "d" no se suman! y yo ya me loggie rcon ! la verdad no entiendo que pasa !, espero que me puedan ayudar, de ante mano muchas gracias!

pawn Код:
new str[256], c, d;
    format(str, 256, "Admins online:\n");
    for(new i = 0; i < MAX_PLAYERS; i++)
    {
        if(IsPlayerAdmin(i))
        {
            c++;
            new str2[30];
            format(str2, 30, "{FFFFFF}RCON:\t{FF0000}%s\n", PlayerName2(i));
            strcat(str, str2);
        } else if (PlayerInfo[i][Level] != 0) {
            d++;
            new str2[30];
            format(str2, 30, "{FFFFFF}Admin:\t{FF0000}%s[LEVEL: $d]\n", PlayerName2(i), PlayerInfo[i][Level]);
        }
    }
    if(c == 0 || d == 0) SendClientMessage(playerid, -1, "En estos momentos no se puede dar a conocer la lista de administradores.");
    else ShowPlayerDialog(playerid, D_LOGIN+3, DIALOG_STYLE_MSGBOX, "Admins OnLine:", str, "Ok", "");
ah y muchas gracias a adri1 por el codigo !


Respuesta: No se ejecuta el loop - Zume - 10.12.2013

Que bueno verte por aquн nena :3

pawn Код:
new str[256],str2[180], c, d;
                format(str, 256, "Admins online:\n");
                for(new i = 0; i < MAX_PLAYERS; i++)
                {
                    if(IsPlayerAdmin(i))
                    {
                        c++;
                        format(str2, 30, "{FFFFFF}RCON:\t{FF0000}%s\n", PlayerName2(i));
                    }
                 if (PlayerInfo[i][Level] != 0) {
                        d++;
                        format(str2, 30, "{FFFFFF}Admin:\t{FF0000}%s[LEVEL: $d]\n", PlayerName2(i), PlayerInfo[i][Level]);
                    }
                    strcat(str, str2);
                }
                if(c == 0 || d == 0) SendClientMessage(playerid, -1, "En estos momentos no se puede dar a conocer la lista de administradores.");
                else ShowPlayerDialog(playerid, D_LOGIN+3, DIALOG_STYLE_MSGBOX, "Admins OnLine:", str, "Ok", "");



Respuesta: No se ejecuta el loop - ForTrezZ - 10.12.2013

Gracias cariсo :$