Advertisement
WeenSoares_

[Include]WS - Log System

Oct 5th, 2012
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.96 KB | None | 0 0
  1. #include <a_samp>
  2.  
  3. /*********************************************
  4. * Include WS - Log System *
  5. * (c) Copyright 2012 by WeenSoares *
  6. * *
  7. * @Autor : WeenSoares *
  8. * @Data : 05 de outubro de 2012 *
  9. * @Contact : weensoares@live.com *
  10. * *
  11. * *
  12. **********************************************/
  13. /*------------------------------------
  14. native Log(stringlog[]);
  15. -------------------------------------*/
  16.  
  17. forward Log(stringlog[]);
  18.  
  19. public Log(stringlog[])
  20. {
  21. getdate(year, month, day), gettime(hour, minute, second);
  22. format(entry, sizeof(entry), "[%d:%d:%d] %s\r\n", hour, minute, second, stringlog);
  23. new File:hFile;
  24. format(dest, sizeof(dest), "Logs/%d.%d.%d.txt", day, month, year);
  25. hFile = fopen(dest, io_append);
  26. fwrite(hFile, entry);
  27. fclose(hFile);
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement