dini_Get(filename[], key[])
new name[MAX_PLAYER_NAME];new File:file = fopen(\"nevek.txt\",io_read);if(file){ while(fread(file,name)) { printf(\"%s\",name); }}
new dir:dHandle = dir_open(\"./scriptfiles/users/\");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);
CMD:nevek(playerid) {new dir:dHandle = dir_open(\"./scriptfiles/users/\");new item[40], type, string[1024];while(dir_list(dHandle, item, type)){ format(string, sizeof(string), \"%s%s\\n\", string, item);}dir_close(dHandle);ShowPlayerDialog(playerid, 1001, DIALOG_STYLE_LIST, \"Regisztrált játékosok nevei\", string, \"Mégse\", \"Mégse\");return 1;}
CMD:nevek(playerid) { new dir:dHandle = dir_open(\"./scriptfiles/users/\"); new item[40], type, string[1024]; while(dir_list(dHandle, item, type)) { format(string, sizeof(string), \"%s%s\\n\", string, item); } dir_close(dHandle); ShowPlayerDialog(playerid, 1001, DIALOG_STYLE_LIST, \"Regisztrált játékosok nevei\", string, \"Kiválaszt\", \"Mégse\"); return 1;}public OnDialogResponse(playerid, dialogid, response, listitem, inputtext[]) {if(dialogid == 1001 && response) { new filename[128]; format(filename, 128, \"accounts/%s\", inputtext); ///filename a fájl nevét tartalmazza (elérési útját)}return 1;}