problem help +rep
#8

Here you have

Код:
}

CheckPH(playerid)
{
        if(PlayerInfo[playerid][pPnumber] == 0) {return 0;}
        new PHList[256];
        new number;
        new string[512];
        if(!fexist("PHList.cfg")) makefamily("PHList.cfg");
        new File: file = fopen("PHList.cfg", io_read);
        if (file)
		{
            while(fread(file, string))
			{
            	strmid(PHList, string, 0, strlen(string)-2, 255);
                number = strval(PHList);
                if (number == PlayerInfo[playerid][pPnumber])
				{
                	fclose(file);
                    return 1;
    			}
			}
            fclose(file);
            new File: file2 = fopen("PHList.cfg", io_append);
            format(string, sizeof(string), "%d\r\n", PlayerInfo[playerid][pPnumber]);
            fwrite(file2, string);
            fclose(file2);
            printf("New number added to PHList.cfg, ph:%d player:%s", PlayerInfo[playerid][pPnumber], GetPlayerNameEx(playerid));
            return 0;
        }
        return 1;
}
Reply


Messages In This Thread
problem help +rep - by N0FeaR - 10.01.2012, 18:02
Re: problem help +rep - by Marshall32 - 10.01.2012, 18:05
Re: problem help +rep - by N0FeaR - 10.01.2012, 20:21
Re: problem help +rep - by Tanush123 - 10.01.2012, 20:35
Re: problem help +rep - by Mrki_Drakula - 10.01.2012, 20:51
Re: problem help +rep - by N0FeaR - 10.01.2012, 23:39
Re: problem help +rep - by Mrki_Drakula - 11.01.2012, 06:40
Re: problem help +rep - by N0FeaR - 11.01.2012, 06:42
Re: problem help +rep - by Mrki_Drakula - 11.01.2012, 06:43
Re: problem help +rep - by Mrki_Drakula - 11.01.2012, 06:45

Forum Jump:


Users browsing this thread: 1 Guest(s)