20.04.2013, 00:59
Would this work? (Cant try it out so asking you for now)
Still noob in scripting in my opinion so please point out if i made some misstakes
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;
}
