Unlimited house buying or etc.
#1

Is it possible to allow a player to buy unlimited houses he wants. Instead of creating different variables for the player's house and house number in the player file, like 'house1 = %d', 'house2 = %d'.
Reply
#2

Make a loop of all your houses and check if the owner and the player's name are the same.

example:

pawn Код:
new name[MAX_PLAYER_NAME];
GetPlayerName(playerid, name, sizeof(name));
for(new i = 0; i<sizeof(Your_Variable);i++)
{
    if(strcmp(name, Your_Variable, false) == 0)
    {
        //your codes
    }
}
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)