Originally Posted by [HLF]Southclaw
Yeah I did that, still not loading properly
pawn Код:
sscanf(line, "'('p<,>dffffff');'", modelid, px, py, pz, rx, ry, rz);
Edit: Working now, I removed the brackets now, it's just the data.
I have to do search and replace and remove the function name and brackets but at least it works now
pretty much the same as the original code
pawn Код:
stock LoadDynamicObjectsFromFile(filename[]) { new File:file_ptr, line[300], modelid, Float:px, Float:py, Float:pz, Float:rx, Float:ry, Float:rz; file_ptr=fopen(filename, io_read); if(!file_ptr)return printf("ERROR! File %s Doesn't Exist", filename); while(fread(file_ptr, line)>0) { sscanf(line, "p<,>dffffff", modelid, px, py, pz, rx, ry, rz); CreateDynamicObject(modelid, px, py, pz, rx, ry, rz);
printf("%d, %f, %f, %f, %f, %f, %f", modelid, px, py, pz, rx, ry, rz); printf("%s", line); } return 1; }
|