06.02.2010, 13:50 
	
	
	
		hInfo[houseid][iconx]=iconX;
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
{
HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought
}
else
{
HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought
}
}
AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, color1, color2, respawn_delay)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(dini_Exists(house))
{
cInfo[houseid][GotCar] = 1;
if(dini_Int(house, "CarModel")==0)
{
dini_IntSet(house, "CarModel", modelid);
cInfo[houseid][CarModel] = modelid;
cInfo[houseid][CarX] = Carx;
cInfo[houseid][CarY] = Cary;
cInfo[houseid][CarZ] = Carz;
dini_FloatSet(house, "CarX", Carx);
dini_FloatSet(house, "CarY", Cary);
dini_FloatSet(house, "CarZ", Carz);
cInfo[houseid][CarColor1] = color1;
cInfo[houseid][CarColor2] = color2;
dini_IntSet(house, "CarColor1", color1);
dini_IntSet(house, "CarColor2", color2);
dini_IntSet(house, "Respawn_Delay", respawn_delay);
cInfo[houseid][Respawn_Delay] = respawn_delay;
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, 0.0, color1, color2, respawn_delay);
print("-");
print("--------------Car Created--------------");
printf("- Car Houseid: %d", houseid);
printf("- Modelid: %d", modelid);
printf("- Color 1: %d", color1);
printf("- Color 2: %d", color2);
printf("- Respawn Delay: %d", respawn_delay);
print("---------------------------------------");
print("-");
}
else
{
cInfo[houseid][CarModel] = dini_Int(house, "CarModel");
}
cInfo[houseid][CarX] = dini_Int(house, "CarX");
cInfo[houseid][CarY] = dini_Int(house, "CarY");
cInfo[houseid][CarZ] = dini_Int(house, "CarZ");
cInfo[houseid][CarColor1] = dini_Int(house, "CarColor1");
cInfo[houseid][CarColor2] = dini_Int(house, "CarColor2");
cInfo[houseid][Respawn_Delay] = dini_Int(house, "Respawn_Delay");
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, 0.0, color1, color2, respawn_delay);
}
}
stock SpawnPlayerAtHouse(playerid)
{
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
if (dini_Exists(str1))
{
if(dini_Int(str1,"Houseid")!=-255)
{
new Float
,Float:y,Float:z;
str = dini_Get(str1,"SpawnInt");
SetPlayerInterior(playerid, strval(str));
playerinterior[playerid] = strval(str);
x = dini_Float(str1,"SpawnX");
y = dini_Float(str1,"SpawnY");
z = dini_Float(str1,"SpawnZ");
SetPlayerPos(playerid, x, y, z);
}
}
return 1;
}
	
	
	
hInfo[houseid][icony]=iconY;
hInfo[houseid][iconz]=iconZ;
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(strcmp(hInfo[houseid][Name],"ForSale",true)==0)
{
HousePickup[houseid] = CreatePickup(1273, 23, iconX, iconY, iconZ);//not bought
}
else
{
HousePickup[houseid] = CreatePickup(1272,23, iconX, iconY, iconZ);//bought
}
}
AddHouseCar(houseid, modelid, Float:Carx, Float:Cary, Float:Carz, color1, color2, respawn_delay)
{
new house[256];
format(house, sizeof(house), "Houses/houseid%d",houseid);
if(dini_Exists(house))
{
cInfo[houseid][GotCar] = 1;
if(dini_Int(house, "CarModel")==0)
{
dini_IntSet(house, "CarModel", modelid);
cInfo[houseid][CarModel] = modelid;
cInfo[houseid][CarX] = Carx;
cInfo[houseid][CarY] = Cary;
cInfo[houseid][CarZ] = Carz;
dini_FloatSet(house, "CarX", Carx);
dini_FloatSet(house, "CarY", Cary);
dini_FloatSet(house, "CarZ", Carz);
cInfo[houseid][CarColor1] = color1;
cInfo[houseid][CarColor2] = color2;
dini_IntSet(house, "CarColor1", color1);
dini_IntSet(house, "CarColor2", color2);
dini_IntSet(house, "Respawn_Delay", respawn_delay);
cInfo[houseid][Respawn_Delay] = respawn_delay;
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, 0.0, color1, color2, respawn_delay);
print("-");
print("--------------Car Created--------------");
printf("- Car Houseid: %d", houseid);
printf("- Modelid: %d", modelid);
printf("- Color 1: %d", color1);
printf("- Color 2: %d", color2);
printf("- Respawn Delay: %d", respawn_delay);
print("---------------------------------------");
print("-");
}
else
{
cInfo[houseid][CarModel] = dini_Int(house, "CarModel");
}
cInfo[houseid][CarX] = dini_Int(house, "CarX");
cInfo[houseid][CarY] = dini_Int(house, "CarY");
cInfo[houseid][CarZ] = dini_Int(house, "CarZ");
cInfo[houseid][CarColor1] = dini_Int(house, "CarColor1");
cInfo[houseid][CarColor2] = dini_Int(house, "CarColor2");
cInfo[houseid][Respawn_Delay] = dini_Int(house, "Respawn_Delay");
cInfo[houseid][HouseCar] = CreateVehicle(cInfo[houseid][CarModel], Carx, Cary, Carz, 0.0, color1, color2, respawn_delay);
}
}
stock SpawnPlayerAtHouse(playerid)
{
new str1[256],pname[24],str[256];
GetPlayerName(playerid, pname, sizeof(pname));
format(str1, sizeof(str1), "Houses/Users/%s", udb_encode(pname));
if (dini_Exists(str1))
{
if(dini_Int(str1,"Houseid")!=-255)
{
new Float
,Float:y,Float:z;str = dini_Get(str1,"SpawnInt");
SetPlayerInterior(playerid, strval(str));
playerinterior[playerid] = strval(str);
x = dini_Float(str1,"SpawnX");
y = dini_Float(str1,"SpawnY");
z = dini_Float(str1,"SpawnZ");
SetPlayerPos(playerid, x, y, z);
}
}
return 1;
}

