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
#2

https://sampwiki.blast.hk/wiki/OnPlayerClickPlayer
Reply
#3

Quote:
Originally Posted by Markx
Посмотреть сообщение
i dont mean that, i mean that the function return wrong, wditing

i worked it out
i removed the return 1;
while(mysql_retrieve_row())
{
houses ++;
return 1;
}
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)