get players house
#1

how can i get how many houses has by checking teir name? i got this

this return wrong valtue:
pawn Код:
stock getPlayerHouses(playerid)
{
    new string[128], houses;
    format(string, sizeof(string), "SELECT `hOwner` FROM `house` WHERE `hOwner` = '%s'", GetPlayerNameEx(playerid));
    mysql_query(string);
    mysql_store_result();
    while(mysql_retrieve_row())
    {
        houses ++;
        return 1;
    }
    mysql_free_result();
    return houses;
}
Reply


Messages In This Thread
get players house - by Unknown123 - 03.08.2011, 19:19
Re: get players house - by Markx - 03.08.2011, 19:21
Re: get players house - by Unknown123 - 03.08.2011, 19:23

Forum Jump:


Users browsing this thread: 2 Guest(s)