29.03.2014, 19:24
Hey, the objects that are there won't load, tried debugging all (Virtual World same as Object VW, Interior as well) but still I can't see the objects:
Example of an object in the table:
pawn Код:
stock LoadObjects()
{
new query[256],var[20][20], row[256], numrows;
format(query,sizeof(query),"SELECT * FROM `objects`");
mysql_query(query);
mysql_store_result();
if(mysql_num_rows() > 0)
{
mysql_fetch_row_format(row);
split(row,var,'|');
numrows = mysql_num_rows();
mysql_free_result();
for(new i=0;i<numrows;i++)
{
ObjectInfo[i][oID] = strval(var[13]);
ObjectInfo[i][oModel] = strval(var[1]);
sscanf(SQL_Get("x","objects",i),"p<|>f",ObjectInfo[i][oXP]);
sscanf(SQL_Get("y","objects",i),"p<|>f",ObjectInfo[i][oYP]);
sscanf(SQL_Get("z","objects",i),"p<|>f",ObjectInfo[i][oZP]);
sscanf(SQL_Get("rx","objects",i),"p<|>f",ObjectInfo[i][rXP]);
sscanf(SQL_Get("ry","objects",i),"p<|>f",ObjectInfo[i][rYP]);
sscanf(SQL_Get("rz","objects",i),"p<|>f",ObjectInfo[i][rZP]);
ObjectInfo[i][worldid] = strval(var[8]);
ObjectInfo[i][interiorid] = strval(var[9]);
Obj[i] = CreateDynamicObject(ObjectInfo[i][oModel], ObjectInfo[i][oXP], ObjectInfo[i][oYP], ObjectInfo[i][oZP], ObjectInfo[i][rXP], ObjectInfo[i][rYP], ObjectInfo[i][rZP], ObjectInfo[i][worldid], ObjectInfo[i][interiorid], -1, 300.0);
print(Obj[i]);
}
printf("%i objects loaded.",numrows);
}
}
Код:
Full texts id modelid x y z rx ry rz worldid interiorid type houseid name oid 0 1704 2463.8 -1698.3 1013.5 0.0 0.0 0.0 10 2 0 6 0 11