Problem with streamer
#1

i have a little issue with this:
pawn Код:
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();
It works all fine exept the CreateDynamicMapIcon. I dont know what is wrong but of some reason it wont load them.
Reply


Messages In This Thread
Problem with streamer - by Frede - 16.03.2013, 17:02
Re: Problem with streamer - by Patrick - 16.03.2013, 17:10
Re: Problem with streamer - by cordellpwnz - 16.03.2013, 17:11
Re: Problem with streamer - by kamzaf - 16.03.2013, 17:13
Re: Problem with streamer - by Frede - 16.03.2013, 17:22
Re: Problem with streamer - by Patrick - 16.03.2013, 17:32
Re: Problem with streamer - by Frede - 16.03.2013, 17:45

Forum Jump:


Users browsing this thread: 1 Guest(s)