29.04.2014, 23:53
Because it loops through all houses, the player cannot own all of the houses.
Instead you could run this more effective code:
This eliminates the purpose of your loop, and you can also run the else statement.
Instead you could run this more effective code:
pawn Код:
if(PlayerInfo[playerid][pHouse] >= 0) {
if(!strcmp(Player(playerid), HouseInfo[PlayerInfo[playerid][pHouse]][hOwner], false)) {
PlayerInfo[playerid][pHouse] = HouseInfo[idx][hHouseID];
} else {
SendClientMessage(playerid, -1, "You have been removed as ownership from your house.");
}
}