Where does this save/show?
#5

Would this work? (Cant try it out so asking you for now)

pawn Код:
#define MAX_BUGS 9 // on top
new Suggestions[MAX_BUGS][128]; // top

public BugsLog(string[])
{
    new entry[256];
    format(entry, sizeof(entry), "%s\r\n",string);
    new File:hFile;
    hFile = fopen("LARP/Logs/bugs.log", io_append);
    fwrite(hFile, entry);
    fclose(hFile);
}

    for(new i = 1; i < MAX_BUGS; i++) Suggestions[i] = "<none>";// OnGameModeInit
// And then the command
    if(strcmp(cmd, "/bugs", true) == 0)
    {
        if(PlayerInfo[playerid][pAdmin] >= 1)
        {
            new SuggestionCount;
            for(new i = 1; i < MAX_BUGS; i++)
            {
                if(strcmp( Suggestions[i], "<none>", true) != 0) { SuggestionCount++; SendClientMessage(playerid, COLOR_GRAD3, "Last Nine Bugs/Suggestions:"); SendClientMessage(playerid,COLOR_GRAD1,Suggestions[i]); }
            }
            if(SuggestionCount == 0)
            {
                SendClientMessage(playerid,COLOR_GRAD1," There have been no reports of bugs or any suggestions");
            }
        }
        else
        {
            SendClientMessage(playerid,COLOR_GRAD1,"ERROR: You are not Authorized to use This Command!");
        }
        return 1;
    }
Still noob in scripting in my opinion so please point out if i made some misstakes
Reply


Messages In This Thread
Where does this save/show? - by Don_Cage - 20.04.2013, 00:42
Re: Where does this save/show? - by jakejohnsonusa - 20.04.2013, 00:43
Re: Where does this save/show? - by Don_Cage - 20.04.2013, 00:44
Re: Where does this save/show? - by jakejohnsonusa - 20.04.2013, 00:46
Re: Where does this save/show? - by Don_Cage - 20.04.2013, 00:59

Forum Jump:


Users browsing this thread: 2 Guest(s)