[Ajuda] Dialog
#4

pawn Код:
CMD:log(playerid) {

    if ( !IsPlayerAdmin(playerid) )
        return SendClientMessage(playerid,-1,"{ff0000}You are not authorized to use this command.");

    new read[24], str[128], stroutput[500], arquivoBAN[24];
    new File:log = fopen("unban_log.txt", io_read);

    while ( fread(log, read) ) {

        format(arquivoBAN, "Banidos/%s.ini", read);

        if ( fexist(read) ) {

           format(str, 128, "Nome do banido: %s - Data de banimento: %s - Admin responsбvel: %s\n", DOF2_GetString(arquivoBAN, "Nome"), DOF2_GetString(arquivoBAN, "Data"), DOF2_GetString(arquivoBAN, "Admin") );
           strcat(stroutput, str);
        }
    }
    fclose(log);

    return ShowPlayerDialog(playerid, 110, DIALOG_STYLE_MSGBOX, "{00BFFF}Showing Un-Ban Log", stroutput, "Cool", "");
}

O arquivo unban_log.txt deve estar da seguinte maneira:

PHP код:
NOME_DO_BANIDO
NOME_DO_BANIDO2
NOME_DO_BANIDO3 
Reply


Messages In This Thread
Dialog - by Ts3 - 12.12.2014, 23:13
Re: Dialog - by JonathanFeitosa - 12.12.2014, 23:22
Re: Dialog - by MultiKill - 12.12.2014, 23:22
Re: Dialog - by Gii - 12.12.2014, 23:34
Re: Dialog - by Ts3 - 13.12.2014, 00:55
Re: Dialog - by MultiKill - 13.12.2014, 01:14
Re: Dialog - by Ts3 - 13.12.2014, 01:42
Re: Dialog - by MultiKill - 13.12.2014, 02:00
Re: Dialog - by Ts3 - 13.12.2014, 04:00

Forum Jump:


Users browsing this thread: 1 Guest(s)