26.11.2016, 20:01
New problem..
When I create house it is created nicely and saved nicely.. but every house is loaded as Camp House..
They are loaded fine but only name is problem.. Any ideas>>
Name is hDescription
When I create house it is created nicely and saved nicely.. but every house is loaded as Camp House..
PHP код:
CreateHouses(id)
{
if(HouseInfo[id][hOwnerCheck] == 0)
{
new string[320];
format(string, sizeof(string), ""SERVERBLUE"House on sale\n"SERVERBLUE"Type: "WHITE"%s\n"SERVERBLUE"Price: "WHITE"%d\n"SERVERBLUE"Level: "WHITE"%d\n"SERVERBLUE"To buy house type /buyhouse", HouseType(HouseInfo[id][hType]), HouseInfo[id][hPrice], HouseInfo[id][hLevel]);
HouseLabel[id] = CreateDynamic3DTextLabel(string, 0x1D9F00AA, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
HousePickup[id] = CreateDynamicPickup(1273, 1, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]);
}
else if(HouseInfo[id][hOwnerCheck] == 1)
{
new string[320], string2[220], string3[540];
if(HouseInfo[id][hRent] == 0)
{
format(string, sizeof(string), ""SERVERBLUE"[ "WHITE"%s "SERVERBLUE"]\n"SERVERBLUE"Owner: "WHITE"%s\b"SERVERBLUE"Type: "WHITE"%d\n", HouseInfo[id][hDescription], HouseInfo[id][hOwnerName], HouseInfo[id][hType]);
format(string2, sizeof(string2), ""SERVERBLUE"Level: "WHITE"%d\n"SERVERBLUE"Price: "WHITE"%d\n"SERVERBLUE"To enter press 'F' or 'ENTER'", HouseInfo[id][hLevel], HouseInfo[id][hPrice]);
format(string3, sizeof(string3), "%s%s", string, string2);
HouseLabel[id] = CreateDynamic3DTextLabel(string3, 0x1D9F00AA, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
HousePickup[id] = CreateDynamicPickup(1273, 1, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]);
}
else if(HouseInfo[id][hRent] == 1)
{
format(string, sizeof(string), ""SERVERBLUE"[ "WHITE"%s "SERVERBLUE"]\n"SERVERBLUE"Owner: "WHITE"%s\b"SERVERBLUE"Type: "WHITE"%d\n"SERVERBLUE"Rent: "WHITE"%d$(/renthouse)", HouseInfo[id][hDescription], HouseInfo[id][hOwnerName], HouseInfo[id][hType], HouseInfo[id][hRentPrice]);
format(string2, sizeof(string2), ""SERVERBLUE"Level: "WHITE"%d\n"SERVERBLUE"Price: "WHITE"%d\n"SERVERBLUE"To enter press 'F' or 'ENTER'", HouseInfo[id][hLevel], HouseInfo[id][hPrice]);
format(string3, sizeof(string3), "%s%s", string, string2);
HouseLabel[id] = CreateDynamic3DTextLabel(string3, 0x1D9F00AA, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]+0.1, 25.0, _, _, _, 0, 0, _, _);
HousePickup[id] = CreateDynamicPickup(1273, 1, HouseInfo[id][hEnterX], HouseInfo[id][hEnterY], HouseInfo[id][hEnterZ]);
}
}
return 1;
}
HouseType(id)
{
new string[17];
switch(id)
{
case TYPE_CAMP: string = "Camp House";
case TYPE_SMALL: string = "Small House";
case TYPE_MEDIUM: string = "Medium House";
case TYPE_BIG: string = "Big House";
case TYPE_VILLA: string = "Villa";
default: string = "Unknown";
}
return string;
}
Name is hDescription