Advertisement
garfield

[COD]: CriarLog

Aug 10th, 2014
435
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1. #include a_samp
  2.  
  3.  
  4. main(){
  5.     LogSet("Hello.txt", "Helo World");
  6. }
  7.  
  8.  
  9. LogSet(filename[], text[], _z = sizeof(text)){
  10.  
  11.     if(strfind(filename, ".", true) == -1) return false;
  12.  
  13.     static
  14.         File: _@f
  15.     ;
  16.    
  17.  
  18.     if(!fexist(filename)){
  19.    
  20.         fclose(fopen(filename, io_write));
  21.        
  22.     }
  23.    
  24.     _@f = fopen(filename, io_append);
  25.    
  26.     strcat(text, "\r\n", _z + 5);
  27.    
  28.     printf(text);
  29.    
  30.     fwrite(_@f, text);
  31.     fclose(_@f);
  32.     return 1;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement