Ownership
#2

Because it loops through all houses, the player cannot own all of the houses.

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.");
    }
}
This eliminates the purpose of your loop, and you can also run the else statement.
Reply


Messages In This Thread
Ownership - by AphexCCFC - 29.04.2014, 22:38
Re: Ownership - by Calgon - 29.04.2014, 23:53
Re: Ownership - by AphexCCFC - 30.04.2014, 00:00
Re: Ownership - by Calgon - 30.04.2014, 00:04
Re: Ownership - by AphexCCFC - 30.04.2014, 00:14
Re: Ownership - by Calgon - 30.04.2014, 10:06
Re: Ownership - by AphexCCFC - 30.04.2014, 16:56
Re: Ownership - by Calgon - 30.04.2014, 16:58
Re: Ownership - by AphexCCFC - 30.04.2014, 17:04

Forum Jump:


Users browsing this thread: 1 Guest(s)