Latest 6 reports - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: Latest 6 reports (
/showthread.php?tid=250715)
[HELP]Please help with fread() I need it :\ -
Seven_of_Nine - 24.04.2011
pawn Код:
COMMAND:reports(playerid) {
new
text[128];
if(PlayerInfo[playerid][pAdminLevel] >= 1) {
new File:file;
file = fopen("Logs\report.txt",io_read);
for(new i = 0; i < 6; ++i) {
while(fread(file,text)) {
SendClientMessage(playerid,white,text);
}
}
fclose(file);
} else {
return SendClientMessage(playerid,red,"Only admins can use this command!");
}
return 1;
}
This simply crashes my server.
So how do I check the 6 latest reports from that file?
Thx
Re: Latest 6 reports -
Seven_of_Nine - 24.04.2011
Anyone can solve this