Advertisement
Guest User

[FileManager & Dini] Unban everyone

a guest
Oct 3rd, 2015
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 1.00 KB | None | 0 0
  1. /*
  2.     Unban everyone filterscript with FileManager plugin and Dini include.
  3.         created by: paul988
  4.        
  5.     Downloads:
  6.     * FileManager: http://forum.sa-mp.com/showthread.php?t=92246
  7.     * Dini: http://forum.sa-mp.com/showthread.php?t=50
  8. */
  9. #define FILTERSCRIPT
  10.  
  11. #include <a_samp>
  12. #include <dini>
  13. #include <filemanager>
  14.  
  15. #define ACCOUNT_DIR "./scriptfiles/accounts/" // Change this to your account directroy, remember to have './scriptfiles/' infront or it won't work.
  16. #define ACCOUNT_DIR_DINI "accounts/" // Change this to your account directory, do not use './scriptfiles/' infront here.
  17. #define DINI_BAN_VAR "banned" // Change this to the ban var you use in all your dini files.
  18.  
  19. public OnFilterScriptInit()
  20. {
  21.     new dir:handle = dir_open(ACCOUNT_DIR);
  22.    
  23.     new item[40 + 1], type;
  24.     while(dir_list(handle, item, type))
  25.     {
  26.         if(type == FM_FILE)
  27.         {
  28.             format(item, sizeof(item), "%s%s", ACCOUNT_DIR_DINI, item);
  29.             print(item);
  30.             dini_IntSet(item, DINI_BAN_VAR, 0);
  31.         }
  32.     }
  33.    
  34.     dir_close(handle);
  35.     return 1;
  36. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement