About housing. - 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: About housing. (
/showthread.php?tid=258217)
About housing. -
Vvolk - 29.05.2011
I want to make a house pickup and then player enter on this pickup he gain the message with player name who own this house: There is my code:
Код:
new House1;
new House1[MAX_PLAYERS];
Код:
public OnPlayerPickUpPickup(playerid, pickupid)
{
if(pickupid == House1){
new query[256],string[256];
MySQLCheck();
format(query,sizeof(query),"SELECT Name FROM `"TABLENAME"` WHERE House = '1'");
mysql_query(query);
mysql_store_result();
House1[playerid] = mysql_fetch_int();
mysql_free_result();
format(string,sizeof(string),"This house owns player: %s.",House1[playerid]);
SendClientMessage(playerid,0xFFFFFFFF,string);
return 1;
}
return 1;
}
Mysql connection i have defined and pass and host... In mysql log is no erros, but player gain bad message
. Please help me with this problem
Re: About housing. -
Vvolk - 29.05.2011
Please answer...
Re: About housing. -
Raimis_R - 29.05.2011
Stop bumping.
And 1 day read wiki pages if this so hard?
You selectin `Name` FROM TABLE WHERE HOUSE = 1
where you see logic?
Amazing MySQL Functions:
https://sampwiki.blast.hk/wiki/MySQL#Plugin_functions
And amazing SQL Intro:
http://www.w3schools.com/sql/sql_intro.asp
That's all what you need..
Have a nice day.
Re: About housing. -
Vvolk - 29.05.2011
You are so angry