Players have already house doesnt work - 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)
+--- Thread: Players have already house doesnt work (
/showthread.php?tid=459987)
Players have already house doesnt work -
BruLaX - 25.08.2013
Hello hear i am again yes sorry
I try to make that one player only can have on house in Mysql but it doesnt work i try
I have set this to see if the player has a house or not but now its sets even for players how doesnt have any house
Sorry for my english
Код:
HasHouse[playerid] =1;
This is te hole script
Код:
stock PlayerOwnHouse(playerid)
{
new pname[24],QUERY[400];
GetPlayerName(playerid, pname, 24);
format(QUERY, sizeof(QUERY), "SELECT id FROM House WHERE Owner = '%s' LIMIT 1",pname);
mysql_query(QUERY);
mysql_store_result();
HasHouse[playerid] =1;
mysql_free_result();
}
Re : Players have already house doesnt work -
BruLaX - 25.08.2013
Up ? pls
Re: Players have already house doesnt work -
dowster - 26.08.2013
You aren't actually referencing the returned MySQL data. I would suggest reading the documentation for your MySQL plugin and figuring out how to see if your query was successful or not. In this case, if the query succeeded that would mean the player has a house.
Re : Players have already house doesnt work -
BruLaX - 26.08.2013
Dont understand can you give me any example please ?
Re : Players have already house doesnt work -
BruLaX - 26.08.2013
Found thanks