25.11.2011, 10:53
I have the original gamemode script for houses, there is no line for MAX_PLAYER owned houses to edit, only this:
and this:
Help please?
Code:
// Check if the player has room for another house (he hasn't bought the maximum amount of houses per player yet) // and get the slot-id for (new HouseIndex; HouseIndex < MAX_HOUSESPERPLAYER; HouseIndex++) // Loop through all house-slots of the player if (APlayerData[playerid][Houses][HouseIndex] == 0) // Check if this house slot is free return HouseIndex; // Return the free HouseIndex for this player
Code:
// his function returns "1" if the given player is the owner of the given house
House_PlayerIsOwner(playerid, HouseID)
{
// Loop through all houses owner by this player
for (new i; i < MAX_HOUSESPERPLAYER; i++)
{
// Check if the player owns the house in any of his house-slots
if (APlayerData[playerid][Houses][i] == HouseID)
return 1;
}
// If the player doesn't own the house, return 0
return 0;

