SA-MP Forums Archive
[Ajuda] comando - 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 (/showthread.php?tid=588858)



comando - Lucas_HenryK - 13.09.2015

pawn Код:
CMD:djs(playerid,params[]) {
    static String[160], String2[160];

    static leban[64];

    format(leban,sizeof(leban),"SELECT * FROM `Djs` WHERE DjLevel < 1");

    mysql_query(mysql, leban);
    mysql_store_result();

    for(new i = 0; i < MAX_PLAYERS; i++) {
        new DjLevelName[30];
        if(DjLevel[i] >= 1) {
       
            if(DjLevel[i] == 1) DjLevelName = "Civil";
            if(DjLevel[i] == 2) DjLevelName = "Dj";
       
            if(mysql_num_rows() > 0) {
                static result[100],djname[25],djlevel,djdia,djmes,djano;

                if(mysql_fetch_row(result)) {
                    sscanf(result,"p<|>s[25]dddd",djname,djlevel,djdia,djmes,djano);
                }

                format(String,sizeof(String),"%s[%d] - Dj Desde: %d/%d/%d\n",djname,djlevel,djdia,djmes,djano);
                strcat(String2, String);
               
                ShowPlayerDialog(playerid, DIALOG_DJS, DIALOG_STYLE_INPUT, "Djs Online",String2,"Pedir", "");
                return 0;
            }
            mysql_free_result();
        }
    }
    return 1;
}
oque ta errado? alguem me ajuda concertar? n exibi nada..


Re: comando - PT - 13.09.2015

Melhor dizendo, o que era suposto este comando fazer?

explique o problema que ta tendo para podermos ajudar.


Re: comando - Lucas_HenryK - 13.09.2015

exibir os jogadores que tem a variavel DjLevel maior que 1 e exbiri os dj offline e desde quando ele й dj (que salva por mysql)


Re: comando - Lucas_HenryK - 14.09.2015

alguem