new query[256], savingstring[20], houseid;
format(query, sizeof(query),"SELECT * FROM `houses` ORDER BY `id`");
mysql_query(query);
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_field_row(savingstring, "id"); houseid = strval(savingstring);
mysql_fetch_field_row(savingstring, "iconx"); hInfo[houseid][iconx] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "icony"); hInfo[houseid][icony] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "iconz"); hInfo[houseid][iconz] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorX"); hInfo[houseid][InteriorX] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorY"); hInfo[houseid][InteriorY] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorZ"); hInfo[houseid][InteriorZ] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interior"); hInfo[houseid][Interior] = strval(savingstring);
mysql_fetch_field_row(savingstring, "price"); hInfo[houseid][Cost] = strval(savingstring);
mysql_fetch_field_row(savingstring, "sellprice"); hInfo[houseid][Sell] = strval(savingstring);
mysql_fetch_field_row(savingstring, "virtualworld"); hInfo[houseid][Virtualworld] = strval(savingstring);
mysql_fetch_field_row(savingstring, "locked"); hInfo[houseid][Locked] = strval(savingstring);
mysql_fetch_field_row(hInfo[houseid][Name], "owner");
if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
{
HousePickup[houseid] = CreatePickup(1273, 23, hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz]);//not bought
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 32, 0, hInfo[houseid][Virtualworld], hInfo[houseid][Interior], -1, 100.0);
}
else
{
HousePickup[houseid] = CreatePickup(1272, 23, hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz]);//bought
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 31, 0, hInfo[houseid][Virtualworld], hInfo[houseid][Interior], -1, 100.0);
}
printf("Loaded house %d Owner: %s", houseid, hInfo[houseid][Name]);
}
mysql_free_result();
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 31, 0, hInfo[houseid][Virtualworld], 0, -1, 100.0);
*** Streamer Plugin: Obsolete or invalid native "Streamer_CallbackHook" found (script needs to be recompiled with the latest include file)
|
try this
pawn Код:
|
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 31, 0, hInfo[houseid][Virtualworld], hInfo[houseid][Interior], -1, 100.0);
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 32, 0, hInfo[houseid][Virtualworld], hInfo[houseid][Interior], -1, 100.0);
new query[256], savingstring[20], houseid;
format(query, sizeof(query),"SELECT * FROM `houses` ORDER BY `id`");
mysql_query(query);
mysql_store_result();
while(mysql_retrieve_row())
{
mysql_fetch_field_row(savingstring, "id"); houseid = strval(savingstring);
mysql_fetch_field_row(savingstring, "iconx"); hInfo[houseid][iconx] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "icony"); hInfo[houseid][icony] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "iconz"); hInfo[houseid][iconz] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorX"); hInfo[houseid][InteriorX] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorY"); hInfo[houseid][InteriorY] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interiorZ"); hInfo[houseid][InteriorZ] = floatstr(savingstring);
mysql_fetch_field_row(savingstring, "interior"); hInfo[houseid][Interior] = strval(savingstring);
mysql_fetch_field_row(savingstring, "price"); hInfo[houseid][Cost] = strval(savingstring);
mysql_fetch_field_row(savingstring, "sellprice"); hInfo[houseid][Sell] = strval(savingstring);
mysql_fetch_field_row(savingstring, "virtualworld"); hInfo[houseid][Virtualworld] = strval(savingstring);
mysql_fetch_field_row(savingstring, "locked"); hInfo[houseid][Locked] = strval(savingstring);
mysql_fetch_field_row(hInfo[houseid][Name], "owner");
if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
{
HousePickup[houseid] = CreatePickup(1273, 23, hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz]);//not bought
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 32, 0, 0, 0, -1, 150.0);
}
else
{
HousePickup[houseid] = CreatePickup(1272, 23, hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz]);//bought
HouseIcon[houseid] = CreateDynamicMapIcon(hInfo[houseid][iconx], hInfo[houseid][icony], hInfo[houseid][iconz], 31, 0, 0, 0, -1, 150.0);
}
printf("Loaded house %d Owner: %s", houseid, hInfo[houseid][Name]);
}
mysql_free_result();