15.12.2013, 03:43
hi $:
HOUSE_LABEL:
Picture:
simply not passing because the id is correct showing like the price, not because the name of the house and the owner does not appear..
Help me please T.T
pawn Код:
forward FUNCTION_LoadHouses();
public FUNCTION_LoadHouses()
{
new DBResult:HOUSE_RESULT;
new ftd[75];
HOUSE_RESULT = db_query(HouseData, "SELECT * FROM `HOUSEINFO`");
if(db_num_rows(HOUSE_RESULT) > 0) // Logged In
{
new id;
for (new x=0; x<db_num_rows(HOUSE_RESULT); x++)
{
db_get_field_assoc(HOUSE_RESULT, "ID", ftd, 26);
id = strval(ftd);
db_get_field_assoc(HOUSE_RESULT, "Title", ftd, 30);
hInfo[id][Hname] = strval(ftd);
db_get_field_assoc(HOUSE_RESULT, "Owner", ftd, 30);
hInfo[id][owner] = strval(ftd);
db_get_field_assoc(HOUSE_RESULT, "Price", ftd, 30);
hInfo[id][costprice] = strval(ftd);
db_get_field_assoc(HOUSE_RESULT, "EnterX", ftd, 30);
hInfo[id][hEnterPos][0] = floatstr(ftd);
db_get_field_assoc(HOUSE_RESULT, "EnterY", ftd, 30);
hInfo[id][hEnterPos][1] = floatstr(ftd);
db_get_field_assoc(HOUSE_RESULT, "EnterZ", ftd, 30);
hInfo[id][hEnterPos][2] = floatstr(ftd);
db_get_field_assoc(HOUSE_RESULT, "Type", ftd, 30);
hInfo[id][Type] = strval(ftd);
//native CreateDynamicCP(Float:x, Float:y, Float:z, Float:size, worldid = -1, interiorid = -1, playerid = -1, Float:streamdistance = 100.0);
hInfo[id][hcheckpointidx][0] = CreateDynamicCP(hInfo[id][hEnterPos][0], hInfo[id][hEnterPos][1], hInfo[id][hEnterPos][2], 1.0, 0, -1, -1, 50.0);
format(fquery, sizeof(fquery), HOUSE_LABEL, hInfo[id][Hname], id, hInfo[id][owner], Comma(hInfo[id][costprice]));
hInfo[id][htextid][0] = Create3DTextLabel(fquery, 0x00bbffFF, hInfo[id][hEnterPos][0], hInfo[id][hEnterPos][1], hInfo[id][hEnterPos][2] + 0.5, 15.0, 0, 0);
switch(hInfo[id][Type])
{
case 0:
{
hInfo[id][hcheckpointidx][1] = CreateDynamicCP(271.884979, 306.631988, 999.148437, 1.0, 15500000+id , 2, -1, 5.0); // Default house
hInfo[id][htextid][1] = Create3DTextLabel("[Exit]", 0x00bbffFF, 271.884979, 306.631988, 999.148437, 8.0, 15500000+id, 1);
}
}
db_next_row(HOUSE_RESULT);
}
}
houseid = db_num_rows(HOUSE_RESULT);
return 1;
}
pawn Код:
#define HOUSE_LABEL "{00bbff}House Name:{FFFFFF} %s(%d)\n{00bbff}House Owner:{FFFFFF} %s\n{00bbff}House Price:{FFFFFF} $%s"
simply not passing because the id is correct showing like the price, not because the name of the house and the owner does not appear..
Help me please T.T