reports command problem and help
#2

Write it like this:

PHP код:
CMD:reports(playerid,params[])
{
    new 
string[512];
    if(
PInfo[playerid][Level] < 1) return SendClientMessage(playerid,STEALTH_BLUE,"You need to be level 1 to check reports.");
    if(!
fexist("Reports/Report.txt")) return SendClientMessage(playerid,STEALTH_BLUE,"The report file doesn't exist!");
    new 
File:fopen("Reports/Report.txt",io_read),counter,i;
    while(
fread(f,string)) counter++;
    
fclose(f),f=fopen("Reports/Report.txt",io_read);
    while(
fread(f,string,sizeof stringfalse))
    {
        if(
>= (counter-0x5)) SendClientMessage(playerid,COLOR_MENUHIGHLIGHT,string);
        
i++;
    }
    
fclose(f);
    return 
1;

Greekz
Reply


Messages In This Thread
reports command problem and help - by Nabster - 05.03.2015, 14:07
AW: reports command problem and help - by Kaliber - 05.03.2015, 14:39
Re: reports command problem and help - by Nabster - 05.03.2015, 15:05
AW: reports command problem and help - by Kaliber - 05.03.2015, 15:10
Re: reports command problem and help - by Nabster - 05.03.2015, 15:37

Forum Jump:


Users browsing this thread: 3 Guest(s)