Help with a command.
#1

I made a command that when you write the command it will show you the kills logs which is stored as a INI file, now It doesn't work I don't know how to make the command read from the file, can any one check it ?
pawn Код:
if (strcmp(cmd, "/killlogs", true) ==0 )
    {
        if(IsPlayerConnected(playerid))
        {
            if(gPlayerLogged[playerid] == 1)
            {
                SendClientMessage(playerid, COLOR_WHITE, string);
                    format(string, 256, "%s's Kill Record: %s", sendername);
                return 1;
            }
            GetPlayerName(playerid, sendername, sizeof(sendername));
            format(string, sizeof(string), "Adminjail/%s.ini", sendername);
            new File: hFile = fopen(string, io_read);
            if (hFile)
            {
               
                return 1;
            }
Reply
#2

First of all, extensions are there for description only, I guess, but who use "ini" as the extension if it's a log file?
I recommend either using .log or .txt

But as I said, you can use whatever you want..

Ontopic:

Search. There are lots of topics about this already, and I think some tutorials too (including File_Functions @ wiki.sa-mp.com)
Reply
#3

But how can I define on the command that he will read and show the file ingame ? that's is my question what should I add ? .
Reply
#4

solved !!!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)