Command Doesn't Work At All
#1

Idk why ?!
PHP код:
CMD:buyhouse(playerid, params[])
{
    for(new 
a, j = cache_get_row_count(); a != j; ++a)
    {
        if (
a >= sizeof HouseInfo) break;
        if(
IsPlayerInRangeOfPoint(playerid, 7.0, HouseInfo[a][EntranceX], HouseInfo[a][EntranceY], HouseInfo[a][EntranceZ]))
        {
            if(
HouseInfo[a][HousePrice] > GetPlayerMoney(playerid)) return SendClientMessage(playerid, COLOR_RED, "You don't have enough money!");
            new 
draw[200];
            
format(draw,sizeof(draw),"ID: %i\nPrice %i\nOwned: Yes\nOwner: %s",PlayerName(playerid));
            new 
query[200];
            
format(query, sizeof(query), "UPDATE houses SET owner='%s', owned='true', text='%s'", PlayerName(playerid), draw);
            
Update3DTextLabelText(HouseLabel, COLOR_GREEN, draw);
            
GivePlayerMoney(playerid, -HouseInfo[a][HousePrice]);
            
PlayerInfo[playerid][pHouseID] = HouseInfo[a][HouseID];
            
SendClientMessage(playerid, COLOR_GREEN, "You've bought this house successfully!");
        }
        else
        {
            
SendClientMessage(playerid, COLOR_RED, "You are not near any house");
        }
    }
    return 
1;
} 
Reply


Messages In This Thread
Command Doesn't Work At All - by nezo2001 - 14.06.2015, 15:55
Re: Command Doesn't Work At All - by Konstantinos - 14.06.2015, 15:58
Re: Command Doesn't Work At All - by nezo2001 - 14.06.2015, 16:00
Re: Command Doesn't Work At All - by Konstantinos - 14.06.2015, 16:07
Re: Command Doesn't Work At All - by nezo2001 - 14.06.2015, 16:09
Re: Command Doesn't Work At All - by nezo2001 - 16.06.2015, 09:47
Re: Command Doesn't Work At All - by Konstantinos - 16.06.2015, 09:53
Re: Command Doesn't Work At All - by nezo2001 - 16.06.2015, 10:02
Re: Command Doesn't Work At All - by Konstantinos - 16.06.2015, 10:19
Re: Command Doesn't Work At All - by nezo2001 - 16.06.2015, 10:35

Forum Jump:


Users browsing this thread: 1 Guest(s)