Problem with 3D text in house system -
Stoyanov - 28.10.2014
I have problem with 3D text in 1 House system. When i bought a house it doesn't show the information about the owner and etc.
Re: Problem with 3D text in house system -
Laurey - 28.10.2014
Show the buyhouse command.
Re: Problem with 3D text in house system -
Stoyanov - 28.10.2014
Only when i sold it then it shows information about the house!
Re: Problem with 3D text in house system -
Stoyanov - 28.10.2014
When player enter checkpoint it shows a dialog for buy or cancel
Код:
if(!strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE) && hInfo[h][HouseValue] > 0 && GetPVarInt(playerid, "JustCreatedHouse") == 0)
{
format(string, sizeof(string), HMENU_BUY_HOUSE, hInfo[h][HouseValue]);
ShowPlayerDialog(playerid, HOUSEMENU+4, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
break;
}
}
if(checkpointid == HouseCPInt[h])
{
switch(GetPVarInt(playerid, "HousePreview"))
{
case 0: ExitHouse(playerid, h);
#if GH_HINTERIOR_UPGRADE == true
case 1:
{
GetPVarString(playerid, "HousePrevName", tmpstring, 50);
format(string, sizeof(string), HMENU_BUY_HINTERIOR, tmpstring, GetPVarInt(playerid, "HousePrevValue"));
ShowPlayerDialog(playerid, HOUSEMENU+17, DIALOG_STYLE_MSGBOX, INFORMATION_HEADER, string, "Buy", "Cancel");
}
#endif
}
break;
}
}
}
return 1;
Re: Problem with 3D text in house system -
Stoyanov - 28.10.2014
BTW: this is GarHouse V2 System
Re: Problem with 3D text in house system -
Stoyanov - 28.10.2014
Код:
if(dialogid == HOUSEMENU+4)
{
if(response)
{
new hname[MAX_PLAYER_NAME+9];
if(GetOwnedHouses(playerid) >= MAX_HOUSES_OWNED) { ShowInfoBox(playerid, E_MAX_HOUSES_OWNED, MAX_HOUSES_OWNED, AddS(MAX_HOUSES_OWNED)); return 1; }
if(strcmp(hInfo[h][HouseOwner], pNick(playerid), CASE_SENSETIVE) && strcmp(hInfo[h][HouseOwner], INVALID_HOWNER_NAME, CASE_SENSETIVE)) return ShowInfoBoxEx(playerid, COLOUR_SYSTEM, E_H_ALREADY_OWNED);
if(hInfo[h][HouseValue] > GetPlayerMoney(playerid)) { ShowInfoBox(playerid, E_CANT_AFFORD_HOUSE, hInfo[h][HouseValue], GetPlayerMoney(playerid), (hInfo[h][HouseValue] - GetPlayerMoney(playerid))); return 1; }
else
{
format(hname, sizeof(hname), "%s's House", pNick(playerid));
format(hInfo[h][HouseName], sizeof(hname), "%s", hname);
format(hInfo[h][HouseOwner], MAX_PLAYER_NAME, "%s", pNick(playerid));
hInfo[h][HousePassword] = udb_hash("INVALID_HOUSE_PASSWORD");
hInfo[h][HouseStorage] = 0;
GivePlayerMoney(playerid, -hInfo[h][HouseValue]);
file = INI_Open(filename);
INI_WriteString(file, "HouseOwner", pNick(playerid));
INI_WriteInt(file, "HousePassword", hInfo[h][HousePassword]);
INI_WriteString(file, "HouseName", hname);
INI_WriteInt(file, "HouseStorage", 0);
INI_Close(file);
ShowInfoBox(playerid, I_BUY_HOUSE, hInfo[h][HouseValue]);
foreach(Houses, h2)
{
if(IsHouseInRangeOfHouse(h, h2, RANGE_BETWEEN_HOUSES) && h2 != h)
{
file = INI_Open(HouseFile(h2));
INI_WriteInt(file, "HouseValue", (hInfo[h2][HouseValue] + ReturnProcent(hInfo[h2][HouseValue], HOUSE_SELLING_PROCENT2)));
UpdateHouseText(h2);
INI_Close(file);
}
}
#if GH_USE_MAPICONS == true
DestroyDynamicMapIcon(HouseMIcon[h]);
HouseMIcon[h] = CreateDynamicMapIcon(hInfo[h][CPOutX], hInfo[h][CPOutY], hInfo[h][CPOutZ], 32, -1, hInfo[h][SpawnWorld], hInfo[h][SpawnInterior], -1, MICON_VD);
#endif
UpdateHouseText(h);
}
}
return 1;
}