07.09.2010, 18:33
(
Последний раз редактировалось Kwarde; 10.09.2010 в 06:17.
)
This function saves a string to a file.
Very simple, but it can be very handy!
I am using this much for logs 
For example:
Very easy 
This is better then use the fopen, fwrite etc again and again....
Very simple, but it can be very handy!
Код:
stock SaveStringToFile(content[], filename[])
{
new File:usfl = fopen(filename, io_append);
fwrite(usfl, content);
fclose(usfl);
}

For example:
Код:
}
else //A login code above this, don't need it here ;) So this 'else' means: WRONG PASSWORD
{
new year,month,day,hours,minutes,seconds; getdate(year,month,day);gettime(hours,minutes,seconds);
Kick(playerid);
format(string, sizeof(string), "%s [%d-%d-%d %d:%d:%d], Kicked by: ADMIN BOT\r\n", PlayerName[playerid], day, month, year, hours, minutes, seconds);
SaveStringToFile(string, "LOGS/KickLog.log");
}

This is better then use the fopen, fwrite etc again and again....

