14.09.2014, 21:57
Hi. My problem is: I have 2 "cache_get_field_content" one for House owner and another to House Address. When i made printf to check if it works then "cache_get_field_content" for House address trying/writing over House Owner "cache_get_field_content".
printf
Код:
forward OnHouseLoad();
public OnHouseLoad()
{
new housestring[256];
if(cache_num_rows())
{
for(new i = 0; i<cache_num_rows(); i++)
{
new hID = cache_get_field_content_int(i,"HouseID",mysql_con);
new Float:enterx = cache_get_field_content_float(i,"EnterX",mysql_con);
new Float:entery = cache_get_field_content_float(i,"EnterY",mysql_con);
new Float:enterz = cache_get_field_content_float(i,"EnterZ",mysql_con);
new hworld = cache_get_field_content_int(i,"InteriorVW",mysql_con);
new Float:exitx = cache_get_field_content_float(i,"ExitX",mysql_con);
new Float:exity = cache_get_field_content_float(i,"ExitY",mysql_con);
new Float:exitz = cache_get_field_content_float(i,"ExitY",mysql_con);
cache_get_field_content(i,"HouseOwner",hInfo[i][HouseOwner],mysql_con,25);
cache_get_field_content(i,"HouseAdress",hInfo[i][HouseAdress],mysql_con,50);
CreateDynamicPickup(1273, 1, enterx, entery, enterz, 0, 0);
CreateDynamicPickup(1318, 1, exitx, exity, exitz, hworld, 0);
format(housestring, sizeof(housestring), "Aadres: %s\nOmanik: %s", hInfo[i][HouseAdress], hInfo[i][HouseOwner]);
Create3DTextLabel(housestring, -1, enterx, entery, enterz, 5.0, 0, 0);
printf("MAJA IDga %d ON LAETUD!Omanik:%s Aadres:%s",hID,hInfo[i][HouseOwner], hInfo[i][HouseAdress]);
}
}
else print("Maju EI leitud.");
return 1;
}
Код:
[00:49:39] Andmebaasiga ьhendus loodud! [00:49:39] Number of vehicle models: 0 [00:49:39] MAJA IDga 1 ON LAETUD!Omanik:RParna Aadres:Parna [00:49:39] MAJA IDga 2 ON LAETUD!Omanik:RLilla Aadres:Lilla


