What is wrong
#5

Maybe.
pawn Код:
stock BuyHouse(playerid, houseid)
{
    if (GetPlayerScore(playerid) >= 1000)
    {
        new string2[128];
        new name[24];
        GetPlayerName(playerid, name, sizeof(name));
        #if defined PRINT_HOUSES
        printf("%s Bought House ID %d", name, houseid);
        #endif
        GivePlayerMoney(playerid, -hInfo[houseid][Cost]);
        format(string2,sizeof(string2), HOUSE_FILE, houseid);
        INI_Open(string2);
        INI_WriteString("Name", name);
        INI_WriteInt("Locked", 0);
        INI_Save();
        INI_Close();
        hInfo[houseid][Name] = name;
        hInfo[houseid][Locked] = 0;
        DestroyPickup(HousePickup[houseid]);
        HousePickup[houseid] = CreatePickup(1272, 23, hInfo[houseid][ExteriorX], hInfo[houseid][ExteriorY],    hInfo[houseid][ExteriorZ]);
        ShowBoughtHouseMessage(playerid);
    }
    return 1;
}
Reply


Messages In This Thread
What is wrong - by boyan96 - 18.02.2012, 16:16
Re: What is wrong - by JhnzRep - 18.02.2012, 16:19
Re: What is wrong - by Konstantinos - 18.02.2012, 16:22
Re: What is wrong - by boyan96 - 18.02.2012, 16:27
Re: What is wrong - by Konstantinos - 18.02.2012, 16:30
Re: What is wrong - by boyan96 - 18.02.2012, 17:50
Re: What is wrong - by boyan96 - 18.02.2012, 18:26

Forum Jump:


Users browsing this thread: 1 Guest(s)