13.03.2017, 11:45
i found a tutorial on forus, will that be good for me? please check.
here is Object loading code:
here is Object loading code:
Code:
orward LoadObjects(limit); public LoadObjects(limit) { new count, rows, fields, data[50]; cache_get_data(rows, fields); for(new i; i < rows; i++) { if(count > limit) { printf("Number of objects exceeded limit!"); break; } for(new h; h < sizeof(object); h++) { if(object[h][ScriptID] == 0) { cache_get_field_content(i, "ScriptID", data); object[h][ScriptID] = strval(data); cache_get_field_content(i, "ModelID", data); object[h][ModelID] = strval(data); cache_get_field_content(i, "X", data); object[h][X] = floatstr(data); cache_get_field_content(i, "Y", data); object[h][Y] = floatstr(data); cache_get_field_content(i, "Z", data); object[h][Z] = floatstr(data); cache_get_field_content(i, "rX", data); object[h][rX] = floatstr(data); cache_get_field_content(i, "rY", data); object[h][rY] = floatstr(data); cache_get_field_content(i, "rZ", data); object[h][rZ] = floatstr(data); CreateDynamicObject(object[h][ModelID], object[h][X], object[h][Y], object[h][Z], object[h][rX], object[h][rY], object[h][rZ]); count++; break; } } } printf("Current objects on the server: %d",CountDynamicObjects()); return 1; }