get players house - Printable Version
+- SA-MP Forums Archive (
https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (
https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (
https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (
https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: get players house (
/showthread.php?tid=273885)
get players house - Unknown123 - 03.08.2011
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;
}
Re: get players house -
Markx - 03.08.2011
https://sampwiki.blast.hk/wiki/OnPlayerClickPlayer
Re: get players house - Unknown123 - 03.08.2011
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;
}