Reading From File
#1

Hello!
How can i open this string from file with Dialog?
pawn Код:
CMD:ban(playerid, params[])
{  
format( iString,    258, "===============================================\r\n\
                              Admin: %s\r\n\
                              Level: %d\r\n\
                              Player: %s\r\n\
                              Date: %d/%d/%d at %d:%d\r\n\
                              Reason: %s\r\n\
                              ===============================================\r\n\r\n\r\n"
,
                              PlayerName2( playerid ),
                              P_DATA[ playerid ][ P_Level ],
                              PlayerName2( params[ 0 ] ),
                              D,
                              M,
                              Y,
                              H,
                              Mi,
                              params[ 1 ] );


    FILE = fopen(SlogBan, io_append);
    if (FILE)
    {
        fwrite(FILE, iString);
        fclose(FILE);
    }
Reply
#2

Why don't You please Use Y_INI ? ? ? ? ?
Reply
#3

bcause ywrite faster than y_ini
Reply
#4

Quote:
Originally Posted by HerBan
Посмотреть сообщение
How can i open this string from file with Dialog?
fread can be used to read from files.
the wiki has a nice example too.

i'd also suggest reading&writing binary that'll be faster. read more about it here
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)