(2021-02-13, 06:56 AM)Kwarde Wrote: You can use FileManager for that: https://github.com/JaTochNietDan/SA-MP-FileManager
There is already an example on the Github page that shows you how to read files in a directory.
sorry for such a late reply. is there a way to read every user's file though ? if so, could you give any examples ?
edit: i tried it and my server won't load up. here's the error:
Code:
[jit] Compilation was disabled
Script[gamemodes/fps.amx]: Run time error 19: "File or function is not found"
Number of vehicle models: 173
i used that code example to see what it looks like:
Code:
CMD:test(playerid, params[])
{
#pragma unused params
new dir:dHandle = dir_open("./");
new item[40], type;
while(dir_list(dHandle, item, type))
{
if(type == FM_FILE) printf("%s is a file", item);
else if(type == FM_DIR) printf("%s is a directory", item);
}
dir_close(dHandle);
}
and i also included filemanager.