Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * rl_files 0.1.2
- * All right reserved! © By: RaFaeL
- *
- * Owner : RaFaeL
- * Time : 28.01.2013
- *
- * Thanks to:
- * RaFaeL - Scripting, PAWN
- * SA:MP Team past, present, future - SA:MP.
- *
- *
- * Functions:
- * fcheck(dir[], idx) - Check if file exist by idx
- * fnum(dir[]) - Return how much files in dir
- * fname(dir[], idx, name[], len = sizeof(name)) - Return the file name by idx
- * fprint(dir[]) - Print all files in dir
- *
- * CallBacks:
- * None.
- *
- * Update:
- * 28.01.2013:
- * Other: - First Release
- * - Bug fixed
- *
- */
- #define RL_FILE_TYPE 32768
- #define MAX_FILE_NAME 64
- #define NULL_DIR "."
- native fname(dir[], idx, name[], len = sizeof(name));
- native fnum(dir[]);
- stock fprint(dir[]) {
- new
- idx,
- file[MAX_FILE_NAME];
- while(idx < fnum(dir)) {
- fname(dir, idx, file);
- printf("%s/%s", dir, file);
- idx++;
- }
- return 1;
- }
- stock fcheck(dir[], idx) {
- new
- file[MAX_FILE_NAME];
- if(!fname(dir, idx, file))
- return 0;
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement