19.09.2010, 17:13
oh i left something out please tell me if this helps too
Quote:
public LoadObjects() { new arrCoords[6][64]; new strFromFile2[256]; new File: file = fopen("LARP/object.txt", io_read); if (file) { new idx while (idx < sizeof(Object1)) { fread(file, strFromFile2); split(strFromFile2, arrCoords, ','); Object1[idx][oid] = strval(arrCoords[0]); Object1[idx][obx] = strval(arrCoords[1]); Object1[idx][oby] = strval(arrCoords[2]); Object1[idx][obz] = strval(arrCoords[3]); Object1[idx][orx] = strval(arrCoords[4]); Object1[idx][obp] = strval(arrCoords[5]); Object1[idx][obj] = CreateDynamicObject(Object1[idx][oid],Object1[idx][obx],Object1[idx][oby],Object1[idx][obz],Object1[idx][orx],0,0); idx++; } printf("[SCRIPT]: Loaded %d Objects", idx); fclose(file); } return 1; } |