Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <a_samp>
- /*********************************************
- * Include WS - Log System *
- * (c) Copyright 2012 by WeenSoares *
- * *
- * @Autor : WeenSoares *
- * @Data : 05 de outubro de 2012 *
- * @Contact : weensoares@live.com *
- * *
- * *
- **********************************************/
- /*------------------------------------
- native Log(stringlog[]);
- -------------------------------------*/
- forward Log(stringlog[]);
- public Log(stringlog[])
- {
- getdate(year, month, day), gettime(hour, minute, second);
- format(entry, sizeof(entry), "[%d:%d:%d] %s\r\n", hour, minute, second, stringlog);
- new File:hFile;
- format(dest, sizeof(dest), "Logs/%d.%d.%d.txt", day, month, year);
- hFile = fopen(dest, io_append);
- fwrite(hFile, entry);
- fclose(hFile);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement