[date][time]LeXuZ has reported Player for hacking "Open" "Close"
[date][time]LeXuZ has reported player for hacking "Ban" "Delete"
CMD:report(playerid, params[])
{
new reason[128];
if(sscanf(params, "us[128]", ID, reason)) return SCM(playerid, red, "--- /report <ID> <Reason> ---");
new string[150], sender[MAX_PLAYER_NAME], receiver[MAX_PLAYER_NAME];
GetPlayerName(playerid, sender, sizeof(sender));
GetPlayerName(ID, receiver, sizeof(receiver));
format(string, sizeof(string), "%s(%d) has reported %s(%d) for %s", sender, playerid, receiver, ID, reason);
SendReportToAdmins(string);
ReportLog(playerid, string);
return 1;
}
stock ReportLog(playerid, text[])
{
new
File:lFile = fopen("Core/Logs/Report.txt", io_append),
logData[178],
fyear, fmonth, fday,
fhour, fminute, fsecond;
getdate(fyear, fmonth, fday);
gettime(fhour, fminute, fsecond);
format(logData, sizeof(logData),"[%02d/%02d/%04d %02d:%02d:%02d] (report) %s \r\n", fday, fmonth, fyear, fhour, fminute, fsecond, text);
fwrite(lFile, logData);
fclose(lFile);
SCM(playerid, red, "Reported!");
return 1;
}
ACMD:reports(playerid, params[])
{
if (pInfo[playerid][Adminlevel] < 1) return 0;
ShowPlayerDialog(playerid, reports, DIALOG_STYLE_LIST, "Reports", "", "Select", "Close");//don't know what to do in here
return 1;
}
ACMD:reports(playerid, params[])
{
if (pInfo[playerid][Adminlevel] < 1) return 0;
new File:filex = fopen("Core/Logs/Report.txt", io_read) // Opens the reports file
new buf[129]; // the string variable which we are gonna return the loaded string in.
new str[129]; // we are gonna use this later..
if(filex) // if the file exists
{
print("Reports file loaded successfully."); // for debugging.
while(fread(filex, buf)) // a "while" loop for reading ALL the file and store it in the "buf"
{
format(str, sizeof str, "%s\n", buf); // formating the buf in the str, and put "\n" to start a new line if needed.
ShowPlayerDialog(playerid, reports, DIALOG_STYLE_LIST, "Reports", str, "Select", "Close"); // putting the str
}
}
return 1;
}
ACMD:reports(playerid, params[])
{
if (pInfo[playerid][Adminlevel] < 1) return 0;
new File:filex = fopen("Core/Logs/Report.txt", io_read) // Opens the reports file
new buf[80]; // the string variable which we are gonna return the loaded string in.
new str[500]; // we are gonna use this later..
bool firstline = true;
if(filex) // if the file exists
{
print("Reports file loaded successfully."); // for debugging.
while(fread(filex, buf)) // a "while" loop for reading ALL the file and store it in the "buf"
{ if(firstline)strcat(str,buf);//if it is first line then we will not add new line character( '\n' )
else { strcat(str, "\n"); strcat(str, buf); }
firstline = false;
}
ShowPlayerDialog(playerid, reports, DIALOG_STYLE_LIST, "Reports", str, "Select", "Close"); // Swahala putted it inside while it should be outside
}
return 1;
}
ACMD:reports(playerid, params[])
{
if (pInfo[playerid][Adminlevel] < 1) return 0;
new File:filex = fopen("Core/Logs/Report.txt", io_read); // Opens the reports file
new buf[80]; // the string variable which we are gonna return the loaded string in.
new str[500]; // we are gonna use this later..
bool firstline = true; //error
if(filex) // if the file exists
{
print("Reports file loaded successfully."); // for debugging.
while(fread(filex, buf)) // a "while" loop for reading ALL the file and store it in the "buf" Error
{
if(firstline)strcat(str,buf);//if it is first line then we will not add new line character( '\n' )//error
else
{
strcat(str, "\n"); strcat(str, buf); }
firstline = false;
}
SPD(playerid, reports, DIALOG_STYLE_LIST, "Reports", str, "Select", "Close"); // Swahala putted it inside while it should be outside
}
return 1;
}
}
C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(808) : error 017: undefined symbol "bool" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(808) : error 017: undefined symbol "firstline" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(808) : warning 215: expression has no effect C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(813) : error 017: undefined symbol "firstline" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(815) : warning 217: loose indentation C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(815) : error 017: undefined symbol "firstline" C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(815) : warning 215: expression has no effect C:\Users\BLACK\Desktop\Test\filterscripts\Accounts0.6.pwn(817) : warning 217: loose indentation
new bool:firstline;
ACMD:reports(playerid, params[])
{
new bool;
new bool:firstline;
if (pInfo[playerid][Adminlevel] < 1) return 0;
new File:filex = fopen("Core/Logs/Report.txt", io_read); // Opens the reports file
new buf[80]; // the string variable which we are gonna return the loaded string in.
new str[500]; // we are gonna use this later..
bool firstline = true; //error
if(filex) // if the file exists
{
print("Reports file loaded successfully."); // for debugging.
while(fread(filex, buf)) // a "while" loop for reading ALL the file and store it in the "buf" Error
{
if(firstline)strcat(str,buf);//if it is first line then we will not add new line character( '\n' )//error
else
{
strcat(str, "\n"); strcat(str, buf); }
firstline = false;
}
SPD(playerid, reports, DIALOG_STYLE_LIST, "Reports", str, "Select", "Close"); // Swahala putted it inside while it should be outside
}
return 1;
}
C:\Users\BLACK\Desktop\Test\filterscripts\Accounts 0.6.pwn(810) : warning 215: expression has no effect C:\Users\BLACK\Desktop\Test\filterscripts\Accounts 0.6.pwn(810) : error 001: expected token: ";", but found "-identifier-" |