/sell commands
#8

Sorry for double posting, but here's the right code.

pawn Код:
if (strcmp("/sellhouse", cmdtext) == 0)
    {
        for(new i; i<MAX_HOUSES; i++)
        {
            if(IsPlayerInRangeOfPoint(playerid, 2, HouseInfo[i][PickupX], HouseInfo[i][PickupY], HouseInfo[i][PickupZ]))
            {
                new Pname[24]; GetPlayerName(playerid, Pname, 24);
                if(strcmp(Pname, HouseInfo[i][HouseOwner]) != 0) return SendClientMessage(playerid, 0xF60000AA, "You don't own this house!");
                GivePlayerMoney(playerid, -HouseInfo[i][HouseSell]);
                GameTextForPlayer(playerid, "~r~House Sold!", 2000, 3);
                HouseInfo[i][Owned] = 0;
                HouseInfo[i][HouseOwner] = 0;
                HouseInfo[i][PickupX] = 9999.9999;
                HouseInfo[i][PickupY] = -9999.9999;
                HouseInfo[i][PickupZ] = 9999.9999;
                dini_Unset("Owners.ini", Pname);
                return 1;
            }
            SendClientMessage(playerid, 0xF60000AA, "You are not close enough to a house");
            return 1;
        }
        return 1;
    }
I fixed the errors.
Reply


Messages In This Thread
/sell commands - by [MKD]Max - 07.10.2010, 15:09
Re: /sell commands - by TheHoodRat - 07.10.2010, 15:12
Re: /sell commands - by [MKD]Max - 07.10.2010, 15:17
Re: /sell commands - by [MKD]Max - 07.10.2010, 15:20
Re: /sell commands - by TheHoodRat - 07.10.2010, 15:23
Re: /sell commands - by [MKD]Max - 07.10.2010, 15:27
Re: /sell commands - by TheHoodRat - 07.10.2010, 15:28
Re: /sell commands - by TheHoodRat - 07.10.2010, 15:30
Re: /sell commands - by [MKD]Max - 07.10.2010, 16:25

Forum Jump:


Users browsing this thread: 1 Guest(s)