22.08.2012, 14:17
i used the plugin works but when i feed it to a mysql query it only does one
its does the mysql bit but only one file
its does the mysql bit but only one file
Код:
if(strcmp(cmd, "/users", true) == 0 && IsPlayerConnected(playerid)) { SendClientMessage(playerid, COLOR_GRAD3,"posting"); new dir:dHandle = dir_open("/Users/Jonny/SA-MP/0.3e/scriptfiles/users/"); new item[40], type; while(dir_list(dHandle, item, type)) { if(type == FM_FILE) { printf("%s is a file", item); new szDestination[100]; mysql_format(mysql, szDestination, "INSERT INTO users (pName) VALUES ('%s')", item); mysql_function_query(mysql,szDestination); } } dir_close(dHandle); return 1; }