28.08.2015, 17:38
Use this
PHP код:
forward GetINIString(file[], result[], len_result);
public GetINIString(file[], result[], len_result)
{
new File:inifile;
inifile = fopen(file, io_read);
if(!inifile)
{
printf("Fatal Error: Couldn't open \"%s\"!", file);
return 0;
}
while(fread(inifile, result)) {
format(result, len_result, "%s", result);
}
fclose(inifile);
return 1;
}
forward WriteNIString(file[], string[]);
public WriteNIString(file[], string[])
{
new File:inifile;
inifile = fopen(file, io_write);
if(!inifile)
{
printf("Fatal Error: Couldn't open \"%s\"!", file);
return 0;
}
fwrite(inifile, string);
fclose(inifile);
return 1;
}