01.07.2014, 08:29
PHP код:
if(!strcmp(cmd,"/searchmap",true))
{
new tmp2[288];
tmp2 = strrest(cmdtext, idx);
if(!strlen(tmp2))return SendClientMessage(playerid,-1,color_lblue"/SearchMap [MapperName]");
new dir:dHandle = dir_open("./scriptfiles/Tracks");
new item[40], type;
new idxx;
new Spl[2][25];
while(dir_list(dHandle, item, type))
{
if(type == FM_FILE)
{
Spl[0][0] = EOS;
split(item,Spl,'.');
new File[85];
format(File,sizeof(File),"Tracks/%s.track",Spl[0]);
SendClientMessage(playerid,-1,DOF2_GetString(File,"Author"));
if(!strcmp(tmp2,DOF2_GetString(File,"Author"),true))
{
SendFormat(playerid,-1,"%d. "color_yellow"\"%s\" By: "color_white"%s",idxx,Spl[0],DOF2_GetString(File,"Author"));
idxx++;
}
}
}
dir_close(dHandle);
return 1;
}
I tried to print the Author name from the file but I got ""