01.04.2016, 05:54
any idea about buying house? when the owner of house is not connected! i hope there is something direct to do with user(owner) files.. im using INI
CMD:buyhouse(playerid, params[]) { new string[128], houseid, name; houseid = GetPlayerNearestHouseEntrance(playerid) if(houseid == -1) return SendClientMessage(playerid, -1, "You're not near any entrance."); if(HouseInfo[houseid][hSale] != 1) return SendClientMessage(playerid, -1, "House is not for sale."); if(GetPlayerMoney(playerid) < HouseInfo[houseid][hPrice]) return SendClientMessage(playerid, -1, "You don't have enough money."); GetPlayerName(playerid, name, sizeof(name)); format(HouseInfo[houseid][hOwner], %s, name); GivePlayerMoney(playerid, -HouseInfo[houseid][hPrice]); SendClientMessage(playerid, -1, "Congratulations on your purchase."); return 1; }