Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stock WriteToFile(file[],string[])
- {
- new File:filea = fopen(file,io_append);
- fwrite(filea, string);
- -----------------------------------
- stock LogAccount(const text[])
- {
- new final[256], Int[6],fileo[64];
- getdate(Int[0],Int[1],Int[2]);
- new File:file = fopen("tf2/logs/account.ini",io_append);
- gettime(Int[3],Int[4],Int[5]);
- format(final, sizeof(final),"[%d/%d/%d] [%d:%d:%d] %s\r\n",Int[2],Int[1],Int[0],Int[3],Int[4],Int[5],text);
- fwrite(file, final);
- fclose(file);
- format(fileo, sizeof(fileo),"tf2/logs/account/%d-%d-%d.ini",Int[2],Int[1],Int[0]);
- new File:file2 = fopen(fileo,io_append);
- format(final, sizeof(final),"[%d:%d:%d] %s\r\n",Int[3],Int[4],Int[5],text);
- fwrite(file2, final);
- fclose(file2);
- return 1;
- }
- ---------------------------
- stock LogPunishment(const text[])
- {
- new final[256], Int[6],fileo[64];
- getdate(Int[0],Int[1],Int[2]);
- new File:file = fopen("tf2/logs/punishments.ini",io_append);
- gettime(Int[3],Int[4],Int[5]);
- format(final, sizeof(final),"[%d/%d/%d] [%d:%d:%d] %s\r\n",Int[2],Int[1],Int[0],Int[3],Int[4],Int[5],text);
- fwrite(file, final);
- fclose(file);
- format(fileo, sizeof(fileo),"tf2/logs/punishments/%d-%d-%d.ini",Int[2],Int[1],Int[0]);
- new File:file2 = fopen(fileo,io_append);
- format(final, sizeof(final),"[%d:%d:%d] %s\r\n",Int[3],Int[4],Int[5],text);
- fwrite(file2, final);
- fclose(file2);
- return 1;
- }
- -------------------------------
- stock Log(const text[])
- {
- new Int[3],fileo[64],final[256];
- getdate(Int[0],Int[1],Int[2]);
- format(fileo, sizeof(fileo),"tf2/logs/%d-%d-%d.ini",Int[2],Int[1],Int[0]);
- new File:file = fopen(fileo,io_append);
- gettime(Int[0],Int[1],Int[2]);
- format(final, sizeof(final),"[%d:%d:%d] %s\r\n",Int[0],Int[1],Int[2],text);
- fwrite(file, final);
- fclose(file);
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement