Problem with using dynamic "/buyhouse"
#4

pawn Код:
dcmd_buyhouse(playerid,params[])
{
    #pragma unused params
    for(new h = 0; h < MAX_HOUSES; h ++)
    {
        format(file,sizeof(file),"Stuff/Houses/%d.ini",h);
        if(dini_Exists(file))
        {
            if(IsPlayerInRangeOfPoint(playerid,5,HouseInfo[h][PickupOutsidePosX],HouseInfo[h][PickupOutsidePosY],HouseInfo[h][PickupOutsidePosZ]))
            {
                if(!strlen(HouseInfo[h][Owner]))
                {
                    if(GetPlayerMoney(playerid) >= HouseInfo[h][Price])
                    {
                        new string[70];
                        format(string,sizeof(string),"Do you want to buy this house for $%d?",HouseInfo[h][Price]);
                        ShowPlayerDialog(playerid,DIALOG_BUYHOUSE,DIALOG_STYLE_MSGBOX,"Buy a House",string,"Yes","No");
                        SetPVarInt(playerid,"BuyingHouse",h);
                        return 1;
                    }
                    else return SendClientMessage(playerid,COLOR_WHITE,"You do not have enough money to purchase this house.");
                }
                else return SendClientMessage(playerid,COLOR_WHITE,"    This house has already been bought.");
            }
        }
    }
    SendClientMessage(playerid,COLOR_WHITE,"    You are not near any unbought house pickup.");
    return 1;
}
Reply


Messages In This Thread
Problem with using dynamic "/buyhouse" - by Jochemd - 30.12.2010, 14:13
Re: Problem with using dynamic "/buyhouse" - by _rAped - 30.12.2010, 14:14
Re: Problem with using dynamic "/buyhouse" - by Jochemd - 30.12.2010, 14:17
Re: Problem with using dynamic "/buyhouse" - by MadeMan - 30.12.2010, 14:36
Re: Problem with using dynamic "/buyhouse" - by Jochemd - 30.12.2010, 14:50
Re: Problem with using dynamic "/buyhouse" - by Surmav - 30.12.2010, 16:18
Re: Problem with using dynamic "/buyhouse" - by Ash. - 30.12.2010, 16:22
Re: Problem with using dynamic "/buyhouse" - by Jochemd - 30.12.2010, 16:27

Forum Jump:


Users browsing this thread: 2 Guest(s)