02.08.2011, 02:20
With y_ini:
pawn Код:
stock SLog(stringtext1[],stringtext2[],name[])
{
new INI:file = INI_Open(name);
INI_WriteString(file,stringtext1,stringtext2);
INI_Close(file);
return 1;
}
//That stock will write "stringtext1 = stringtext2" inside "name" file.
//f.e:
stock STimeDate()
{
new Times[2],Dates[3],string[64];
gettime(Times[0],Times[1]);
getdate(Dates[0],Dates[1],Dates[2]);
CostumFormat(string,"%d/%d/%d - %d:%d",Dates[2],Dates[1],Dates[0],Times[0],Times[1]);
return string;
}
//Somewhere
SLog(STimeDate(),"blahblahblah","Testfile.ini")
//That code will write "day/month/year - hour:minute = blahblahblah" inside "Testfile.ini" file.