I have a problem, I do not load all the houses in the MySQL database, I charge only 3 houses.
HTML Code:
public OnHousesLD()
{
new housestr[264];
for(new r=0; r < cache_num_rows(); ++r) {
new ORM:ormid = Houses[r][ORM_ID] = orm_create("houses");
orm_addvar_int(ormid, Houses[r][ID], "ID"); //this is the key
orm_setkey(ormid, "ID"); //here we declare it as the key
orm_addvar_string(ormid, Houses[r][Owner], 24, "Owner");
orm_addvar_string(ormid, Houses[r][Discription], 26, "Discription");
orm_addvar_float(ormid, Houses[r][EnterX], "EnterX");
orm_addvar_float(ormid, Houses[r][EnterY], "EnterY");
orm_addvar_float(ormid, Houses[r][EnterZ], "EnterZ");
orm_addvar_float(ormid, Houses[r][IntX], "IntX");
orm_addvar_float(ormid, Houses[r][IntY], "IntY");
orm_addvar_float(ormid, Houses[r][IntZ], "IntZ");
orm_addvar_int(ormid, Houses[r][Interior], "Interior");
orm_addvar_int(ormid, Houses[r][Value], "Value");
orm_addvar_int(ormid, Houses[r][Rentabil], "Rentabil");
orm_addvar_int(ormid, Houses[r][Level], "Level");
orm_apply_cache(ormid, r);
CreateDynamicPickup(1273, 23, Houses[r][EnterX], Houses[r][EnterY], Houses[r][EnterZ], -1, -1, -1);
}
return 1;
}
Aucun commentaire:
Enregistrer un commentaire