GarHouse, Problem with all versions | REP+1
#1

I create a house, and try to buy it, i Click buy but nothing happens the dialog closes,, any ideas on how to fix it ?
Reply
#2

Paste the code.
Reply
#3

Show us the code please on the dialog of the house buying.
Reply
#4

pawn Код:
//------------------------------------------------------------------------------
//                               House Buying
//------------------------------------------------------------------------------
    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;
    }
Reply
#5

Anyone ?
Reply
#6

it happen to me somtimes try to change sscanf version 2.0 example
Reply
#7

Didn't wort D:
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)