Filename1 Filename2
Filename1 - Filename2
stock NumFiles(playerid)
{
new string[50];
format(string, sizeof(string), "./scriptfiles/Groups/");
new dir:dHandle = dir_open(string);
new item[40], type, contor = -1;
while(dir_list(dHandle, item, type))
{
if(type == FM_FILE)
{
strdel(item, strfind(item, ".ini"), strlen(item));
format(string, sizeof(string), item);
SendClientMessage(playerid, -1, string);
contor++;
}
}
dir_close(dHandle);
return 1;
}
stock NumFiles(playerid)
{
new string[50];
format(string, sizeof(string), "./scriptfiles/Groups/");
new dir:dHandle = dir_open(string);
new item[40], type, contor = -1;
while(dir_list(dHandle, item, type))
{
if(type == FM_FILE)
{
new tmpItem[40];
strdel(item, strfind(item, ".ini"), strlen(item));
format(tmpItem, sizeof(tmpItem), " - %s", item);
strcat(string, tmpItem);
contor++;
}
}
SendClientMessage(playerid, -1, string);
dir_close(dHandle);
return 1;
}
./scriptfiles/Groups/ - Filename1 - Filename2
This worked but it shows in game
Код:
./scriptfiles/Groups/ - Filename1 - Filename2 |
SendClientMessage(playerid, -1, string);
This worked but it shows in game
Код:
./scriptfiles/Groups/ - Filename1 - Filename2 |
stock NumFiles(playerid)
{
new string[50];
format(string, sizeof(string), "./scriptfiles/Groups/");
new dir:dHandle = dir_open(string);
new item[40], type, contor = -1;
new msg[500];
while(dir_list(dHandle, item, type))
{
if(type == FM_FILE)
{
new tmpItem[40];
strdel(item, strfind(item, ".ini"), strlen(item));
format(tmpItem, sizeof(tmpItem), " - %s", item);
strcat(msg, tmpItem);
contor++;
}
}
strdel(msg, 0, 2); //Removes the " - " in the start... :D
SendClientMessage(playerid, -1, msg);
dir_close(dHandle);
return 1;
}